Charts: Tidy up openstack-helm-infra charts

This moves the charts in openstack-helm-infra closer towards a
standard structure. It addresses multiple deviations, including:
missing resources for init containers, incorrect indents for
disabled resources in some charts, incorrect indents for volumes
and volumemounts added via values, missing resources for some
helm test templates, missing helm-toolkit image functions, and
moving the resource template declarations to be under the image
template declarations

Change-Id: I4834a5d476ef7fc69c5583caacc0229050f20a76
This commit is contained in:
Steve Wilkerson 2018-05-21 10:11:44 -07:00
parent d57d3344a5
commit de9c46bcfa
22 changed files with 98 additions and 97 deletions

View File

@ -42,9 +42,9 @@ spec:
containers: containers:
- name: curator - name: curator
{{ tuple $envAll "curator" | include "helm-toolkit.snippets.image" | indent 14 }} {{ tuple $envAll "curator" | include "helm-toolkit.snippets.image" | indent 14 }}
{{ tuple $envAll $envAll.Values.pod.resources.jobs.curator | include "helm-toolkit.snippets.kubernetes_resources" | indent 14 }}
command: command:
- /tmp/curator.sh - /tmp/curator.sh
{{ tuple $envAll $envAll.Values.pod.resources.jobs.curator | include "helm-toolkit.snippets.kubernetes_resources" | indent 14 }}
env: env:
- name: ELASTICSEARCH_HOST - name: ELASTICSEARCH_HOST
valueFrom: valueFrom:

View File

