Compare commits

...

2 Commits

Author SHA1 Message Date
Jonas Forsberg
4f2a9ba9b7 . 2024-10-19 11:23:43 +02:00
Jonas Forsberg
dd11ed2197 fixed default varable 2024-10-19 11:09:04 +02:00
5 changed files with 23 additions and 11 deletions

View File

@ -45,7 +45,7 @@ The following table lists the configurable parameters of the Lib chart and their
| `autoscaling.targetCPUUtilizationPercentage` | | `80` | | `autoscaling.targetCPUUtilizationPercentage` | | `80` |
| `secrets` | Secrets that needs to be created | `{}` | | `secrets` | Secrets that needs to be created | `{}` |
| `configs` | ConfigMaps that needs to be created | `{}` | | `configs` | ConfigMaps that needs to be created | `{}` |
| `env.TZ` | | `"Europe/Stockholm"` | | `env` | environment variables the controller should have | `[{"name": "TZ", "value": "Europe/Stockholm"}]` |
| `volumes` | | `[]` | | `volumes` | | `[]` |
| `volumeMounts` | | `[]` | | `volumeMounts` | | `[]` |
| `volumeClaimTemplates` | used for statefulset https://kubernetes.io/docs/concepts/workloads/controllers/statefulset | `[]` | | `volumeClaimTemplates` | used for statefulset https://kubernetes.io/docs/concepts/workloads/controllers/statefulset | `[]` |

View File

@ -44,18 +44,23 @@ spec:
{{- range $k, $v := $values.ports }} {{- range $k, $v := $values.ports }}
- name: {{ $k }} - name: {{ $k }}
containerPort: {{ default $v.port $v.targetPort }} containerPort: {{ default $v.port $v.targetPort }}
protocol: {{ default "HTTP" $v.protocol }}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- end }} {{- end }}
env: env:
{{- include "lib.environmentVariables" . | default "[]" | nindent 12 }} {{- include "lib.environmentVariables" . | default "[]" | nindent 12 }}
{{- with .Values.livenessProbe }}
livenessProbe: livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }} {{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.readinessProbe }}
readinessProbe: readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }} {{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.resources }}
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.volumeMounts }} {{- with .Values.volumeMounts }}
volumeMounts: volumeMounts:
{{- toYaml . | nindent 12 }} {{- toYaml . | nindent 12 }}

View File

@ -19,7 +19,7 @@ spec:
{{- range $k, $v := $values.ports }} {{- range $k, $v := $values.ports }}
- port: {{ $v.port }} - port: {{ $v.port }}
targetPort: {{ default $v.port $v.targetPort }} targetPort: {{ default $v.port $v.targetPort }}
protocol: {{ default "HTTP" $v.protocol }} protocol: {{ default "TCP" $v.protocol }}
name: {{ $k }} name: {{ $k }}
{{- end }} {{- end }}
selector: selector:

View File

@ -46,18 +46,24 @@ spec:
{{- range $k, $v := $values.ports }} {{- range $k, $v := $values.ports }}
- name: {{ $k }} - name: {{ $k }}
containerPort: {{ $v.targetPort | default $v.port }} containerPort: {{ $v.targetPort | default $v.port }}
protocol: {{ $v.protocol }} protocol: {{ default "TCP" $v.protocol }}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- end }} {{- end }}
env: env:
{{- include "lib.environmentVariables" . | default "[]" | nindent 12 }} {{- include "lib.environmentVariables" . | default "[]" | nindent 12 }}
{{- with .Values.livenessProbe }}
livenessProbe: livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }} {{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.readinessProbe }}
readinessProbe: readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }} {{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.resources }}
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts: volumeMounts:
{{- range $i, $values := .Values.volumeClaimTemplates }} {{- range $i, $values := .Values.volumeClaimTemplates }}
- name: {{ $values.name }} - name: {{ $values.name }}

View File

@ -99,7 +99,8 @@ configs: {} # ConfigMaps that needs to be created
# KEY: VALUE # KEY: VALUE
env: # environment variables the controller should have env: # environment variables the controller should have
TZ: Europe/Stockholm - name: TZ
value: Europe/Stockholm
# Additional volumes on the output Deployment definition. # Additional volumes on the output Deployment definition.
volumes: [] volumes: []
# - name: foo # - name: foo