1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- 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: dip-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: /dip/logs/%SERVICE_NAME%
- - name: app-config
- mountPath: /dip/conf/app.conf
- subPath: app.conf
- - name: common-config
- mountPath: /dip/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
|