[16.02.20] Fixed deployment settings
This commit is contained in:
parent
f351176daa
commit
a4659e76e5
@ -1,19 +1,18 @@
|
||||
apiVersion: v1
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
name: LABEL
|
||||
name: RESOURCE_NAME
|
||||
namespace: production
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
app: RESOURCE_NAME
|
||||
matchLabels:
|
||||
app: RESOURCE_NAME
|
||||
strategy:
|
||||
type: Rolling
|
||||
rollingParams:
|
||||
updatePeriodSeconds: 1
|
||||
intervalSeconds: 1
|
||||
timeoutSeconds: 300
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxSurge: 25%
|
||||
maxUnavailable: 0
|
||||
template:
|
||||
@ -22,9 +21,9 @@ spec:
|
||||
app: RESOURCE_NAME
|
||||
spec:
|
||||
containers:
|
||||
- name: RESOURCE_NAME
|
||||
image: REPOSITORY/IMAGE
|
||||
env:
|
||||
- image: REPOSITORY/IMAGE
|
||||
name: RESOURCE_NAME
|
||||
env:
|
||||
- name: KUBERNETES_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
@ -53,12 +52,24 @@ spec:
|
||||
secretKeyRef:
|
||||
name: jdbc
|
||||
key: jdbc.password
|
||||
imagePullPolicy: Always
|
||||
resources:
|
||||
requests:
|
||||
cpu: 0.25
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 0.5
|
||||
memory: 256Mi
|
||||
ports:
|
||||
- containerPort: 9090
|
||||
name: RESOURCE_NAME
|
||||
# readinessProbe:
|
||||
# httpGet:
|
||||
# path: /
|
||||
# port: 9090
|
||||
# timeoutSeconds: 2
|
||||
# successThreshold: 2
|
||||
# failureThreshold: 2
|
||||
imagePullPolicy: Always
|
||||
resources:
|
||||
requests:
|
||||
cpu: 0.25
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 0.5
|
||||
memory: 256Mi
|
||||
restartPolicy: Always
|
||||
imagePullSecrets:
|
||||
- name: registry-secret
|
||||
@ -2,14 +2,13 @@ kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
labels:
|
||||
name: LABEL
|
||||
name: RESOURCE_NAME
|
||||
name: gateway
|
||||
name: db-gateway
|
||||
spec:
|
||||
selector:
|
||||
app: RESOURCE_NAME
|
||||
app: db-gateway
|
||||
ports:
|
||||
- port: 9090
|
||||
protocol: TCP
|
||||
targetPort: 9090
|
||||
sessionAffinity: None
|
||||
type: ClusterIP
|
||||
|
||||
@ -72,10 +72,10 @@ try {
|
||||
stage('Build Image') {
|
||||
mvn 'clean package -DskipTests'
|
||||
|
||||
sh "sed -i 's/REPOSITORY/${env.DOCKER_REPOSITORY}/g' configuration/kubernetes/deploy-config.yaml"
|
||||
sh "sed -i 's/IMAGE/${env.APPLICATION_NAME}:${env.APPLICATION_VERSION}/g' configuration/kubernetes/deploy-config.yaml"
|
||||
sh "sed -i 's/RESOURCE_NAME/${env.APPLICATION_NAME}/g' configuration/kubernetes/deploy-config.yaml"
|
||||
sh "sed -i 's/LABEL/${env.APPLICATION_LABEL}/g' configuration/kubernetes/deploy-config.yaml"
|
||||
sh "sed -i 's/REPOSITORY/${env.DOCKER_REPOSITORY}/g' configuration/kubernetes/deployment.yaml"
|
||||
sh "sed -i 's/IMAGE/${env.APPLICATION_NAME}:${env.APPLICATION_VERSION}/g' configuration/kubernetes/deployment.yaml"
|
||||
sh "sed -i 's/RESOURCE_NAME/${env.APPLICATION_NAME}/g' configuration/kubernetes/deployment.yaml"
|
||||
sh "sed -i 's/LABEL/${env.APPLICATION_LABEL}/g' configuration/kubernetes/deployment.yaml"
|
||||
|
||||
sh "sed -it 's/RESOURCE_NAME/${env.APPLICATION_NAME}/g' configuration/kubernetes/service.yaml"
|
||||
sh "sed -it 's/LABEL/${env.APPLICATION_LABEL}/g' configuration/kubernetes/service.yaml"
|
||||
|
||||
@ -19,6 +19,5 @@ spring:
|
||||
org.hibernate.jdbc.lob.non_contextual_creation: true
|
||||
format_sql: true
|
||||
database: postgresql
|
||||
|
||||
server:
|
||||
port: 9090
|
||||
Loading…
x
Reference in New Issue
Block a user