You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.8 KiB
66 lines
1.8 KiB
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
labels:
|
|
app: $APP_NAME
|
|
name: $APP_NAME
|
|
namespace: $NAME_SPACE
|
|
spec:
|
|
progressDeadlineSeconds: 600
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: $APP_NAME
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: $APP_NAME
|
|
spec:
|
|
containers:
|
|
- image: $REGISTRY/$DOCKERHUB_NAMESPACE/$APP_NAME:$NAME_SPACE
|
|
imagePullPolicy: Always
|
|
name: $APP_NAME-$BUILD_NUMBER
|
|
env:
|
|
- name: API_SERVER
|
|
value: "http://shuili-admin"
|
|
- name: NAME_SPACE
|
|
value: $NAME_SPACE
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 80
|
|
timeoutSeconds: 10
|
|
failureThreshold: 30
|
|
periodSeconds: 5
|
|
ports:
|
|
- containerPort: 80
|
|
protocol: TCP
|
|
resources:
|
|
limits:
|
|
cpu: 300m
|
|
memory: 600Mi
|
|
requests:
|
|
cpu: 100m
|
|
memory: 100Mi
|
|
terminationMessagePath: /dev/termination-log
|
|
terminationMessagePolicy: File
|
|
dnsPolicy: ClusterFirst
|
|
restartPolicy: Always
|
|
terminationGracePeriodSeconds: 30
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
labels:
|
|
app: $APP_NAME
|
|
name: $APP_NAME
|
|
namespace: $NAME_SPACE
|
|
spec:
|
|
ports:
|
|
- name: http
|
|
port: 80
|
|
protocol: TCP
|
|
targetPort: 80
|
|
selector:
|
|
app: $APP_NAME
|
|
sessionAffinity: None
|
|
|