kind: Deployment apiVersion: extensions/v1beta1 metadata: name: %SERVICE_NAME% namespace: %RUNMODE% creationTimestamp: null labels: app: %SERVICE_NAME% spec: replicas: 1 selector: matchLabels: app: %SERVICE_NAME% template: metadata: creationTimestamp: null labels: app: %SERVICE_NAME% spec: volumes: - name: app-logs emptyDir: {} - name: app-config configMap: name: %SERVICE_NAME% defaultMode: 420 - name: common-config configMap: name: gd-common defaultMode: 420 containers: - name: %SERVICE_NAME% image: %SERVICE_NAME% resources: limits: cpu: 500m memory: 512Mi requests: cpu: 250m memory: 512Mi volumeMounts: - name: app-logs mountPath: /gd/logs/%SERVICE_NAME% - name: app-config mountPath: /gd/conf/app.conf subPath: app.conf - name: common-config mountPath: /gd/conf/common.json subPath: common.json imagePullPolicy: IfNotPresent securityContext: privileged: false strategy: type: RollingUpdate rollingUpdate: maxUnavailable: 1 maxSurge: 20% status: {} --- apiVersion: v1 kind: Service metadata: name: %SERVICE_NAME% namespace: %RUNMODE% labels: app: %SERVICE_NAME% spec: selector: app: %SERVICE_NAME% ports: - protocol: TCP targetPort: %SERVE_PORT% port: %SERVE_PORT% type: ClusterIP