@ -83,10 +83,11 @@ spec:
initContainers: initContainers:
{{ tuple $envAll "elasticsearch_client" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "elasticsearch_client" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
- name: memory-map-increase - name: memory-map-increase
{{ tuple $envAll "memory_init" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.client | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
securityContext: securityContext:
privileged: true privileged: true
runAsUser: 0 runAsUser: 0
{{ tuple $envAll "memory_init" | include "helm-toolkit.snippets.image" | indent 10 }}
command: command:
- sysctl - sysctl
- -w - -w
@ -94,9 +95,9 @@ spec:
{{ if .Values.storage.filesystem_repository.enabled }} {{ if .Values.storage.filesystem_repository.enabled }}
- name: elasticsearch-repository-perms - name: elasticsearch-repository-perms
{{ tuple $envAll "elasticsearch" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "elasticsearch" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.client | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
securityContext: securityContext:
runAsUser: 0 runAsUser: 0
{{ tuple $envAll $envAll.Values.pod.resources.client | include "helm-toolkit.snippets.kubernetes_resources" | indent 8 }}
command: command:
- chown - chown
- -R - -R
@ -157,14 +158,14 @@ spec:
subPath: elasticsearch-host.conf subPath: elasticsearch-host.conf
readOnly: true readOnly: true
- name: elasticsearch-client - name: elasticsearch-client
{{ tuple $envAll "elasticsearch" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.client | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
securityContext: securityContext:
privileged: true privileged: true
capabilities: capabilities:
add: add:
- IPC_LOCK - IPC_LOCK
- SYS_RESOURCE - SYS_RESOURCE
{{ tuple $envAll "elasticsearch" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.client | include "helm-toolkit.snippets.kubernetes_resources" | indent 8 }}
command: command:
- /tmp/elasticsearch.sh - /tmp/elasticsearch.sh
- start - start

View File

@ -81,10 +81,11 @@ spec:
initContainers: initContainers:
{{ tuple $envAll "elasticsearch_master" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "elasticsearch_master" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
- name: memory-map-increase - name: memory-map-increase
{{ tuple $envAll "memory_init" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.master | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
securityContext: securityContext:
privileged: true privileged: true
runAsUser: 0 runAsUser: 0
{{ tuple $envAll "memory_init" | include "helm-toolkit.snippets.image" | indent 10 }}
command: command:
- sysctl - sysctl
- -w - -w
@ -92,9 +93,9 @@ spec:
{{ if .Values.storage.filesystem_repository.enabled }} {{ if .Values.storage.filesystem_repository.enabled }}
- name: elasticsearch-repository-perms - name: elasticsearch-repository-perms
{{ tuple $envAll "elasticsearch" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "elasticsearch" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.master | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
securityContext: securityContext:
runAsUser: 0 runAsUser: 0
{{ tuple $envAll $envAll.Values.pod.resources.client | include "helm-toolkit.snippets.kubernetes_resources" | indent 8 }}
command: command:
- chown - chown
- -R - -R

View File

@ -43,6 +43,7 @@ spec:
containers: containers:
- name: elasticsearch-exporter - name: elasticsearch-exporter
{{ tuple $envAll "prometheus_elasticsearch_exporter" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "prometheus_elasticsearch_exporter" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.exporter | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command: command:
- /tmp/elasticsearch-exporter.sh - /tmp/elasticsearch-exporter.sh
- start - start
@ -52,7 +53,6 @@ spec:
command: command:
- /tmp/elasticsearch-exporter.sh - /tmp/elasticsearch-exporter.sh
- stop - stop
{{ tuple $envAll $envAll.Values.pod.resources.exporter | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
env: env:
- name: ELASTICSEARCH_URI - name: ELASTICSEARCH_URI
valueFrom: valueFrom:

View File

@ -78,10 +78,11 @@ spec:
initContainers: initContainers:
{{ tuple $envAll "elasticsearch_data" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "elasticsearch_data" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
- name: memory-map-increase - name: memory-map-increase
{{ tuple $envAll "memory_init" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.data | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
securityContext: securityContext:
privileged: true privileged: true
runAsUser: 0 runAsUser: 0
{{ tuple $envAll "memory_init" | include "helm-toolkit.snippets.image" | indent 10 }}
command: command:
- sysctl - sysctl
- -w - -w
@ -89,9 +90,9 @@ spec:
{{ if .Values.storage.filesystem_repository.enabled }} {{ if .Values.storage.filesystem_repository.enabled }}
- name: elasticsearch-repository-perms - name: elasticsearch-repository-perms
{{ tuple $envAll "elasticsearch" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "elasticsearch" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.data | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
securityContext: securityContext:
runAsUser: 0 runAsUser: 0
{{ tuple $envAll $envAll.Values.pod.resources.client | include "helm-toolkit.snippets.kubernetes_resources" | indent 8 }}
command: command:
- chown - chown
- -R - -R
@ -103,14 +104,14 @@ spec:
{{ end }} {{ end }}
containers: containers:
- name: elasticsearch-data - name: elasticsearch-data
{{ tuple $envAll "elasticsearch" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.data | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
securityContext: securityContext:
privileged: true privileged: true
capabilities: capabilities:
add: add:
- IPC_LOCK - IPC_LOCK
- SYS_RESOURCE - SYS_RESOURCE
{{ tuple $envAll "elasticsearch" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.data | include "helm-toolkit.snippets.kubernetes_resources" | indent 8 }}
command: command:
- /tmp/elasticsearch.sh - /tmp/elasticsearch.sh
- start - start

View File

@ -87,9 +87,9 @@ spec:
containers: containers:
- name: kube-flannel - name: kube-flannel
{{ tuple $envAll "flannel" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "flannel" | include "helm-toolkit.snippets.image" | indent 10 }}
command: [ "/opt/bin/flanneld", "--ip-masq", "--kube-subnet-mgr" ]
securityContext: securityContext:
privileged: true privileged: true
command: [ "/opt/bin/flanneld", "--ip-masq", "--kube-subnet-mgr" ]
env: env:
- name: POD_NAME - name: POD_NAME
valueFrom: valueFrom:

View File

@ -95,8 +95,7 @@ spec:
{{ tuple $envAll "fluentbit" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "fluentbit" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: fluentbit - name: fluentbit
image: {{ .Values.images.tags.fluentbit }} {{ tuple $envAll "fluentbit" | include "helm-toolkit.snippets.image" | indent 10 }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{ tuple $envAll $envAll.Values.pod.resources.fluentbit | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} {{ tuple $envAll $envAll.Values.pod.resources.fluentbit | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command: command:
- /tmp/fluent-bit.sh - /tmp/fluent-bit.sh
@ -123,7 +122,7 @@ spec:
mountPath: /fluent-bit/etc/parsers.conf mountPath: /fluent-bit/etc/parsers.conf
subPath: parsers.conf subPath: parsers.conf
readOnly: true readOnly: true
{{ if $mounts_fluentbit.volumeMounts }}{{ toYaml $mounts_fluentbit.volumeMounts | indent 8 }}{{ end }} {{ if $mounts_fluentbit.volumeMounts }}{{ toYaml $mounts_fluentbit.volumeMounts | indent 12 }}{{ end }}
volumes: volumes:
- name: varlog - name: varlog
hostPath: hostPath:

View File

@ -97,8 +97,7 @@ spec:
{{ tuple $envAll "fluentd" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "fluentd" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: fluentd - name: fluentd
image: {{ .Values.images.tags.fluentd }} {{ tuple $envAll "fluentd" | include "helm-toolkit.snippets.image" | indent 10 }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{ tuple $envAll $envAll.Values.pod.resources.fluentd | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} {{ tuple $envAll $envAll.Values.pod.resources.fluentd | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command: command:
- /tmp/fluentd.sh - /tmp/fluentd.sh

View File

@ -41,8 +41,7 @@ spec:
{{ tuple $envAll "elasticsearch_template" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "elasticsearch_template" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: elasticsearch-template - name: elasticsearch-template
image: {{ .Values.images.tags.elasticsearch_template }} {{ tuple $envAll "elasticsearch_template" | include "helm-toolkit.snippets.image" | indent 10 }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{ tuple $envAll $envAll.Values.pod.resources.jobs.elasticsearch_template | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} {{ tuple $envAll $envAll.Values.pod.resources.jobs.elasticsearch_template | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
env: env:
- name: ELASTICSEARCH_HOST - name: ELASTICSEARCH_HOST
@ -70,7 +69,7 @@ spec:
mountPath: /tmp/template.xml.raw mountPath: /tmp/template.xml.raw
subPath: template.xml.raw subPath: template.xml.raw
readOnly: true readOnly: true
{{ if $mounts_elasticsearch_template.volumeMounts }}{{ toYaml $mounts_elasticsearch_template.volumeMounts | indent 10 }}{{ end }} {{ if $mounts_elasticsearch_template.volumeMounts }}{{ toYaml $mounts_elasticsearch_template.volumeMounts | indent 12 }}{{ end }}
volumes: volumes:
- name: fluent-logging-bin - name: fluent-logging-bin
configMap: configMap:
@ -80,5 +79,5 @@ spec:
configMap: configMap:
name: fluent-logging-etc name: fluent-logging-etc
defaultMode: 0666 defaultMode: 0666
{{ if $mounts_elasticsearch_template.volumes }}{{ toYaml $mounts_elasticsearch_template.volumes | indent 6 }}{{ end }} {{ if $mounts_elasticsearch_template.volumes }}{{ toYaml $mounts_elasticsearch_template.volumes | indent 8 }}{{ end }}
{{- end }} {{- end }}

View File

@ -44,8 +44,7 @@ spec:
{{ tuple $envAll "prometheus_fluentd_exporter" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "prometheus_fluentd_exporter" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: fluentd-exporter - name: fluentd-exporter
image: {{ .Values.images.tags.prometheus_fluentd_exporter }} {{ tuple $envAll "prometheus_fluentd_exporter" | include "helm-toolkit.snippets.image" | indent 10 }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{ tuple $envAll $envAll.Values.pod.resources.prometheus_fluentd_exporter | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} {{ tuple $envAll $envAll.Values.pod.resources.prometheus_fluentd_exporter | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command: command:
- /tmp/fluentd-exporter.sh - /tmp/fluentd-exporter.sh

View File

@ -29,6 +29,7 @@ spec:
containers: containers:
- name: {{.Release.Name}}-helm-tests - name: {{.Release.Name}}-helm-tests
{{ tuple $envAll "helm_tests" | include "helm-toolkit.snippets.image" | indent 6 }} {{ tuple $envAll "helm_tests" | include "helm-toolkit.snippets.image" | indent 6 }}
{{ tuple $envAll $envAll.Values.pod.resources.jobs.tests | include "helm-toolkit.snippets.kubernetes_resources" | indent 6 }}
command: command:
- /tmp/helm-tests.sh - /tmp/helm-tests.sh
env: env:

View File

@ -72,34 +72,34 @@ spec:
- name: PROMETHEUS_URL - name: PROMETHEUS_URL
value: {{ tuple "monitoring" "internal" "api" $envAll | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" }} value: {{ tuple "monitoring" "internal" "api" $envAll | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" }}
volumeMounts: volumeMounts:
- name: pod-etc-grafana - name: pod-etc-grafana
mountPath: /etc/grafana mountPath: /etc/grafana
- name: pod-provisioning-grafana - name: pod-provisioning-grafana
mountPath: /var/lib/grafana/provisioning mountPath: /var/lib/grafana/provisioning
- name: grafana-bin - name: grafana-bin
mountPath: /tmp/grafana.sh mountPath: /tmp/grafana.sh
subPath: grafana.sh subPath: grafana.sh
readOnly: true readOnly: true
- name: grafana-etc - name: grafana-etc
mountPath: /var/lib/grafana/provisioning/dashboards/dashboards.yaml mountPath: /var/lib/grafana/provisioning/dashboards/dashboards.yaml
subPath: dashboards.yaml subPath: dashboards.yaml
- name: grafana-etc - name: grafana-etc
mountPath: /var/lib/grafana/provisioning/datasources/datasources.yaml mountPath: /var/lib/grafana/provisioning/datasources/datasources.yaml
subPath: datasources.yaml subPath: datasources.yaml
- name: grafana-etc - name: grafana-etc
mountPath: /etc/grafana/grafana.ini mountPath: /etc/grafana/grafana.ini
subPath: grafana.ini subPath: grafana.ini
- name: grafana-etc - name: grafana-etc
mountPath: /etc/grafana/ldap.toml mountPath: /etc/grafana/ldap.toml
subPath: ldap.toml subPath: ldap.toml
- name: data - name: data
mountPath: /var/lib/grafana/data mountPath: /var/lib/grafana/data
{{- range $key, $value := .Values.conf.dashboards }} {{- range $key, $value := .Values.conf.dashboards }}
- name: grafana-etc - name: grafana-etc
mountPath: /var/lib/grafana/dashboards/{{$key}}.json mountPath: /var/lib/grafana/dashboards/{{$key}}.json
subPath: {{$key}}.json subPath: {{$key}}.json
{{- end }} {{- end }}
{{ if $mounts_grafana.volumeMounts }}{{ toYaml $mounts_grafana.volumeMounts | indent 10 }}{{ end }} {{ if $mounts_grafana.volumeMounts }}{{ toYaml $mounts_grafana.volumeMounts | indent 12 }}{{ end }}
volumes: volumes:
- name: pod-etc-grafana - name: pod-etc-grafana
emptyDir: {} emptyDir: {}

View File

@ -54,13 +54,13 @@ spec:
command: command:
- /tmp/db-init.py - /tmp/db-init.py
volumeMounts: volumeMounts:
- name: grafana-bin - name: grafana-bin
mountPath: /tmp/db-init.py mountPath: /tmp/db-init.py
subPath: db-init.py subPath: db-init.py
readOnly: true readOnly: true
volumes: volumes:
- name: grafana-bin - name: grafana-bin
configMap: configMap:
name: grafana-bin name: grafana-bin
defaultMode: 0555 defaultMode: 0555
{{- end }} {{- end }}

View File

@ -54,13 +54,13 @@ spec:
command: command:
- /tmp/db-init.py - /tmp/db-init.py
volumeMounts: volumeMounts:
- name: grafana-bin - name: grafana-bin
mountPath: /tmp/db-init.py mountPath: /tmp/db-init.py
subPath: db-init.py subPath: db-init.py
readOnly: true readOnly: true
volumes: volumes:
- name: grafana-bin - name: grafana-bin
configMap: configMap:
name: grafana-bin name: grafana-bin
defaultMode: 0555 defaultMode: 0555
{{- end }} {{- end }}

View File

@ -49,13 +49,13 @@ spec:
command: command:
- /tmp/db-session-sync.py - /tmp/db-session-sync.py
volumeMounts: volumeMounts:
- name: grafana-bin - name: grafana-bin
mountPath: /tmp/db-session-sync.py mountPath: /tmp/db-session-sync.py
subPath: db-session-sync.py subPath: db-session-sync.py
readOnly: true readOnly: true
volumes: volumes:
- name: grafana-bin - name: grafana-bin
configMap: configMap:
name: grafana-bin name: grafana-bin
defaultMode: 0555 defaultMode: 0555
{{- end }} {{- end }}

View File

@ -31,6 +31,7 @@ spec:
containers: containers:
- name: kubernetes-keystone-webhook - name: kubernetes-keystone-webhook
{{ tuple $envAll "kubernetes_keystone_webhook" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "kubernetes_keystone_webhook" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.server | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command: command:
- /tmp/start.sh - /tmp/start.sh
readinessProbe: readinessProbe:
@ -41,7 +42,6 @@ spec:
ports: ports:
- name: k8sksauth-pub - name: k8sksauth-pub
containerPort: {{ tuple "kubernetes_keystone_webhook" "internal" "api" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }} containerPort: {{ tuple "kubernetes_keystone_webhook" "internal" "api" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{ tuple $envAll $envAll.Values.pod.resources.server | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
volumeMounts: volumeMounts:
- name: etc-kubernetes-keystone-webhook - name: etc-kubernetes-keystone-webhook
mountPath: /etc/kubernetes-keystone-webhook mountPath: /etc/kubernetes-keystone-webhook

View File

@ -38,7 +38,8 @@ spec:
{{ tuple $envAll "tests" $mounts_kubernetes_keystone_webhook_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "tests" $mounts_kubernetes_keystone_webhook_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: {{ $envAll.Release.Name }}-kubernetes-keystone-webhook-test - name: {{ $envAll.Release.Name }}-kubernetes-keystone-webhook-test
image: {{ $envAll.Values.images.tags.scripted_test }} {{ tuple $envAll "scripted_test" | include "helm-toolkit.snippets.image" | indent 6 }}
{{ tuple $envAll $envAll.Values.pod.resources.jobs.tests | include "helm-toolkit.snippets.kubernetes_resources" | indent 6 }}
env: env:
- name: WEBHOOK_URL - name: WEBHOOK_URL
value: {{ tuple "kubernetes_keystone_webhook" "internal" "api" $envAll | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | quote }} value: {{ tuple "kubernetes_keystone_webhook" "internal" "api" $envAll | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | quote }}

View File

@ -48,9 +48,9 @@ spec:
{{ tuple $envAll "alertmanager" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "alertmanager" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
- name: alertmanager-perms - name: alertmanager-perms
{{ tuple $envAll "alertmanager" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "alertmanager" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.alertmanager | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
securityContext: securityContext:
runAsUser: 0 runAsUser: 0
{{ tuple $envAll $envAll.Values.pod.resources.alertmanager | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command: command:
- chown - chown
- -R - -R
@ -62,6 +62,7 @@ spec:
containers: containers:
- name: alertmanager - name: alertmanager
{{ tuple $envAll "alertmanager" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "alertmanager" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.alertmanager | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command: command:
- /tmp/alertmanager.sh - /tmp/alertmanager.sh
- start - start
@ -71,7 +72,6 @@ spec:
command: command:
- /tmp/alertmanager.sh - /tmp/alertmanager.sh
- stop - stop
{{ tuple $envAll $envAll.Values.pod.resources.alertmanager | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
env: env:
- name: DISCOVERY_SVC - name: DISCOVERY_SVC
value: {{ tuple "alerts" "discovery" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }} value: {{ tuple "alerts" "discovery" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}

View File

@ -56,6 +56,7 @@ spec:
containers: containers:
- name: node-exporter - name: node-exporter
{{ tuple $envAll "node_exporter" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "node_exporter" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.node_exporter | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
args: args:
- --collector.ntp - --collector.ntp
- --collector.ntp.server={{ .Values.conf.ntp_server_ip }} - --collector.ntp.server={{ .Values.conf.ntp_server_ip }}
@ -67,7 +68,6 @@ spec:
- name: metrics - name: metrics
containerPort: {{ tuple "node_metrics" "internal" "metrics" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} containerPort: {{ tuple "node_metrics" "internal" "metrics" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
hostPort: {{ tuple "node_metrics" "internal" "metrics" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} hostPort: {{ tuple "node_metrics" "internal" "metrics" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{ tuple $envAll $envAll.Values.pod.resources.node_exporter | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
volumeMounts: volumeMounts:
- name: proc - name: proc
mountPath: /host/proc mountPath: /host/proc

View File

@ -39,9 +39,9 @@ spec:
containers: containers:
- name: prometheus-openstack-exporter-ks-user - name: prometheus-openstack-exporter-ks-user
{{ tuple $envAll "ks_user" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "ks_user" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.jobs.ks_user | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command: command:
- /tmp/ks-user.sh - /tmp/ks-user.sh
{{ tuple $envAll $envAll.Values.pod.resources.jobs.ks_user | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
volumeMounts: volumeMounts:
- name: ks-user-sh - name: ks-user-sh
mountPath: /tmp/ks-user.sh mountPath: /tmp/ks-user.sh

View File

@ -89,9 +89,9 @@ spec:
{{ tuple $envAll "prometheus" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "prometheus" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
- name: prometheus-perms - name: prometheus-perms
{{ tuple $envAll "prometheus" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "prometheus" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.prometheus | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
securityContext: securityContext:
runAsUser: 0 runAsUser: 0
{{ tuple $envAll $envAll.Values.pod.resources.prometheus | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command: command:
- chown - chown
- -R - -R
@ -103,6 +103,7 @@ spec:
containers: containers:
- name: prometheus - name: prometheus
{{ tuple $envAll "prometheus" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "prometheus" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.prometheus | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command: command:
- /tmp/prometheus.sh - /tmp/prometheus.sh
- start - start
@ -112,7 +113,6 @@ spec:
command: command:
- /tmp/prometheus.sh - /tmp/prometheus.sh
- stop - stop
{{ tuple $envAll $envAll.Values.pod.resources.prometheus | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
ports: ports:
- name: prom-metrics - name: prom-metrics
containerPort: {{ tuple "monitoring" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} containerPort: {{ tuple "monitoring" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}

View File

@ -41,20 +41,20 @@ spec:
initContainers: initContainers:
{{ tuple $envAll "registry_proxy" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "registry_proxy" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: registry-proxy - name: registry-proxy
{{ tuple $envAll "registry_proxy" | include "helm-toolkit.snippets.image" | indent 8 }} {{ tuple $envAll "registry_proxy" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.registry_proxy | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} {{ tuple $envAll $envAll.Values.pod.resources.registry_proxy | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command: command:
- /tmp/registry-proxy.sh - /tmp/registry-proxy.sh
volumeMounts: volumeMounts:
- name: registry-bin - name: registry-bin
mountPath: /tmp/registry-proxy.sh mountPath: /tmp/registry-proxy.sh
subPath: registry-proxy.sh subPath: registry-proxy.sh
readOnly: true readOnly: true
- name: registry-etc - name: registry-etc
mountPath: /etc/nginx/conf.d/default.conf mountPath: /etc/nginx/conf.d/default.conf
subPath: default.conf subPath: default.conf
readOnly: true readOnly: true
volumes: volumes:
- name: registry-bin - name: registry-bin
configMap: configMap: