deployment.yaml 1010 Bytes
Newer Older
1 2 3 4
apiVersion: apps/v1
kind: Deployment
metadata:
  name: frontend
Leon Klingele's avatar
Leon Klingele committed
5 6
  labels:
    app: frontend
7
spec:
8
  replicas: {{ .Values.replicaCount }}
9 10
  selector:
    matchLabels:
Leon Klingele's avatar
Leon Klingele committed
11
      app: frontend
12 13 14
  template:
    metadata:
      labels:
Leon Klingele's avatar
Leon Klingele committed
15
        app: frontend
16 17
    spec:
      containers:
18
      - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
19 20
        name: frontend
        ports:
21
        - containerPort: 8080
22 23 24 25 26 27 28 29
        securityContext:
          capabilities:
            add:
            - CHOWN
            - SETUID
            - SETGID
            drop:
            - ALL
Leon Klingele's avatar
Leon Klingele committed
30 31
          allowPrivilegeEscalation: false
          runAsUser: 18080
Leon Klingele's avatar
Leon Klingele committed
32
        resources:
33
{{ toYaml .Values.resources | indent 10 }}
34 35 36 37 38 39 40 41 42 43
        readinessProbe:
          httpGet:
            path: /
            port: 8080
          periodSeconds: 2
        livenessProbe:
          httpGet:
            path: /
            port: 8080
          periodSeconds: 2
44 45 46
      imagePullSecrets:
      - name: regcred
      restartPolicy: Always