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