Advertisement
vitvayti

Deployment

Nov 5th, 2024 (edited)
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.86 KB | None | 0 0
  1.  apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4.   name: "{{ .Release.Name }}"
  5.   namespace: "{{ .Release.Namespace }}"
  6.   labels:
  7.     app: "{{ .Release.Name }}"
  8. spec:
  9.   replicas: {{ .Values.replicaCount }}
  10.   selector:
  11.     matchLabels:
  12.       app: "{{ .Release.Name }}"
  13.   template:
  14.     metadata:
  15.       labels:
  16.         app: "{{ .Release.Name }}"
  17.     spec:
  18.       nodeSelector:
  19.      {{- range $key, $value := .Values.nodeSelectors }}
  20.       {{ $key }}: {{ $value }}
  21.       {{- end }}
  22.       containers:
  23.         - name: "{{ .Release.Name }}"
  24.           image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
  25.           ports:
  26.             - name: http
  27.               containerPort: {{ .Values.http.port }}
  28.           livenessProbe:
  29.             httpGet:
  30.               path: {{ .Values.metrics.healthCheckPath }}
  31.               port: {{ .Values.http.port }}
  32.             initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }}
  33.             periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }}
  34.           readinessProbe:
  35.             httpGet:
  36.               path: {{ .Values.metrics.healthCheckPath }}
  37.               port: {{ .Values.http.port }}
  38.             initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }}
  39.             periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }}
  40.           env:
  41.             - name: NUXT_PUBLIC_APP_VERSION
  42.               value: "{{ .Values.appVersion }}"
  43.             - name: NUXT_API_BASE_URL
  44.               value: "{{ .Values.externalBackend.url }}"
  45.             - name: NUXT_PUBLIC_YM_ID
  46.               value: "{{ .Values.metrics.yandex.id }}"
  47.             - name: NUXT_PUBLIC_YA_MAP_API_KEY
  48.               value: "{{ .Values.metrics.yandex.apiKey }}"
  49.       imagePullSecrets:
  50.      {{- range .Values.imagePullSecrets }}
  51.         - name: "{{ .name }}"
  52.       {{- end }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement