# Copyright 2017 The Openstack-Helm Authors. # Copyright (c) 2018 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_mini_mirror }} {{- $envAll := . }} apiVersion: apps/v1beta2 kind: Deployment metadata: name: {{ include "mini-mirror.fullname" . }} annotations: {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }} labels: app.kubernetes.io/name: {{ include "mini-mirror.name" . }} helm.sh/chart: {{ include "mini-mirror.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} spec: replicas: {{ .Values.replicaCount }} {{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }} selector: matchLabels: app.kubernetes.io/name: {{ include "mini-mirror.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} template: metadata: labels: app.kubernetes.io/name: {{ include "mini-mirror.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{ tuple $envAll "mini-mirror" "mini-mirror" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} spec: containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} {{ tuple $envAll $envAll.Values.pod.resources.mini_mirror | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} ports: - name: http containerPort: 80 protocol: TCP livenessProbe: httpGet: path: / port: http readinessProbe: httpGet: path: / port: http {{- with .Values.nodeSelector }} nodeSelector: {{ toYaml . | indent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{ toYaml . | indent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{ toYaml . | indent 8 }} {{- end }} {{- end }}