This commit is contained in:
61
deployment-temp.yml
Normal file
61
deployment-temp.yml
Normal file
@@ -0,0 +1,61 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: $APP_NAME
|
||||
version: $APP_TAG
|
||||
name: $APP_NAME
|
||||
namespace: default
|
||||
spec:
|
||||
progressDeadlineSeconds: 600
|
||||
replicas: 1
|
||||
revisionHistoryLimit: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: $APP_NAME
|
||||
strategy:
|
||||
rollingUpdate:
|
||||
maxSurge: 50%
|
||||
maxUnavailable: 50%
|
||||
type: RollingUpdate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: $APP_NAME
|
||||
version: $APP_TAG
|
||||
spec:
|
||||
containers:
|
||||
- image: $REGISTRY/$IMAGE_NAMESPACE/$IMAGE_NAME:$APP_TAG
|
||||
name: $APP_NAME
|
||||
imagePullPolicy: Always
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: 9090
|
||||
initialDelaySeconds: 1
|
||||
timeoutSeconds: 10
|
||||
failureThreshold: 30
|
||||
successThreshold: 5
|
||||
ports:
|
||||
- containerPort: 9090
|
||||
imagePullSecrets:
|
||||
- name: dockerhub-id
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: $APP_NAME
|
||||
name: $APP_NAME
|
||||
namespace: default
|
||||
spec:
|
||||
type: NodePort
|
||||
externalTrafficPolicy: Local
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: 9090
|
||||
nodePort: 9090
|
||||
selector:
|
||||
app: $APP_NAME
|
||||
Reference in New Issue
Block a user