apiVersion: apps/v1 kind: Deployment metadata: labels: name: LABEL name: RESOURCE_NAME namespace: production spec: replicas: 0 selector: matchLabels: app: RESOURCE_NAME strategy: type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 0 template: metadata: labels: app: RESOURCE_NAME spec: containers: - image: REPOSITORY/IMAGE name: RESOURCE_NAME env: - name: KUBERNETES_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace - name: CONTAINER_CORE_LIMIT valueFrom: resourceFieldRef: resource: limits.cpu - name: CONTAINER_MAX_MEMORY valueFrom: resourceFieldRef: resource: limits.memory - name: JDBC_URL valueFrom: secretKeyRef: name: jdbc key: jdbc.url - name: JDBC_USERNAME valueFrom: secretKeyRef: name: jdbc key: jdbc.username - name: JDBC_PASSWORD valueFrom: secretKeyRef: name: jdbc key: jdbc.password ports: - containerPort: 9090 name: RESOURCE_NAME livenessProbe: httpGet: path: /actuator/health port: 9090 scheme: HTTP initialDelaySeconds: 120 periodSeconds: 30 timeoutSeconds: 2 successThreshold: 1 failureThreshold: 3 readinessProbe: httpGet: port: 9090 path: /actuator/health scheme: HTTP initialDelaySeconds: 100 periodSeconds: 5 timeoutSeconds: 2 successThreshold: 1 failureThreshold: 10 imagePullPolicy: Always resources: requests: cpu: 10m memory: 128Mi limits: cpu: 250m memory: 256Mi restartPolicy: Always imagePullSecrets: - name: registry-secret