f57972b5b6
This PS moves static dependencies under a 'static' key to allow expansion to cover dynamic dependencies. Change-Id: I38990b93aa79fa1f70af6f2c78e5e5c61c63f32c
66 lines
2.6 KiB
YAML
66 lines
2.6 KiB
YAML
# Copyright 2017 The Openstack-Helm Authors.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
{{- if .Values.manifests.deployment }}
|
|
{{- $envAll := . }}
|
|
|
|
{{- $dependencies := .Values.dependencies.static.etcd }}
|
|
|
|
{{- $rcControllerName := printf "%s-%s" $envAll.Release.Name "etcd" }}
|
|
{{- $configMapBinName := printf "%s-%s" $envAll.Release.Name "etcd-bin" }}
|
|
|
|
{{ tuple $envAll $dependencies $rcControllerName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
|
---
|
|
apiVersion: apps/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ $rcControllerName | quote }}
|
|
spec:
|
|
replicas: {{ .Values.pod.replicas.etcd }}
|
|
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{ tuple $envAll "etcd" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
|
spec:
|
|
serviceAccountName: {{ $rcControllerName | quote }}
|
|
affinity:
|
|
{{ tuple $envAll "etcd" "server" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
|
nodeSelector:
|
|
{{ .Values.labels.server.node_selector_key }}: {{ .Values.labels.server.node_selector_value }}
|
|
initContainers:
|
|
{{ tuple $envAll $dependencies list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
|
containers:
|
|
- name: etcd
|
|
image: {{ .Values.images.tags.etcd }}
|
|
imagePullPolicy: {{ .Values.images.pull_policy }}
|
|
command:
|
|
- /tmp/etcd.sh
|
|
ports:
|
|
- containerPort: {{ tuple "etcd" "internal" "client" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: {{ tuple "etcd" "internal" "client" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
|
volumeMounts:
|
|
- name: etcd-bin
|
|
mountPath: /tmp/etcd.sh
|
|
subPath: etcd.sh
|
|
readOnly: true
|
|
volumes:
|
|
- name: etcd-bin
|
|
configMap:
|
|
name: {{ $configMapBinName | quote }}
|
|
defaultMode: 0555
|
|
{{- end }}
|