{{/* # Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. # # 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_drydock }} {{- $envAll := . -}} {{- $dependencies := .Values.dependencies.api }} --- apiVersion: apps/v1beta1 kind: Deployment metadata: name: drydock-api spec: replicas: {{ .Values.replicas.drydock }} {{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }} template: metadata: labels: {{ tuple $envAll "drydock" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} annotations: configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} spec: restartPolicy: Always initContainers: {{ tuple $envAll $dependencies "[]" | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} containers: - name: drydock-api env: - name: 'MAAS_API_KEY' valueFrom: secretKeyRef: name: 'maas-api-key' key: 'token' image: {{ .Values.images.tags.drydock }} imagePullPolicy: {{ .Values.images.pull_policy }} {{ tuple $envAll $envAll.Values.pod.resources.api | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} ports: - name: drydock-api containerPort: {{ tuple "physicalprovisioner" "default" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} volumeMounts: - name: etc-drydock mountPath: /etc/drydock - name: drydock-etc subPath: drydock.conf mountPath: /etc/drydock/drydock.conf readOnly: true - name: drydock-etc subPath: api-paste.ini mountPath: /etc/drydock/api-paste.ini readOnly: true - name: drydock-etc subPath: policy.yaml mountPath: /etc/drydock/policy.yaml readOnly: true volumes: - name: etc-drydock emptyDir: {} - name: drydock-etc configMap: name: drydock-etc defaultMode: 0444 ... {{- end }}