Created
April 21, 2020 18:08
-
-
Save kenmazaika/3ccb26a03bd6ed6f09144b26d1435cd9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: {{ include "helm-chart.fullname" . }} | |
labels: | |
app.kubernetes.io/name: {{ include "helm-chart.name" . }} | |
helm.sh/chart: {{ include "helm-chart.chart" . }} | |
app.kubernetes.io/instance: {{ .Release.Name }} | |
app.kubernetes.io/managed-by: {{ .Release.Service }} | |
spec: | |
replicas: {{ .Values.replicaCount }} | |
selector: | |
matchLabels: | |
app.kubernetes.io/name: {{ include "helm-chart.name" . }} | |
app.kubernetes.io/instance: {{ .Release.Name }} | |
template: | |
metadata: | |
annotations: | |
timestamp: "{{ date "20060102150405" .Release.Time }}" | |
labels: | |
app.kubernetes.io/name: {{ include "helm-chart.name" . }} | |
app.kubernetes.io/instance: {{ .Release.Name }} | |
spec: | |
# serviceAccountName: internal-app | |
containers: | |
- name: {{ .Chart.Name }} | |
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | |
volumeMounts: | |
- name: kubernetes-secrets-metropolis-database-credentials | |
mountPath: "/kubernetes-secrets/metropolis-database-credentials" | |
readOnly: true | |
imagePullPolicy: {{ .Values.image.pullPolicy }} | |
ports: | |
- name: http | |
containerPort: {{ .Values.service.targetPort }} | |
protocol: TCP | |
livenessProbe: | |
httpGet: | |
path: / | |
port: http | |
readinessProbe: | |
httpGet: | |
path: / | |
port: http | |
resources: | |
{{- toYaml .Values.resources | nindent 12 }} | |
{{- with .Values.nodeSelector }} | |
{{- toYaml . | nindent 8 }} | |
{{- end }} | |
imagePullSecrets: | |
- name: gcr-docker-configuration | |
volumes: | |
- name: kubernetes-secrets-metropolis-database-credentials # Map to Volume Mount Name | |
secret: | |
secretName: metropolis-database-credentials # Map to Kubernetes Secret Key Name | |
nodeSelector: | |
{{- with .Values.affinity }} | |
affinity: | |
{{- toYaml . | nindent 8 }} | |
{{- end }} | |
{{- with .Values.tolerations }} | |
tolerations: | |
{{- toYaml . | nindent 8 }} | |
{{- end }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment