init
This commit is contained in:
24
template-app/.helmignore
Normal file
24
template-app/.helmignore
Normal file
@ -0,0 +1,24 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
node_modules/
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
24
template-app/Chart.yaml
Normal file
24
template-app/Chart.yaml
Normal file
@ -0,0 +1,24 @@
|
||||
apiVersion: v2
|
||||
name: template-app
|
||||
description: Template helm chart for a classical app
|
||||
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
#
|
||||
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||
# to be deployed.
|
||||
#
|
||||
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||
type: application
|
||||
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.1.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
# It is recommended to use it with quotes.
|
||||
appVersion: "0.0.1"
|
39
template-app/templates/deployment.yaml
Normal file
39
template-app/templates/deployment.yaml
Normal file
@ -0,0 +1,39 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Values.app.name }}
|
||||
labels:
|
||||
app: {{ .Values.app.name }}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ .Values.container.resources.requests.cpu }}
|
||||
memory: {{ .Values.container.resources.requests.memory }}
|
||||
{{ if .Values.container.resources.limits.enabled }}
|
||||
limits:
|
||||
cpu: {{ .Values.container.resources.limits.cpu }}
|
||||
memory: {{ .Values.container.resources.limits.memory }}
|
||||
{{ end }}
|
||||
spec:
|
||||
replicas: {{ .Values.container.replicas }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ .Values.app.name }}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
rollme: {{ randAlphaNum 5 | quote }}
|
||||
labels:
|
||||
app: {{ .Values.app.name }}
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ .Values.app.name }}
|
||||
image: {{ .Values.container.image }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.container.port }}
|
||||
env:
|
||||
{{- range $env := .Values.container.env }}
|
||||
- name: {{ $env.name }}
|
||||
value: {{ $env.value }}
|
||||
{{- end}}
|
||||
imagePullSecrets:
|
||||
- name: docker-registry-cred
|
27
template-app/templates/ingress.yaml
Normal file
27
template-app/templates/ingress.yaml
Normal file
@ -0,0 +1,27 @@
|
||||
{{ if default false .Values.ingress.enabled }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt
|
||||
name: {{ .Values.app.name }}-ingress
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
rules:
|
||||
- host: {{ .Values.ingress.host }}
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
service:
|
||||
name: {{ .Values.app.name }}-service
|
||||
port:
|
||||
number: {{ .Values.container.port }}
|
||||
path: /
|
||||
pathType: Prefix
|
||||
{{ if .Values.ingress.tlsEnabled }}
|
||||
tls:
|
||||
- hosts:
|
||||
- {{ .Values.ingress.host }}
|
||||
secretName: {{ .Values.app.name }}-cert
|
||||
{{ end }}
|
||||
{{ end }}
|
11
template-app/templates/service.yaml
Normal file
11
template-app/templates/service.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Values.app.name }}-service
|
||||
spec:
|
||||
selector:
|
||||
app: {{ .Values.app.name }}
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: {{ .Values.container.port }}
|
||||
targetPort: {{ .Values.container.port }}
|
22
template-app/values.yaml
Normal file
22
template-app/values.yaml
Normal file
@ -0,0 +1,22 @@
|
||||
app:
|
||||
name: "template-app"
|
||||
version: "0.0.1"
|
||||
ingress:
|
||||
enabled: true
|
||||
tlsEnabled: true
|
||||
host: "test.mumme-it.de"
|
||||
container:
|
||||
replicas: 1
|
||||
env:
|
||||
- name: SPRING_PROFILES_ACTIVE
|
||||
value: prod
|
||||
port: 8080
|
||||
image: docker.mumme-it.de/Mumme-IT/template-app
|
||||
resources:
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
enabled: true
|
||||
cpu: 250m
|
||||
memory: 256Mi
|
Reference in New Issue
Block a user