When you deploy an application package to an application group bound with Spring Cloud, the system injects configuration variables on Spring Cloud automatically.
Part of the contents of the values.yaml file:
replicaCount:1
global:
PLAT_SPRINGCLOUD:[]
advance:{}
nodeSelector:{}
tolerations:[]
affinity:{}
Part of the contents of the deployment file:
apiVersion:extensions/v1beta1
kind:Deployment
metadata:
annotations:
deployment.kubernetes.io/revision:"6"
labels:
app:demo-jar
name:demo-jar
spec:
progressDeadlineSeconds:600
replicas:1
selector:
matchLabels:
app:demo-jar
strategy:
rollingUpdate:
maxSurge:1
maxUnavailable:1
type:RollingUpdate
template:
metadata:
labels:
app:demo-jar
spec:
containers:
- env:
{{- range .Values.global.PLAT_SPRINGCLOUD}}
{{- range $key,$val := . }}
- name : {{ $key }}
value : {{ $val }}
{{- end}}
{{- end}}
- name:MAX_MEMORY_MB
value:"512"