1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
| apiVersion: extensions/v1beta1 kind: Deployment metadata: name: ptengine-demo namespace: ptengine-prd labels: app: ptengine-demo spec: replicas: 3 strategy: rollingUpdate: maxSurge: 1 maxUnavailable: 1 template: metadata: labels: app: ptengine-demo sepc: containers: - name: ptengine-demo image: reg.pt1.com/ptengine-prd/ptengine-demo:0.0.1-SNAPSHOT CMD: [ "/bin/sh","-c","cat /etc/config/path/to/special-key" ] args: - '-storage.local.retention=$(STORAGE_RETENTION)' - '-web.external-url=$(EXTERNAL_URL)' imagePullPolicy: IfNotPresent livenessProbe: httpGet: path: /health port: 8080 scheme: HTTP initialDelaySeconds: 60 timeoutSeconds: 5 successThreshold: 1 failureThreshold: 5 readinessProbe: readinessProbe: httpGet: path: /health port: 8080 scheme: HTTP initialDelaySeconds: 30 timeoutSeconds: 5 successThreshold: 1 failureThreshold: 5 resources: requests: cpu: 2 memory: 2048Mi limits: cpu: 2 memory: 2048Mi env: - name: LOCAL_KEY value: value - name: CONFIG_MAP_KEY valueFrom: configMapKeyRef: name: special-config key: special.type ports: - name: http containerPort: 8080 volumeMounts: - name: log-cache mount: /tmp/log - name: sdb mountPath: /data/media - name: nfs-client-root mountPath: /mnt/nfs - name: example-volume-config mountPath: /etc/config - name: rbd-pvc
volumes: - name: log-cache emptyDir: {} - name: sdb hostPath: path: /any/path/it/will/be/replaced - name: example-volume-config configMap: name: example-volume-config items: - key: log-script path: path/to/log-script - key: backup-script path: path/to/backup-script - name: nfs-client-root nfs: server: 10.42.0.55 path: /opt/public - name: rbd-pvc persistentVolumeClaim: claimName: rbd-pvc1
|