Merge "Helm-Toolkit: Kubernetes Entrypoint, simplify image dependencies"

This commit is contained in:
Zuul 2018-04-17 15:11:00 +00:00 committed by Gerrit Code Review
commit 626b94e0c8
57 changed files with 139 additions and 283 deletions

View File

@ -16,15 +16,9 @@ limitations under the License.
{{- if .Values.manifests.daemonset_calico_etcd }} {{- if .Values.manifests.daemonset_calico_etcd }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" dict -}}
{{- $_ := include "helm-toolkit.utils.merge" (tuple .Values.pod_dependency .Values.dependencies.static.etcd .Values.dependencies.dynamic.common.local_image_registry) -}}
{{- else -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.etcd -}}
{{- end -}}
{{- $serviceAccountName := "calico-etcd"}} {{- $serviceAccountName := "calico-etcd"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "etcd" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
# This manifest installs the Calico etcd on the kubeadm master. This uses a DaemonSet # This manifest installs the Calico etcd on the kubeadm master. This uses a DaemonSet
# to force it to run on the master even when the master isn't schedulable, and uses # to force it to run on the master even when the master isn't schedulable, and uses
@ -60,7 +54,7 @@ spec:
node-role.kubernetes.io/master: "" node-role.kubernetes.io/master: ""
hostNetwork: true hostNetwork: true
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "etcd" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: calico-etcd - name: calico-etcd
{{ tuple $envAll "calico_etcd" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "calico_etcd" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -33,17 +33,10 @@ limitations under the License.
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" dict -}}
{{- $_ := include "helm-toolkit.utils.merge" (tuple .Values.pod_dependency .Values.dependencies.static.calico_node .Values.dependencies.dynamic.common.local_image_registry) -}}
{{- else -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.calico_node -}}
{{- end -}}
{{- $prometheus_annotations := $envAll.Values.monitoring.prometheus.calico_node }} {{- $prometheus_annotations := $envAll.Values.monitoring.prometheus.calico_node }}
{{- $serviceAccountName := printf "%s-%s" .Release.Name "calico-cni-plugin"}} {{- $serviceAccountName := printf "%s-%s" .Release.Name "calico-cni-plugin"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "calico_node" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding kind: ClusterRoleBinding
@ -111,7 +104,7 @@ spec:
serviceAccountName: {{ $serviceAccountName }} serviceAccountName: {{ $serviceAccountName }}
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.node.timeout | default "30" }} terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.node.timeout | default "30" }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "calico_node" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
{{ if .Values.manifests.daemonset_calico_node_calicoctl }} {{ if .Values.manifests.daemonset_calico_node_calicoctl }}
- name: install-calicoctl - name: install-calicoctl
{{ tuple $envAll "calico_ctl" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "calico_ctl" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -16,15 +16,9 @@ limitations under the License.
{{- if .Values.manifests.deployment_calico_kube_policy_controllers }} {{- if .Values.manifests.deployment_calico_kube_policy_controllers }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" dict -}}
{{- $_ := include "helm-toolkit.utils.merge" (tuple .Values.pod_dependency .Values.dependencies.static.calico_kube_policy_controllers .Values.dependencies.dynamic.common.local_image_registry) -}}
{{- else -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.calico_kube_policy_controllers -}}
{{- end -}}
{{- $serviceAccountName := printf "%s-%s" .Release.Name "calico-kube-controllers"}} {{- $serviceAccountName := printf "%s-%s" .Release.Name "calico-kube-controllers"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "calico_kube_policy_controllers" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding kind: ClusterRoleBinding
@ -102,7 +96,7 @@ spec:
operator: Exists operator: Exists
serviceAccountName: {{ $serviceAccountName }} serviceAccountName: {{ $serviceAccountName }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "calico_kube_policy_controllers" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.policy_controller.timeout | default "30" }} terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.policy_controller.timeout | default "30" }}
containers: containers:
- name: calico-policy-controller - name: calico-policy-controller

View File

@ -16,10 +16,9 @@ limitations under the License.
{{- if .Values.manifests.job_calico_settings }} {{- if .Values.manifests.job_calico_settings }}
{{- $envAll := . }} {{- $envAll := . }}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.calico_settings -}}
{{- $serviceAccountName := "calico-settings"}} {{- $serviceAccountName := "calico-settings"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "calico_settings" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
@ -47,7 +46,7 @@ spec:
serviceAccountName: {{ $serviceAccountName }} serviceAccountName: {{ $serviceAccountName }}
restartPolicy: OnFailure restartPolicy: OnFailure
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "calico_settings" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: calico-settings - name: calico-settings
{{ tuple $envAll "calico_settings" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "calico_settings" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -17,10 +17,9 @@ limitations under the License.
{{- if .Values.manifests.job_image_repo_sync }} {{- if .Values.manifests.job_image_repo_sync }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}} {{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.image_repo_sync -}}
{{- $serviceAccountName := "calico-image-repo-sync"}} {{- $serviceAccountName := "calico-image-repo-sync"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "image_repo_sync" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
@ -37,7 +36,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "image_repo_sync" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: image-repo-sync - name: image-repo-sync
{{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -139,6 +139,10 @@ dependencies:
service: etcd service: etcd
etcd: etcd:
services: null services: null
image_repo_sync:
services:
- endpoint: internal
service: local_image_registry
endpoints: endpoints:
cluster_domain_suffix: cluster.local cluster_domain_suffix: cluster.local

View File

@ -16,10 +16,9 @@ limitations under the License.
{{- if .Values.manifests.cron_curator }} {{- if .Values.manifests.cron_curator }}
{{- $envAll := . }} {{- $envAll := . }}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.curator -}}
{{- $serviceAccountName := "elastic-curator"}} {{- $serviceAccountName := "elastic-curator"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "curator" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: batch/v1beta1 apiVersion: batch/v1beta1
kind: CronJob kind: CronJob
@ -37,7 +36,7 @@ spec:
serviceAccountName: {{ $serviceAccountName }} serviceAccountName: {{ $serviceAccountName }}
restartPolicy: OnFailure restartPolicy: OnFailure
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 12 }} {{ tuple $envAll "curator" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 12 }}
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 }}

View File

@ -16,18 +16,13 @@ limitations under the License.
{{- if .Values.manifests.deployment_client }} {{- if .Values.manifests.deployment_client }}
{{- $envAll := . }} {{- $envAll := . }}
{{- $esUserSecret := .Values.secrets.elasticsearch.user }} {{- $esUserSecret := .Values.secrets.elasticsearch.user }}
{{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" dict -}}
{{- $_ := include "helm-toolkit.utils.merge" (tuple .Values.pod_dependency .Values.dependencies.static.elasticsearch_client .Values.dependencies.dynamic.common.local_image_registry) -}}
{{- else -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.elasticsearch_client -}}
{{- end -}}
{{- $mounts_elasticsearch := .Values.pod.mounts.elasticsearch.elasticsearch }} {{- $mounts_elasticsearch := .Values.pod.mounts.elasticsearch.elasticsearch }}
{{- $serviceAccountName := printf "%s-%s" .Release.Name "elasticsearch-client"}} {{- $serviceAccountName := printf "%s-%s" .Release.Name "elasticsearch-client"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "elasticsearch_client" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding kind: ClusterRoleBinding
@ -86,7 +81,7 @@ spec:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.client.timeout | default "600" }} terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.client.timeout | default "600" }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency 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
securityContext: securityContext:
privileged: true privileged: true

View File

@ -16,17 +16,11 @@ limitations under the License.
{{- if .Values.manifests.deployment_master }} {{- if .Values.manifests.deployment_master }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" dict -}}
{{- $_ := include "helm-toolkit.utils.merge" (tuple .Values.pod_dependency .Values.dependencies.static.elasticsearch_master .Values.dependencies.dynamic.common.local_image_registry) -}}
{{- else -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.elasticsearch_master -}}
{{- end -}}
{{- $mounts_elasticsearch := .Values.pod.mounts.elasticsearch.elasticsearch }} {{- $mounts_elasticsearch := .Values.pod.mounts.elasticsearch.elasticsearch }}
{{- $serviceAccountName := "elasticsearch-master"}} {{- $serviceAccountName := "elasticsearch-master"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "elasticsearch_master" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding kind: ClusterRoleBinding
@ -85,7 +79,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency 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
securityContext: securityContext:
privileged: true privileged: true

View File

@ -17,10 +17,9 @@ limitations under the License.
{{- if .Values.manifests.job_image_repo_sync }} {{- if .Values.manifests.job_image_repo_sync }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}} {{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.image_repo_sync -}}
{{- $serviceAccountName := "elasticsearch-image-repo-sync"}} {{- $serviceAccountName := "elasticsearch-image-repo-sync"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "image_repo_sync" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
@ -37,7 +36,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "image_repo_sync" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: image-repo-sync - name: image-repo-sync
{{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -17,11 +17,11 @@ limitations under the License.
{{- if .Values.manifests.job_snapshot_repository }} {{- if .Values.manifests.job_snapshot_repository }}
{{- if .Values.conf.elasticsearch.repository.enabled }} {{- if .Values.conf.elasticsearch.repository.enabled }}
{{- $envAll := . }} {{- $envAll := . }}
{{- $esUserSecret := .Values.secrets.elasticsearch.user }} {{- $esUserSecret := .Values.secrets.elasticsearch.user }}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.snapshot_repository -}}
{{- $serviceAccountName := "elasticsearch-register-snapshot-repository" }} {{- $serviceAccountName := "elasticsearch-register-snapshot-repository" }}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "snapshot_repository" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
@ -38,7 +38,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "snapshot_repository" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: register-snapshot-repository - name: register-snapshot-repository
{{ tuple $envAll "snapshot_repository" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "snapshot_repository" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -16,16 +16,11 @@ limitations under the License.
{{- if and .Values.manifests.monitoring.prometheus.deployment_exporter .Values.monitoring.prometheus.enabled }} {{- if and .Values.manifests.monitoring.prometheus.deployment_exporter .Values.monitoring.prometheus.enabled }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" (merge .Values.dependencies.static.prometheus_elasticsearch_exporter .Values.dependencies.dynamic.common.local_image_registry) -}}
{{- else -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.prometheus_elasticsearch_exporter -}}
{{- end -}}
{{- $esUserSecret := .Values.secrets.elasticsearch.user }} {{- $esUserSecret := .Values.secrets.elasticsearch.user }}
{{- $serviceAccountName := "prometheus-elasticsearch-exporter" }} {{- $serviceAccountName := "prometheus-elasticsearch-exporter" }}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "prometheus_elasticsearch_exporter" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment
@ -44,7 +39,7 @@ spec:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.prometheus_elasticsearch_exporter.timeout | default "30" }} terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.prometheus_elasticsearch_exporter.timeout | default "30" }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "prometheus_elasticsearch_exporter" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
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 }}

View File

@ -16,17 +16,11 @@ limitations under the License.
{{- if .Values.manifests.statefulset_data }} {{- if .Values.manifests.statefulset_data }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" dict -}}
{{- $_ := include "helm-toolkit.utils.merge" (tuple .Values.pod_dependency .Values.dependencies.static.elasticsearch_data .Values.dependencies.dynamic.common.local_image_registry) -}}
{{- else -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.elasticsearch_data -}}
{{- end -}}
{{- $mounts_elasticsearch := .Values.pod.mounts.elasticsearch.elasticsearch }} {{- $mounts_elasticsearch := .Values.pod.mounts.elasticsearch.elasticsearch }}
{{- $serviceAccountName := printf "%s-%s" .Release.Name "elasticsearch-data"}} {{- $serviceAccountName := printf "%s-%s" .Release.Name "elasticsearch-data"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "elasticsearch_data" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding kind: ClusterRoleBinding
@ -82,7 +76,7 @@ spec:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.data.timeout | default "600" }} terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.data.timeout | default "600" }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency 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
securityContext: securityContext:
privileged: true privileged: true

View File

@ -16,15 +16,9 @@ limitations under the License.
{{- if .Values.manifests.daemonset_kube_flannel_ds }} {{- if .Values.manifests.daemonset_kube_flannel_ds }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" dict -}}
{{- $_ := include "helm-toolkit.utils.merge" (tuple .Values.pod_dependency .Values.dependencies.static.flannel .Values.dependencies.dynamic.common.local_image_registry) -}}
{{- else -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.flannel -}}
{{- end -}}
{{- $serviceAccountName := printf "%s-%s" .Release.Name "flannel"}} {{- $serviceAccountName := printf "%s-%s" .Release.Name "flannel"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "flannel" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
kind: ClusterRole kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1beta1
@ -89,7 +83,7 @@ spec:
effect: NoSchedule effect: NoSchedule
serviceAccountName: {{ $serviceAccountName }} serviceAccountName: {{ $serviceAccountName }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "flannel" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
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 }}

View File

@ -17,10 +17,9 @@ limitations under the License.
{{- if .Values.manifests.job_image_repo_sync }} {{- if .Values.manifests.job_image_repo_sync }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}} {{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.image_repo_sync -}}
{{- $serviceAccountName := "flannel-image-repo-sync"}} {{- $serviceAccountName := "flannel-image-repo-sync"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "image_repo_sync" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
@ -37,7 +36,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "image_repo_sync" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: image-repo-sync - name: image-repo-sync
{{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -16,18 +16,11 @@ limitations under the License.
{{- if .Values.manifests.daemonset_fluentbit }} {{- if .Values.manifests.daemonset_fluentbit }}
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.static.fluentbit }}
{{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" dict -}}
{{- $_ := include "helm-toolkit.utils.merge" (tuple .Values.pod_dependency .Values.dependencies.static.fluentbit .Values.dependencies.dynamic.common.local_image_registry) -}}
{{- else -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.fluentbit -}}
{{- end -}}
{{- $mounts_fluentbit := .Values.pod.mounts.fluentbit.fluentbit }} {{- $mounts_fluentbit := .Values.pod.mounts.fluentbit.fluentbit }}
{{- $serviceAccountName := printf "%s-%s" .Release.Name "fluentbit" }} {{- $serviceAccountName := printf "%s-%s" .Release.Name "fluentbit" }}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "fluentbit" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding kind: ClusterRoleBinding
@ -99,7 +92,7 @@ spec:
hostPID: true hostPID: true
dnsPolicy: ClusterFirstWithHostNet dnsPolicy: ClusterFirstWithHostNet
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency 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 }} image: {{ .Values.images.tags.fluentbit }}

View File

@ -17,17 +17,11 @@ limitations under the License.
{{- if .Values.manifests.deployment_fluentd }} {{- if .Values.manifests.deployment_fluentd }}
{{- $envAll := . }} {{- $envAll := . }}
{{- $esUserSecret := .Values.secrets.elasticsearch.user }} {{- $esUserSecret := .Values.secrets.elasticsearch.user }}
{{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" dict -}}
{{- $_ := include "helm-toolkit.utils.merge" (tuple .Values.pod_dependency .Values.dependencies.static.fluentd .Values.dependencies.dynamic.common.local_image_registry) -}}
{{- else -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.fluentd -}}
{{- end -}}
{{- $mounts_fluentd := .Values.pod.mounts.fluentd.fluentd }} {{- $mounts_fluentd := .Values.pod.mounts.fluentd.fluentd }}
{{- $serviceAccountName := printf "%s-%s" .Release.Name "fluentd" }} {{- $serviceAccountName := printf "%s-%s" .Release.Name "fluentd" }}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "fluentd" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding kind: ClusterRoleBinding
@ -100,7 +94,7 @@ spec:
{{ .Values.labels.fluentd.node_selector_key }}: {{ .Values.labels.fluentd.node_selector_value }} {{ .Values.labels.fluentd.node_selector_key }}: {{ .Values.labels.fluentd.node_selector_value }}
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.fluentd.timeout | default "30" }} terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.fluentd.timeout | default "30" }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency 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 }} image: {{ .Values.images.tags.fluentd }}

View File

@ -17,9 +17,11 @@ limitations under the License.
{{- if .Values.manifests.job_elasticsearch_template }} {{- if .Values.manifests.job_elasticsearch_template }}
{{- $envAll := . }} {{- $envAll := . }}
{{- $esUserSecret := .Values.secrets.elasticsearch.user }} {{- $esUserSecret := .Values.secrets.elasticsearch.user }}
{{- $dependencies := .Values.dependencies.static.elasticsearch_template }}
{{- $mounts_elasticsearch_template := .Values.pod.mounts.elasticsearch_template.elasticsearch_template }} {{- $mounts_elasticsearch_template := .Values.pod.mounts.elasticsearch_template.elasticsearch_template }}
{{- $mounts_elasticsearch_template_init := .Values.pod.mounts.elasticsearch_template.init_container }} {{- $mounts_elasticsearch_template_init := .Values.pod.mounts.elasticsearch_template.init_container }}
{{- $serviceAccountName := "fluent-logging-elasticsearch-template"}}
{{ tuple $envAll "elasticsearch_template" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
@ -31,11 +33,12 @@ spec:
labels: labels:
{{ tuple $envAll "fluent" "elasticsearch-template" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} {{ tuple $envAll "fluent" "elasticsearch-template" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
spec: spec:
serviceAccountName: {{ $serviceAccountName }}
restartPolicy: OnFailure restartPolicy: OnFailure
nodeSelector: nodeSelector:
{{ .Values.labels.elasticsearch_template.node_selector_key }}: {{ .Values.labels.elasticsearch_template.node_selector_value }} {{ .Values.labels.elasticsearch_template.node_selector_key }}: {{ .Values.labels.elasticsearch_template.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll $dependencies $mounts_elasticsearch_template_init | 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 }} image: {{ .Values.images.tags.elasticsearch_template }}

View File

@ -17,10 +17,9 @@ limitations under the License.
{{- if .Values.manifests.job_image_repo_sync }} {{- if .Values.manifests.job_image_repo_sync }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}} {{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.image_repo_sync -}}
{{- $serviceAccountName := "fluent-logging-image-repo-sync"}} {{- $serviceAccountName := "fluent-logging-image-repo-sync"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "image_repo_sync" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
@ -37,7 +36,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "image_repo_sync" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: image-repo-sync - name: image-repo-sync
{{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -16,14 +16,13 @@ limitations under the License.
{{- if and .Values.manifests.monitoring.prometheus.deployment_exporter .Values.monitoring.prometheus.enabled }} {{- if and .Values.manifests.monitoring.prometheus.deployment_exporter .Values.monitoring.prometheus.enabled }}
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.static.prometheus_fluentd_exporter }}
{{ $fluentd_host := tuple "fluentd" "internal" "metrics" $envAll | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }} {{ $fluentd_host := tuple "fluentd" "internal" "metrics" $envAll | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
{{ $fluentd_metrics_path := "api/plugins.json" }} {{ $fluentd_metrics_path := "api/plugins.json" }}
{{ $fluentd_metrics_host := printf "http://%s/%s" $fluentd_host $fluentd_metrics_path }} {{ $fluentd_metrics_host := printf "http://%s/%s" $fluentd_host $fluentd_metrics_path }}
{{- $serviceAccountName := "prometheus-fluentd-exporter"}} {{- $serviceAccountName := "prometheus-fluentd-exporter"}}
{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "prometheus_fluentd_exporter" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment
@ -42,7 +41,7 @@ spec:
{{ .Values.labels.prometheus_fluentd_exporter.node_selector_key }}: {{ .Values.labels.prometheus_fluentd_exporter.node_selector_value }} {{ .Values.labels.prometheus_fluentd_exporter.node_selector_key }}: {{ .Values.labels.prometheus_fluentd_exporter.node_selector_value }}
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.prometheus_fluentd_exporter.timeout | default "30" }} terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.prometheus_fluentd_exporter.timeout | default "30" }}
initContainers: initContainers:
{{ tuple $envAll $dependencies 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 }} image: {{ .Values.images.tags.prometheus_fluentd_exporter }}

View File

@ -62,7 +62,7 @@ dependencies:
- endpoint: node - endpoint: node
service: local_image_registry service: local_image_registry
static: static:
elasticsearch-template: elasticsearch_template:
services: services:
- endpoint: internal - endpoint: internal
service: elasticsearch service: elasticsearch

View File

@ -16,17 +16,11 @@ limitations under the License.
{{- if .Values.manifests.deployment }} {{- if .Values.manifests.deployment }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" dict -}}
{{- $_ := include "helm-toolkit.utils.merge" (tuple .Values.pod_dependency .Values.dependencies.static.grafana .Values.dependencies.dynamic.common.local_image_registry) -}}
{{- else -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.grafana -}}
{{- end -}}
{{- $mounts_grafana := .Values.pod.mounts.grafana.grafana }} {{- $mounts_grafana := .Values.pod.mounts.grafana.grafana }}
{{- $serviceAccountName := "grafana" }} {{- $serviceAccountName := "grafana" }}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "grafana" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment
@ -47,7 +41,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "grafana" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: grafana - name: grafana
{{ tuple $envAll "grafana" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "grafana" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -16,10 +16,9 @@ limitations under the License.
{{- if .Values.manifests.job_db_init_session }} {{- if .Values.manifests.job_db_init_session }}
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.static.db_init_session }}
{{- $serviceAccountName := "grafana-db-init-session" }} {{- $serviceAccountName := "grafana-db-init-session" }}
{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "db_init_session" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
@ -36,7 +35,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll $dependencies list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "db_init_session" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: grafana-db-init-session - name: grafana-db-init-session
{{ tuple $envAll "db_init" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "db_init" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -16,10 +16,9 @@ limitations under the License.
{{- if .Values.manifests.job_db_init }} {{- if .Values.manifests.job_db_init }}
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.static.db_init }}
{{- $serviceAccountName := "grafana-db-init" }} {{- $serviceAccountName := "grafana-db-init" }}
{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "db_init" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
@ -36,7 +35,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll $dependencies list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "db_init" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: grafana-db-init - name: grafana-db-init
{{ tuple $envAll "db_init" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "db_init" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -16,10 +16,9 @@ limitations under the License.
{{- if .Values.manifests.job_db_session_sync }} {{- if .Values.manifests.job_db_session_sync }}
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.static.db_session_sync }}
{{- $serviceAccountName := "grafana-db-session-sync" }} {{- $serviceAccountName := "grafana-db-session-sync" }}
{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "db_session_sync" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
@ -36,7 +35,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll $dependencies list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "db_session_sync" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: grafana-db-session-sync - name: grafana-db-session-sync
{{ tuple $envAll "grafana_db_session_sync" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "grafana_db_session_sync" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -17,10 +17,9 @@ limitations under the License.
{{- if .Values.manifests.job_image_repo_sync }} {{- if .Values.manifests.job_image_repo_sync }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}} {{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.image_repo_sync -}}
{{- $serviceAccountName := "grafana-image-repo-sync" }} {{- $serviceAccountName := "grafana-image-repo-sync" }}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "image_repo_sync" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
@ -37,7 +36,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "image_repo_sync" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: image-repo-sync - name: image-repo-sync
{{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -17,9 +17,8 @@ limitations under the License.
{{- if .Values.manifests.job_datasource }} {{- if .Values.manifests.job_datasource }}
{{- $envAll := . }} {{- $envAll := . }}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.register_datasource -}}
{{- $serviceAccountName := "grafana-register-datasource" }} {{- $serviceAccountName := "grafana-register-datasource" }}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "register_datasource" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
@ -36,7 +35,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "register_datasource" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: grafana-datasource - name: grafana-datasource
{{ tuple $envAll "datasource" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "datasource" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -16,8 +16,18 @@ limitations under the License.
{{- define "helm-toolkit.snippets.kubernetes_entrypoint_init_container" -}} {{- define "helm-toolkit.snippets.kubernetes_entrypoint_init_container" -}}
{{- $envAll := index . 0 -}} {{- $envAll := index . 0 -}}
{{- $deps := index . 1 -}} {{- $component := index . 1 -}}
{{- $mounts := index . 2 -}} {{- $mounts := index . 2 -}}
{{- $_ := set $envAll.Values "__kubernetes_entrypoint_init_container" dict -}}
{{- $_ := set $envAll.Values.__kubernetes_entrypoint_init_container "deps" dict -}}
{{- if and ($envAll.Values.images.local_registry.active) (ne $component "image_repo_sync") -}}
{{- $_ := include "helm-toolkit.utils.merge" ( tuple $envAll.Values.__kubernetes_entrypoint_init_container.deps ( index $envAll.Values.dependencies.static $component ) $envAll.Values.dependencies.dynamic.common.local_image_registry ) -}}
{{- else -}}
{{- $_ := set $envAll.Values.__kubernetes_entrypoint_init_container "deps" ( index $envAll.Values.dependencies.static $component ) -}}
{{- end -}}
{{- $deps := $envAll.Values.__kubernetes_entrypoint_init_container.deps }}
- name: init - name: init
{{ tuple $envAll "dep_check" | include "helm-toolkit.snippets.image" | indent 2 }} {{ tuple $envAll "dep_check" | include "helm-toolkit.snippets.image" | indent 2 }}
env: env:
@ -38,11 +48,11 @@ limitations under the License.
- name: DEPENDENCY_SERVICE - name: DEPENDENCY_SERVICE
value: "{{ tuple $deps.services $envAll | include "helm-toolkit.utils.comma_joined_service_list" }}" value: "{{ tuple $deps.services $envAll | include "helm-toolkit.utils.comma_joined_service_list" }}"
- name: DEPENDENCY_JOBS - name: DEPENDENCY_JOBS
value: "{{ include "helm-toolkit.utils.joinListWithComma" $deps.jobs }}" value: "{{ include "helm-toolkit.utils.joinListWithComma" $deps.jobs }}"
- name: DEPENDENCY_DAEMONSET - name: DEPENDENCY_DAEMONSET
value: "{{ include "helm-toolkit.utils.joinListWithComma" $deps.daemonset }}" value: "{{ include "helm-toolkit.utils.joinListWithComma" $deps.daemonset }}"
- name: DEPENDENCY_CONTAINER - name: DEPENDENCY_CONTAINER
value: "{{ include "helm-toolkit.utils.joinListWithComma" $deps.container }}" value: "{{ include "helm-toolkit.utils.joinListWithComma" $deps.container }}"
- name: DEPENDENCY_POD - name: DEPENDENCY_POD
value: {{ if $deps.pod }}{{ toJson $deps.pod | quote }}{{ else }}""{{ end }} value: {{ if $deps.pod }}{{ toJson $deps.pod | quote }}{{ else }}""{{ end }}
- name: COMMAND - name: COMMAND

View File

@ -16,11 +16,21 @@ limitations under the License.
{{- define "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" -}} {{- define "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" -}}
{{- $envAll := index . 0 -}} {{- $envAll := index . 0 -}}
{{- $deps := index . 1 -}} {{- $component := index . 1 -}}
{{- $saName := index . 2 -}} {{- $saName := index . 2 -}}
{{- $saNamespace := $envAll.Release.Namespace }} {{- $saNamespace := $envAll.Release.Namespace }}
{{- $randomKey := randAlphaNum 32 }} {{- $randomKey := randAlphaNum 32 }}
{{- $allNamespace := dict $randomKey "" }} {{- $allNamespace := dict $randomKey "" }}
{{- $_ := set $envAll.Values "__kubernetes_entrypoint_init_container" dict -}}
{{- $_ := set $envAll.Values.__kubernetes_entrypoint_init_container "deps" dict -}}
{{- if and ($envAll.Values.images.local_registry.active) (ne $component "image_repo_sync") -}}
{{- $_ := include "helm-toolkit.utils.merge" ( tuple $envAll.Values.__kubernetes_entrypoint_init_container.deps ( index $envAll.Values.dependencies.static $component ) $envAll.Values.dependencies.dynamic.common.local_image_registry ) -}}
{{- else -}}
{{- $_ := set $envAll.Values.__kubernetes_entrypoint_init_container "deps" ( index $envAll.Values.dependencies.static $component ) -}}
{{- end -}}
{{- $deps := $envAll.Values.__kubernetes_entrypoint_init_container.deps }}
--- ---
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount

View File

@ -17,15 +17,9 @@ limitations under the License.
{{- if .Values.manifests.deployment }} {{- if .Values.manifests.deployment }}
{{- $envAll := . }} {{- $envAll := . }}
{{- $esUserSecret := .Values.secrets.elasticsearch.user }} {{- $esUserSecret := .Values.secrets.elasticsearch.user }}
{{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" dict -}}
{{- $_ := include "helm-toolkit.utils.merge" (tuple .Values.pod_dependency .Values.dependencies.static.kibana .Values.dependencies.dynamic.common.local_image_registry) -}}
{{- else -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.kibana -}}
{{- end -}}
{{- $serviceAccountName := "kibana" }} {{- $serviceAccountName := "kibana" }}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "kibana" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment
@ -48,7 +42,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.kibana.node_selector_key }}: {{ .Values.labels.kibana.node_selector_value }} {{ .Values.labels.kibana.node_selector_key }}: {{ .Values.labels.kibana.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "kibana" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: apache-proxy - name: apache-proxy
{{ tuple $envAll "apache_proxy" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "apache_proxy" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -17,10 +17,9 @@ limitations under the License.
{{- if .Values.manifests.job_image_repo_sync }} {{- if .Values.manifests.job_image_repo_sync }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}} {{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.image_repo_sync -}}
{{- $serviceAccountName := "kibana-image-repo-sync" }} {{- $serviceAccountName := "kibana-image-repo-sync" }}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "image_repo_sync" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
@ -37,7 +36,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "image_repo_sync" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: image-repo-sync - name: image-repo-sync
{{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -16,12 +16,6 @@ limitations under the License.
{{- if .Values.manifests.deployment_kube_dns }} {{- if .Values.manifests.deployment_kube_dns }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" dict -}}
{{- $_ := include "helm-toolkit.utils.merge" (tuple .Values.pod_dependency .Values.dependencies.static.kube_dns .Values.dependencies.dynamic.common.local_image_registry) -}}
{{- else -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.kube_dns -}}
{{- end -}}
--- ---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment

View File

@ -17,10 +17,9 @@ limitations under the License.
{{- if .Values.manifests.job_image_repo_sync }} {{- if .Values.manifests.job_image_repo_sync }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}} {{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.image_repo_sync -}}
{{- $serviceAccountName := "kube-dns-image-repo-sync"}} {{- $serviceAccountName := "kube-dns-image-repo-sync"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "image_repo_sync" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
@ -37,7 +36,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "image_repo_sync" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: image-repo-sync - name: image-repo-sync
{{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -16,15 +16,9 @@ limitations under the License.
{{- if .Values.manifests.deployment }} {{- if .Values.manifests.deployment }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" dict -}}
{{- $_ := include "helm-toolkit.utils.merge" (tuple .Values.pod_dependency .Values.dependencies.static.nagios .Values.dependencies.dynamic.common.local_image_registry) -}}
{{- else -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.nagios -}}
{{- end -}}
{{- $serviceAccountName := "nagios" }} {{- $serviceAccountName := "nagios" }}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "nagios" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole kind: ClusterRole
@ -80,7 +74,7 @@ spec:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.nagios.timeout | default "30" }} terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.nagios.timeout | default "30" }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "nagios" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: nagios - name: nagios
{{ tuple $envAll "nagios" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "nagios" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -17,10 +17,9 @@ limitations under the License.
{{- if .Values.manifests.job_image_repo_sync }} {{- if .Values.manifests.job_image_repo_sync }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}} {{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.image_repo_sync -}}
{{- $serviceAccountName := "nagios-image-repo-sync" }} {{- $serviceAccountName := "nagios-image-repo-sync" }}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "image_repo_sync" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
@ -37,7 +36,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "image_repo_sync" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: image-repo-sync - name: image-repo-sync
{{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -45,6 +45,8 @@ dependencies:
services: services:
- service: local_image_registry - service: local_image_registry
endpoint: internal endpoint: internal
nagios:
services: null
endpoints: endpoints:
cluster_domain_suffix: cluster.local cluster_domain_suffix: cluster.local

View File

@ -16,15 +16,9 @@ limitations under the License.
{{- if .Values.manifests.deployment }} {{- if .Values.manifests.deployment }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" dict -}}
{{- $_ := include "helm-toolkit.utils.merge" (tuple .Values.pod_dependency .Values.dependencies.static.nfs .Values.dependencies.dynamic.common.local_image_registry) -}}
{{- else -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.nfs -}}
{{- end -}}
{{- $serviceAccountName := printf "%s-%s" .Release.Name "nfs-provisioner"}} {{- $serviceAccountName := printf "%s-%s" .Release.Name "nfs-provisioner"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "nfs" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
kind: ClusterRole kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
@ -116,7 +110,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "nfs" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: nfs-provisioner - name: nfs-provisioner
{{ tuple $envAll "nfs_provisioner" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "nfs_provisioner" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -17,10 +17,9 @@ limitations under the License.
{{- if .Values.manifests.job_image_repo_sync }} {{- if .Values.manifests.job_image_repo_sync }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}} {{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.image_repo_sync -}}
{{- $serviceAccountName := "nfs-image-repo-sync"}} {{- $serviceAccountName := "nfs-image-repo-sync"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "image_repo_sync" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
@ -37,7 +36,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "image_repo_sync" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: image-repo-sync - name: image-repo-sync
{{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -17,10 +17,9 @@ limitations under the License.
{{- if .Values.manifests.job_image_repo_sync }} {{- if .Values.manifests.job_image_repo_sync }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}} {{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.image_repo_sync -}}
{{- $serviceAccountName := "alertmanager-image-repo-sync"}} {{- $serviceAccountName := "alertmanager-image-repo-sync"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "image_repo_sync" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
@ -37,7 +36,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "image_repo_sync" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: image-repo-sync - name: image-repo-sync
{{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -16,18 +16,12 @@ limitations under the License.
{{- if .Values.manifests.statefulset }} {{- if .Values.manifests.statefulset }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" dict -}}
{{- $_ := include "helm-toolkit.utils.merge" (tuple .Values.pod_dependency .Values.dependencies.static.alertmanager .Values.dependencies.dynamic.common.local_image_registry) -}}
{{- else -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.alertmanager -}}
{{- end -}}
{{- $mounts_alertmanager := .Values.pod.mounts.alertmanager.alertmanager }} {{- $mounts_alertmanager := .Values.pod.mounts.alertmanager.alertmanager }}
{{- $mounts_alertmanager_init := .Values.pod.mounts.alertmanager.init_container }} {{- $mounts_alertmanager_init := .Values.pod.mounts.alertmanager.init_container }}
{{- $serviceAccountName := "alertmanager"}} {{- $serviceAccountName := "alertmanager"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "alertmanager" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: StatefulSet kind: StatefulSet
@ -51,7 +45,7 @@ spec:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.alertmanager.timeout | default "30" }} terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.alertmanager.timeout | default "30" }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency 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 }}
securityContext: securityContext:

View File

@ -16,15 +16,9 @@ limitations under the License.
{{- if .Values.manifests.deployment }} {{- if .Values.manifests.deployment }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" dict -}}
{{- $_ := include "helm-toolkit.utils.merge" (tuple .Values.pod_dependency .Values.dependencies.static.kube_state_metrics .Values.dependencies.dynamic.common.local_image_registry) -}}
{{- else -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.kube_state_metrics -}}
{{- end -}}
{{- $serviceAccountName := printf "%s-%s" .Release.Name "kube-state-metrics"}} {{- $serviceAccountName := printf "%s-%s" .Release.Name "kube-state-metrics"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "kube_state_metrics" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole kind: ClusterRole
@ -101,7 +95,7 @@ spec:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.kube_state_metrics.timeout | default "30" }} terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.kube_state_metrics.timeout | default "30" }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "kube_state_metrics" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: kube-state-metrics - name: kube-state-metrics
{{ tuple $envAll "kube_state_metrics" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "kube_state_metrics" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -17,10 +17,9 @@ limitations under the License.
{{- if .Values.manifests.job_image_repo_sync }} {{- if .Values.manifests.job_image_repo_sync }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}} {{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.image_repo_sync -}}
{{- $serviceAccountName := "kube-metrics-image-repo-sync"}} {{- $serviceAccountName := "kube-metrics-image-repo-sync"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "image_repo_sync" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
@ -37,7 +36,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "image_repo_sync" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: image-repo-sync - name: image-repo-sync
{{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -87,6 +87,8 @@ dependencies:
services: services:
- endpoint: internal - endpoint: internal
service: local_image_registry service: local_image_registry
kube_state_metrics:
services: null
endpoints: endpoints:
cluster_domain_suffix: cluster.local cluster_domain_suffix: cluster.local

View File

@ -16,15 +16,9 @@ limitations under the License.
{{- if .Values.manifests.daemonset }} {{- if .Values.manifests.daemonset }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" dict -}}
{{- $_ := include "helm-toolkit.utils.merge" (tuple .Values.pod_dependency .Values.dependencies.static.node_exporter .Values.dependencies.dynamic.common.local_image_registry) -}}
{{- else -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.node_exporter -}}
{{- end -}}
{{- $serviceAccountName := printf "%s-%s" .Release.Name "node-exporter"}} {{- $serviceAccountName := printf "%s-%s" .Release.Name "node-exporter"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "node_exporter" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding kind: ClusterRoleBinding
@ -58,7 +52,7 @@ spec:
hostNetwork: true hostNetwork: true
hostPID: true hostPID: true
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "node_exporter" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
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 }}

View File

@ -17,10 +17,9 @@ limitations under the License.
{{- if .Values.manifests.job_image_repo_sync }} {{- if .Values.manifests.job_image_repo_sync }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}} {{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.image_repo_sync -}}
{{- $serviceAccountName := "node-exporter-image-repo-sync"}} {{- $serviceAccountName := "node-exporter-image-repo-sync"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "image_repo_sync" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
@ -37,7 +36,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "image_repo_sync" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: image-repo-sync - name: image-repo-sync
{{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -17,15 +17,9 @@ limitations under the License.
{{- if .Values.manifests.deployment }} {{- if .Values.manifests.deployment }}
{{- $envAll := . }} {{- $envAll := . }}
{{- $ksUserSecret := .Values.secrets.identity.user }} {{- $ksUserSecret := .Values.secrets.identity.user }}
{{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" dict -}}
{{- $_ := include "helm-toolkit.utils.merge" (tuple .Values.pod_dependency .Values.dependencies.static.prometheus_openstack_exporter .Values.dependencies.dynamic.common.local_image_registry) -}}
{{- else -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.prometheus_openstack_exporter -}}
{{- end -}}
{{- $serviceAccountName := "prometheus-openstack-exporter" }} {{- $serviceAccountName := "prometheus-openstack-exporter" }}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "prometheus_openstack_exporter" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Deployment kind: Deployment
@ -44,7 +38,7 @@ spec:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.prometheus_openstack_exporter.timeout | default "30" }} terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.prometheus_openstack_exporter.timeout | default "30" }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "prometheus_openstack_exporter" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: openstack-metrics-exporter - name: openstack-metrics-exporter
{{ tuple $envAll "prometheus_openstack_exporter" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "prometheus_openstack_exporter" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -17,11 +17,9 @@ limitations under the License.
{{- if .Values.manifests.job_image_repo_sync }} {{- if .Values.manifests.job_image_repo_sync }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}} {{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.image_repo_sync -}}
{{- $serviceAccountName := "prometheus-openstack-exporter-image-repo-sync"}} {{- $serviceAccountName := "prometheus-openstack-exporter-image-repo-sync"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "image_repo_sync" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
@ -38,7 +36,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "image_repo_sync" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: image-repo-sync - name: image-repo-sync
{{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -16,10 +16,9 @@ limitations under the License.
{{- if .Values.manifests.job_ks_user }} {{- if .Values.manifests.job_ks_user }}
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.static.ks_user }}
{{- $serviceAccountName := "prometheus-openstack-exporter-ks-user" }} {{- $serviceAccountName := "prometheus-openstack-exporter-ks-user" }}
{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "ks_user" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
@ -36,7 +35,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll $dependencies list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "ks_user" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
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 }}

View File

@ -17,10 +17,9 @@ limitations under the License.
{{- if .Values.manifests.job_image_repo_sync }} {{- if .Values.manifests.job_image_repo_sync }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}} {{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.image_repo_sync -}}
{{- $serviceAccountName := "prometheus-image-repo-sync"}} {{- $serviceAccountName := "prometheus-image-repo-sync"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "image_repo_sync" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
@ -37,7 +36,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "image_repo_sync" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: image-repo-sync - name: image-repo-sync
{{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -16,18 +16,12 @@ limitations under the License.
{{- if .Values.manifests.statefulset_prometheus }} {{- if .Values.manifests.statefulset_prometheus }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" dict -}}
{{- $_ := include "helm-toolkit.utils.merge" (tuple .Values.pod_dependency .Values.dependencies.static.prometheus .Values.dependencies.dynamic.common.local_image_registry) -}}
{{- else -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.prometheus -}}
{{- end -}}
{{- $mounts_prometheus := .Values.pod.mounts.prometheus.prometheus }} {{- $mounts_prometheus := .Values.pod.mounts.prometheus.prometheus }}
{{- $mounts_prometheus_init := .Values.pod.mounts.prometheus.init_container }} {{- $mounts_prometheus_init := .Values.pod.mounts.prometheus.init_container }}
{{- $serviceAccountName := printf "%s-%s" .Release.Name "prometheus"}} {{- $serviceAccountName := printf "%s-%s" .Release.Name "prometheus"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "prometheus" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole kind: ClusterRole
@ -92,7 +86,7 @@ spec:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.prometheus.timeout | default "30" }} terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.prometheus.timeout | default "30" }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency 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 }}
securityContext: securityContext:

View File

@ -16,15 +16,9 @@ limitations under the License.
{{- if .Values.manifests.deployment }} {{- if .Values.manifests.deployment }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" dict -}}
{{- $_ := include "helm-toolkit.utils.merge" (tuple .Values.pod_dependency .Values.dependencies.static.redis .Values.dependencies.dynamic.common.local_image_registry) -}}
{{- else -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.redis -}}
{{- end -}}
{{- $serviceAccountName := "redis"}} {{- $serviceAccountName := "redis"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "redis" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: Deployment kind: Deployment
@ -44,7 +38,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "redis" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: redis - name: redis
{{ tuple $envAll "redis" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "redis" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -17,10 +17,9 @@ limitations under the License.
{{- if .Values.manifests.job_image_repo_sync }} {{- if .Values.manifests.job_image_repo_sync }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}} {{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.image_repo_sync -}}
{{- $serviceAccountName := "redis-image-repo-sync"}} {{- $serviceAccountName := "redis-image-repo-sync"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "image_repo_sync" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
@ -37,7 +36,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "image_repo_sync" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: image-repo-sync - name: image-repo-sync
{{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -16,15 +16,9 @@ limitations under the License.
{{- if .Values.manifests.daemonset_registry_proxy }} {{- if .Values.manifests.daemonset_registry_proxy }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" dict -}}
{{- $_ := include "helm-toolkit.utils.merge" (tuple .Values.pod_dependency .Values.dependencies.static.registry_proxy .Values.dependencies.dynamic.common.local_image_registry) -}}
{{- else -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.registry_proxy -}}
{{- end -}}
{{- $serviceAccountName := "docker-registry-proxy"}} {{- $serviceAccountName := "docker-registry-proxy"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "registry_proxy" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: DaemonSet kind: DaemonSet
@ -45,7 +39,7 @@ spec:
dnsPolicy: ClusterFirstWithHostNet dnsPolicy: ClusterFirstWithHostNet
hostNetwork: true hostNetwork: true
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency 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 8 }}

View File

@ -16,15 +16,9 @@ limitations under the License.
{{- if .Values.manifests.deployment_registry }} {{- if .Values.manifests.deployment_registry }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" dict -}}
{{- $_ := include "helm-toolkit.utils.merge" (tuple .Values.pod_dependency .Values.dependencies.static.registry .Values.dependencies.dynamic.common.local_image_registry) -}}
{{- else -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.registry -}}
{{- end -}}
{{- $serviceAccountName := "docker-registry"}} {{- $serviceAccountName := "docker-registry"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "registry" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: Deployment kind: Deployment
@ -47,7 +41,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "registry" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: registry - name: registry
{{ tuple $envAll "registry" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "registry" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -17,15 +17,9 @@ limitations under the License.
{{- if .Values.manifests.job_bootstrap }} {{- if .Values.manifests.job_bootstrap }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.bootstrap.enabled }} {{- if .Values.bootstrap.enabled }}
{{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" dict -}}
{{- $_ := include "helm-toolkit.utils.merge" (tuple .Values.pod_dependency .Values.dependencies.static.bootstrap .Values.dependencies.dynamic.common.local_image_registry) -}}
{{- else -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.bootstrap -}}
{{- end -}}
{{- $serviceAccountName := "docker-bootstrap"}} {{- $serviceAccountName := "docker-bootstrap"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "bootstrap" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
@ -42,7 +36,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "bootstrap" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: docker-bootstrap - name: docker-bootstrap
{{ tuple $envAll "bootstrap" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "bootstrap" | include "helm-toolkit.snippets.image" | indent 10 }}

View File

@ -16,15 +16,9 @@ limitations under the License.
{{- if .Values.manifests.deployment_tiller }} {{- if .Values.manifests.deployment_tiller }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" dict -}}
{{- $_ := include "helm-toolkit.utils.merge" (tuple .Values.pod_dependency .Values.dependencies.static.tiller .Values.dependencies.dynamic.common.local_image_registry) -}}
{{- else -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.tiller -}}
{{- end -}}
{{- $serviceAccountName := printf "%s-%s" .Release.Name "tiller" }} {{- $serviceAccountName := printf "%s-%s" .Release.Name "tiller" }}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "tiller" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding kind: ClusterRoleBinding
@ -64,7 +58,7 @@ spec:
name: tiller name: tiller
spec: spec:
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "tiller" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- env: - env:
- name: TILLER_NAMESPACE - name: TILLER_NAMESPACE

View File

@ -17,10 +17,9 @@ limitations under the License.
{{- if .Values.manifests.job_image_repo_sync }} {{- if .Values.manifests.job_image_repo_sync }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.images.local_registry.active -}} {{- if .Values.images.local_registry.active -}}
{{- $_ := set .Values "pod_dependency" .Values.dependencies.static.image_repo_sync -}}
{{- $serviceAccountName := "kube-dns-image-repo-sync"}} {{- $serviceAccountName := "kube-dns-image-repo-sync"}}
{{ tuple $envAll $envAll.Values.pod_dependency $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} {{ tuple $envAll "image_repo_sync" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
@ -37,7 +36,7 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:
{{ tuple $envAll .Values.pod_dependency list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll "image_repo_sync" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
containers: containers:
- name: image-repo-sync - name: image-repo-sync
{{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll "image_repo_sync" | include "helm-toolkit.snippets.image" | indent 10 }}