| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- apiVersion: v1
- kind: Service
- metadata:
- name: grider-erection-web
- namespace: emp-qa
- spec:
- selector:
- app: grider-erection-web
- type: ClusterIP
- # sessionAffinity: None
- # sessionAffinityConfig:
- # clientIP:
- # timeoutSeconds: 10800
- ports:
- - name: app
- protocol: TCP
- port: 8080
- targetPort: 8080
- # If you set the `spec.type` field to `NodePort` and you want a specific port number,
- # you can specify a value in the `spec.ports[*].nodePort` field.
- # nodePort: 35100
- ---
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: grider-erection-web
- namespace: emp-qa
- labels:
- app: grider-erection-web
- spec:
- selector:
- matchLabels:
- app: grider-erection-web
- replicas: 1
- strategy:
- rollingUpdate:
- maxSurge: 25%
- maxUnavailable: 25%
- type: RollingUpdate
- template:
- metadata:
- labels:
- app: grider-erection-web
- spec:
- # initContainers:
- # Init containers are exactly like regular containers, except:
- # - Init containers always run to completion.
- # - Each init container must complete successfully before the next one starts.
- containers:
- - name: grider-erection-web
- image: registry.cn-gdgz1.ctyun.cn/emp-qa/grider-erection-web:latest
- resources:
- requests:
- cpu: 100m
- memory: 200Mi
- limits:
- cpu: 150m
- memory: 300Mi
- # livenessProbe:
- # tcpSocket:
- # port: 5100
- # initialDelaySeconds: 5
- # timeoutSeconds: 5
- # successThreshold: 1
- # failureThreshold: 3
- # periodSeconds: 10
- # readinessProbe:
- # httpGet:
- # path: /
- # port: 5100
- # initialDelaySeconds: 5
- # timeoutSeconds: 2
- # successThreshold: 1
- # failureThreshold: 3
- # periodSeconds: 10
- # env:
- # - name: DB_HOST
- # valueFrom:
- # configMapKeyRef:
- # name: MYAPP
- # key: DB_HOST
- ports:
- - containerPort: 8080
- # name: emp-grider-erection
- # volumeMounts:
- # - name: localtime
- # mountPath: /etc/localtime
- # volumes:
- # - name: localtime
- # hostPath:
- # path: /usr/share/zoneinfo/Asia/Shanghai
- imagePullSecrets:
- - name : docker-harbor
- restartPolicy: Always
|