Skip to content

Instantly share code, notes, and snippets.

@juliuscanute
Created June 25, 2019 22:46
Show Gist options
  • Save juliuscanute/1fdd712bf1e019312fd15bcb58aec1f4 to your computer and use it in GitHub Desktop.
Save juliuscanute/1fdd712bf1e019312fd15bcb58aec1f4 to your computer and use it in GitHub Desktop.
Spring Boot Service Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "spring-demo.fullname" . }}-deployment
spec:
replicas: {{ .Values.scale }}
selector:
matchLabels:
app: {{ template "spring-demo.fullname" . }}-spring
template:
metadata:
labels:
app: {{ template "spring-demo.fullname" . }}-spring
spec:
containers:
- name: {{ template "spring-demo.fullname" . }}-container
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
envFrom:
- configMapRef:
name: {{ template "spring-demo.fullname" . }}-env
env:
- name: MYSQL_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-mysql
key: mysql-password
- name: JWT_SECRET
valueFrom:
secretKeyRef:
name: {{ template "spring-demo.fullname" . }}-jwt-secret
key: jwt-secret
ports:
- containerPort: 8080
imagePullSecrets:
- name: {{ template "spring-demo.fullname" . }}-acr-secret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment