diff --git a/charts/microservice/Chart.yaml b/charts/microservice/Chart.yaml index 7be8a3b0..381b6b8d 100644 --- a/charts/microservice/Chart.yaml +++ b/charts/microservice/Chart.yaml @@ -1,9 +1,10 @@ ---- apiVersion: v2 name: microservice -description: A Helm chart for a microservice in Kubernetes +description: Basic helm chart for deploying microservices on kubernetes with best practices type: application -version: 0.1.2 +version: 0.1.3 appVersion: "0.1.2" maintainers: - - name: Opstree Solutions + - name: Ashwani Singh + email: ashwani.singh@opstree.com + - name: Shikha Tripathi diff --git a/charts/microservice/README.md b/charts/microservice/README.md index cfe8f6e0..8e38be25 100644 --- a/charts/microservice/README.md +++ b/charts/microservice/README.md @@ -1,39 +1,45 @@ -# Basic Helm Template for Deploying Microservice on K8s +# microservice -## Chart Structure -``` -microservice/ -├── Chart.yaml -├── values.yaml -├── charts/ -└── templates/ - ├── deployment.yaml - └── service.yaml -``` +Basic helm chart for deploying microservices on kubernetes with best practices -## Usage +![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.2](https://img.shields.io/badge/AppVersion-0.1.2-informational?style=flat-square) -You can change the Docker image by modifying the values.yaml file. For example, to use a different image, update the `image.repository` and `image.tag` fields. +## Maintainers -The Helm chart is specifically for deploying a microservice with a Kubernetes service and deployment. You can further customize and expand this chart as needed for your application. +| Name | Email | Url | +| ---- | ------ | --- | +| Ashwani Singh | | | +| Shikha Tripathi | | | -## Installing the Chart on K8s +## Installing the Chart -```bash +To install the chart with the release name `my-release`: + +```console helm install my-release microservice/ ``` -## TODO - -- [ ] Application Health Probes -- [ ] Service -- [ ] Horizontal Pod Autoscaler -- [ ] ConfigMap -- [ ] RBAC - - [ ] Service Account - - [ ] Role Binding - - [ ] Role -- [ ] Rolling Deployment Manipulation -- [ ] Environment Parmaters -- [ ] Container Port Mapping -- [ ] Application Secrets \ No newline at end of file +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| deployment | object | `{"affinity":{},"annotations":{},"environment":{},"image":{"name":"","pullPolicy":"IfNotPresent","tag":""},"livenessProbe":{"failureThreshold":5,"initialDelaySeconds":250,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5},"nodeSelector":{},"readinessProbe":{"failureThreshold":5,"initialDelaySeconds":30,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5},"resources":{},"tolerations":[],"volumeMounts":[],"volumes":{"configMaps":null,"enabled":true,"pvc":{"accessModes":["ReadWriteOnce"],"class":"default","enabled":false,"existing_claim":false,"mountPath":"/pv","name":"pvc","size":"1G"}}}` | Object that configures Deployment instance | +| deployment.image | object | `{"name":"","pullPolicy":"IfNotPresent","tag":""}` | Override default container image format | +| global | object | `{"environment":{},"fullnameOverride":"","imagePullSecrets":[],"nameOverride":"","namespace":"default","replicaCount":1}` | global variables | +| hpa.enabled | bool | `true` | | +| hpa.maxReplicas | int | `1` | | +| hpa.minReplicas | int | `1` | | +| hpa.targetCPU | int | `80` | | +| hpa.targetMemory | int | `80` | | +| kubeVersion | string | `""` | | +| service.annotations | object | `{}` | | +| service.specs[0].name | string | `"http"` | | +| service.specs[0].port | int | `80` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `false` | | +| serviceAccount.name | string | `""` | | + +> **_NOTE:_** Please find the sample helm values yaml in example repository. + diff --git a/charts/microservice/README.md.gotmpl b/charts/microservice/README.md.gotmpl new file mode 100644 index 00000000..b1d9f5ad --- /dev/null +++ b/charts/microservice/README.md.gotmpl @@ -0,0 +1,22 @@ +{{ template "chart.header" . }} +{{ template "chart.description" . }} + +{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }} + +{{ template "chart.maintainersSection" . }} + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```console +$ helm install my-release microservice/ +``` + +{{/* {{ template "chart.requirementsSection" . }} */}} + +{{ template "chart.valuesSection" . }} + +> **_NOTE:_** Please find the sample helm values yaml in example repository. + +{{/* {{ template "helm-docs.versionFooter" . }} */}} \ No newline at end of file diff --git a/charts/microservice/examples/config.conf b/charts/microservice/examples/config.conf new file mode 100644 index 00000000..8fa9e87f --- /dev/null +++ b/charts/microservice/examples/config.conf @@ -0,0 +1,2 @@ +name=opstree +address=opstreesolution \ No newline at end of file diff --git a/charts/microservice/examples/deploy-nginx.yaml b/charts/microservice/examples/deploy-nginx.yaml new file mode 100644 index 00000000..20311c45 --- /dev/null +++ b/charts/microservice/examples/deploy-nginx.yaml @@ -0,0 +1,33 @@ +global: + namespace: "demo-dev" + fullnameOverride: "webapp" + +deployment: + image: + name: nginx + tag: latest + pullPolicy: IfNotPresent + livenessProbe: + httpGet: + path: "/" + port: http + readinessProbe: + httpGet: + path: "/" + port: http + resources: + requests: + memory: 100Mi + cpu: 100m + limits: + memory: 500Mi + cpu: 500m + volumes: + enabled: true + configMaps: + - name: index + mountPath: /usr/share/nginx/html + data: + index.html: | + Hello! Opstree + \ No newline at end of file diff --git a/charts/microservice/templates/NOTES.txt b/charts/microservice/templates/NOTES.txt new file mode 100644 index 00000000..b80c1dea --- /dev/null +++ b/charts/microservice/templates/NOTES.txt @@ -0,0 +1,5 @@ +You have deployed the following release: {{ include "microservice.fullname" . }}. +To get further information, you can run the commands: + $ helm status {{ include "microservice.fullname" . }} + $ helm get all {{ include "microservice.fullname" . }} + diff --git a/charts/microservice/templates/_capabilities.tpl b/charts/microservice/templates/_capabilities.tpl new file mode 100644 index 00000000..1998e762 --- /dev/null +++ b/charts/microservice/templates/_capabilities.tpl @@ -0,0 +1,36 @@ +{{/* vim: set filetype=mustache: */}} + +{{/* +Return the target Kubernetes version +*/}} +{{- define "microservice.capabilities.kubeVersion" -}} +{{- default (default .Capabilities.KubeVersion.Version .Values.kubeVersion) ((.Values.global).kubeVersion) -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for Horizontal Pod Autoscaler. +*/}} +{{- define "microservice.capabilities.hpa.apiVersion" -}} +{{- $kubeVersion := include "microservice.capabilities.kubeVersion" .context -}} +{{- if and (not (empty $kubeVersion)) (semverCompare "<1.23-0" $kubeVersion) -}} +{{- if .beta2 -}} +{{- print "autoscaling/v2beta2" -}} +{{- else -}} +{{- print "autoscaling/v2beta1" -}} +{{- end -}} +{{- else -}} +{{- print "autoscaling/v2" -}} +{{- end -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for deployment. +*/}} +{{- define "microservice.capabilities.deployment.apiVersion" -}} +{{- $kubeVersion := include "microservice.capabilities.kubeVersion" . -}} +{{- if and (not (empty $kubeVersion)) (semverCompare "<1.14-0" $kubeVersion) -}} +{{- print "extensions/v1beta1" -}} +{{- else -}} +{{- print "apps/v1" -}} +{{- end -}} +{{- end -}} diff --git a/charts/microservice/templates/_helpers.tpl b/charts/microservice/templates/_helpers.tpl index f825ae67..5556c262 100644 --- a/charts/microservice/templates/_helpers.tpl +++ b/charts/microservice/templates/_helpers.tpl @@ -5,8 +5,8 @@ Create a defautl fully qualified app name It will use the release name to give the app name */}} -{{- define "app.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 60 | trimSuffix "-" }} +{{- define "microservice.name" -}} +{{- default .Chart.Name .Values.global.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} {{/* @@ -14,47 +14,41 @@ Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). If release name contains chart name it will be used as a full name. */}} -{{- define "app.tempname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 60 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} -{{- define "app.fullname" -}} -{{- printf "%s-%s" ( include "app.tempname" . ) "app" | trunc 63 | trimSuffix "-" }} -{{- end }} +{{- define "microservice.fullname" -}} +{{- if .Values.global.fullnameOverride -}} +{{- .Values.global.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.global.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} {{/* Common labels */}} -{{- define "app.labels" -}} -app: {{ include "app.tempname" . }} +{{- define "microservice.labels" -}} +app: {{ include "microservice.fullname" . }} {{- end }} {{/* Selector labels */}} -{{- define "app.selectorLabels" -}} -app: {{ include "app.tempname" . }} -{{- end }}% - -{{/* -service name -*/}} -{{- define "app.servicename" -}} -{{- printf "%s-%s" ( include "app.tempname" . ) "svc" | trunc 63 | trimSuffix "-" }} -{{- end }}% +{{- define "microservice.selectorLabels" -}} +app: {{ include "microservice.fullname" . }} +{{- end }} {{/* -configmap name +Create the name of the service account to use */}} -{{- define "app.configmapname" -}} -{{- printf "%s-%s" ( include "app.tempname" . ) "cm" | trunc 63 | trimSuffix "-" }} -{{- end }}% +{{- define "microservice.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "microservice.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/microservice/templates/configmap.yaml b/charts/microservice/templates/configmap.yaml new file mode 100644 index 00000000..e420ac01 --- /dev/null +++ b/charts/microservice/templates/configmap.yaml @@ -0,0 +1,30 @@ +#ConfigMap mounted as volumes +{{- if .Values.deployment.volumes.configMaps }} +{{- if .Values.deployment.volumes.enabled }} +{{ $header := .Values.deployment.volumes.configFileCommonHeader | default "" }} +{{ $root := . }} +{{ range $cm := .Values.deployment.volumes.configMaps}} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "microservice.fullname" $root }}-{{ $cm.name }}-cm + namespace: {{ $root.Values.global.namespace | quote }} +data: + {{- if $cm.data }} + {{- range $filename, $content := $cm.data }} + # property-like keys; each key maps to a simple value + {{ $filename }}: |- +{{ $content | toString | indent 4}} + {{- end }} + {{- end }} + {{- if $cm.files }} + {{- range $file := $cm.files }} + {{ $file.destination }}: | +{{ $header | toString | indent 4 }} + {{ $root.Files.Get "$file.source" }} + {{- end}} + {{- end }} +{{- end }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/microservice/templates/deployment.yaml b/charts/microservice/templates/deployment.yaml index 4292f925..9bf469a8 100644 --- a/charts/microservice/templates/deployment.yaml +++ b/charts/microservice/templates/deployment.yaml @@ -1,24 +1,99 @@ -apiVersion: apps/v1 +{{ $root := . }} +--- +apiVersion: {{ include "microservice.capabilities.deployment.apiVersion" . }} kind: Deployment metadata: - name: {{ include "app.fullname" . }} + name: {{ include "microservice.fullname" . }}-app + namespace: {{ .Values.global.namespace | quote }} + {{- if .Values.annotations }} + annotations: + {{- range $key, $value := .Values.annotations }} + {{ $key }}: {{ $value }} + {{- end }} + {{- end }} labels: - {{- include "app.labels" . | nindent 4 }} + {{- include "microservice.labels" . | nindent 4 }} spec: - replicas: {{ .Values.replicaCount }} + replicas: {{ .Values.global.replicaCount }} selector: matchLabels: - {{- include "app.selectorLabels" . | nindent 6 }} + {{- include "microservice.selectorLabels" . | nindent 6 }} template: metadata: labels: - {{- include "app.selectorLabels" . | nindent 8 }} + {{- include "microservice.selectorLabels" . | nindent 8 }} spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "microservice.serviceAccountName" . }} containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} + - name: {{ include "microservice.fullname" . }} + image: "{{ .Values.deployment.image.name }}:{{ .Values.deployment.image.tag }}" + imagePullPolicy: {{ .Values.deployment.image.pullPolicy }} + {{- if .Values.deployment.command }} + command: {{ .Values.deployment.command }} + {{- end }} + {{- if .Values.deployment.args }} + args: {{ .Values.deployment.args }} + {{- end }} ports: - - name: http - containerPort: 80 - protocol: TCP + {{- range .Values.service.specs}} + - name: {{ .name }} + containerPort: {{ .targetPort | default .port}} + protocol: {{ .protocol | default "TCP" }} + {{- end }} + {{- if (merge .Values.global.environment .Values.deployment.environment) }} + env: + {{- range $name, $value := merge .Values.global.environment .Values.deployment.environment}} + - name: {{ $name | quote}} + value: {{ $value | quote }} + {{- end }} + {{- end }} + {{- if .Values.deployment.livenessProbe }} + livenessProbe: + {{- toYaml .Values.deployment.livenessProbe | nindent 12 }} + {{- end }} + {{- if .Values.deployment.readinessProbe }} + readinessProbe: + {{- toYaml .Values.deployment.readinessProbe | nindent 12 }} + {{- end }} + resources: + {{- toYaml .Values.deployment.resources | nindent 12 }} + {{- if .Values.deployment.volumes.enabled }} + volumeMounts: + {{- range $conf := .Values.deployment.volumes.configMaps }} + - mountPath: {{ $conf.mountPath }} + name: {{ include "microservice.fullname" $root }}-{{ $conf.name }}-cm + {{- end }} + {{- if .Values.deployment.volumes.pvc.enabled }} + - mountPath: {{ .Values.volumes.pvc.mountPath }} + name: {{ .Values.volumes.pvc.existing_claim | default .Values.volumes.pvc.name }}-volume + {{- end }} + {{- end }} + {{- if .Values.deployment.volumes.enabled }} + volumes: + {{- range $conf := .Values.deployment.volumes.configMaps }} + - name: {{ include "microservice.fullname" $root }}-{{ $conf.name }}-cm + configMap: + name: {{ include "microservice.fullname" $root }}-{{ $conf.name }}-cm + {{- end }} + {{- if .Values.deployment.volumes.pvc.enabled}} + - name: {{ .Values.deployment.volumes.pvc.existing_claim | default .Values.volumes.pvc.name }}-volume + persistentVolumeClaim: + claimName: {{ .Values.deployment.volumes.pvc.existing_claim | default .Values.volumes.pvc.name }} + {{- end}} + {{- end }} + {{- with .Values.deployment.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.deployment.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.deployment.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} \ No newline at end of file diff --git a/charts/microservice/templates/hpa.yaml b/charts/microservice/templates/hpa.yaml new file mode 100644 index 00000000..02db2f41 --- /dev/null +++ b/charts/microservice/templates/hpa.yaml @@ -0,0 +1,41 @@ +{{- if .Values.hpa.enabled }} +apiVersion: {{ include "microservice.capabilities.hpa.apiVersion" ( dict "context" $ ) }} +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "microservice.fullname" . }}-hpa + namespace: {{ .Values.global.namespace | quote }} + labels: + {{- include "microservice.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: {{ include "microservice.capabilities.deployment.apiVersion" . }} + kind: Deployment + name: {{ include "microservice.fullname" . }}-app + minReplicas: {{ .Values.hpa.minReplicas }} + maxReplicas: {{ .Values.hpa.maxReplicas }} + metrics: + {{- if .Values.hpa.targetMemory }} + - type: Resource + resource: + name: memory + {{- if semverCompare "<1.23-0" (include "microservice.capabilities.kubeVersion" .) }} + targetAverageUtilization: {{ .Values.hpa.targetMemory }} + {{- else }} + target: + type: Utilization + averageUtilization: {{ .Values.hpa.targetMemory }} + {{- end }} + {{- end }} + {{- if .Values.hpa.targetCPU }} + - type: Resource + resource: + name: cpu + {{- if semverCompare "<1.23-0" (include "microservice.capabilities.kubeVersion" .) }} + targetAverageUtilization: {{ .Values.hpa.targetCPU }} + {{- else }} + target: + type: Utilization + averageUtilization: {{ .Values.hpa.targetCPU }} + {{- end }} + {{- end }} +{{- end }} diff --git a/charts/microservice/templates/pvc.yaml b/charts/microservice/templates/pvc.yaml new file mode 100644 index 00000000..ce149caa --- /dev/null +++ b/charts/microservice/templates/pvc.yaml @@ -0,0 +1,21 @@ +{{- if .Values.deployment.volumes.pvc.enabled }} +{{- if .Values.deployment.volumes.pvc.existing_claim -}} +{{- else -}} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ .Values.deployment.volumes.pvc.name }} + namespace: {{ .Values.global.namespace | quote }} +spec: + {{- if .Values.deployment.volumes.pvc.class }} + storageClassName: {{ .Values.deployment.volumes.pvc.class }} + {{- end }} + accessModes: + {{- range $accessMode := .Values.deployment.volumes.pvc.accessModes }} + - {{ $accessMode }} + {{- end }} + resources: + requests: + storage: {{ .Values.deployment.volumes.pvc.size }} +{{- end }} +{{- end }} diff --git a/charts/microservice/templates/service.yaml b/charts/microservice/templates/service.yaml index 78d58947..08d9749f 100644 --- a/charts/microservice/templates/service.yaml +++ b/charts/microservice/templates/service.yaml @@ -1,15 +1,34 @@ +{{- $root:= . }} +--- apiVersion: v1 kind: Service metadata: - name: {{ include "app.servicename" . }} + name: {{ include "microservice.fullname" . }}-svc + namespace: {{ .Values.global.namespace | quote }} + {{- if .Values.service.annotations }} + annotations: + {{- range $key, $value := .Values.service.annotations }} + {{ $key }}: {{ $value }} + {{- end }} + {{- end }} labels: - {{- include "app.labels" . | nindent 4 }} + {{- include "microservice.labels" . | nindent 4 }} spec: type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http selector: - {{- include "app.selectorLabels" . | nindent 4 }} + {{- include "microservice.selectorLabels" . | nindent 4 }} + ports: + {{- range $spec := .Values.service.specs }} + - name: {{ $spec.name }} + port: {{ $spec.port }} + protocol: {{ $spec.protocol | default "TCP" }} + {{- if $spec.targetPort }} + targetPort: {{ $spec.targetPort }} + {{- else }} + targetPort: {{ $spec.name }} + {{- end}} + {{- if $spec.nodePort }} + nodePort: {{ $spec.nodePort }} + {{- end }} + {{- end -}} + diff --git a/charts/microservice/templates/serviceaccount.yaml b/charts/microservice/templates/serviceaccount.yaml new file mode 100644 index 00000000..d69c1171 --- /dev/null +++ b/charts/microservice/templates/serviceaccount.yaml @@ -0,0 +1,14 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "microservice.serviceAccountName" . }}-sa + namespace: {{ .Values.global.namespace | quote }} + labels: + {{- include "microservice.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automount }} +{{- end }} diff --git a/charts/microservice/values.yaml b/charts/microservice/values.yaml index 70374108..e3da4f73 100644 --- a/charts/microservice/values.yaml +++ b/charts/microservice/values.yaml @@ -1,12 +1,139 @@ -replicaCount: 1 +# -- global variables +global: + namespace: "default" + replicaCount: 1 + nameOverride: "" + fullnameOverride: "" + imagePullSecrets: [] + environment: {} + # list of key: value + # GLOBAL1: value -fullnameOverride: "nginx" -nameOverride: "" -image: - repository: nginx - pullPolicy: IfNotPresent - tag: "latest" +## @param kubeVersion Override Kubernetes version +## +kubeVersion: "" + +# -- Object that configures Deployment instance +deployment: + # -- Override default container image format + image: + name: "" + tag: "" + pullPolicy: IfNotPresent + + # Annotation for the Deployment + annotations: {} + + # livenessProbe: {} + livenessProbe: + # httpGet: + # path: "/" + # port: http + initialDelaySeconds: 250 + periodSeconds: 10 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 5 + + # readinessProbe: {} + readinessProbe: + # httpGet: + # path: "/" + # port: http + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 5 + + # command: ["/bin/sh","-c"] + # args: ["echo 'consuming a message'; sleep 5"] + + environment: {} + # VAR1: value1 + + resources: {} + + # resources: + # requests: + # memory: 100Mi + # cpu: 100m + # limits: + # memory: 100Mi + # cpu: 100m + + # Additional volumes on the output Deployment definition. + volumes: + enabled: true + pvc: + enabled: false + existing_claim: false + name: pvc + mountPath: /pv + size: 1G + class: "default" + accessModes: + - ReadWriteOnce + + # configFileCommonHeader: | + # line1 + # line2 + + configMaps: + # - name: test + # mountPath: /test + # data: + # test.conf: | + # hello + # hello2 + + # - name: test-from-file + # mountPath: /test2 + # files: + # - source: config.conf + # destination: application.conf + # - name: test-mixed + # mountPath: /test3 + # data: + # test2.conf: | + # another hello + # files: + # - source: config.conf + # destination: application2.conf + + # Additional volumeMounts on the output Deployment definition. + + volumeMounts: [] + # - name: foo + # mountPath: "/etc/foo" + # readOnly: true + + nodeSelector: {} + + tolerations: [] + + affinity: {} + +hpa: + enabled: true + minReplicas: 1 + maxReplicas: 1 + targetCPU: 80 + targetMemory: 80 service: type: ClusterIP - port: 80 + annotations: {} + specs: + - port: 80 + name: http + +serviceAccount: + create: false + # Automatically mount a ServiceAccount's API credentials? + automount: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: ""