updates to deploy and secret yaml

This commit is contained in:
marcel-dempers 2019-09-15 13:09:45 +10:00
parent 1dd2779121
commit e66d185444
2 changed files with 32 additions and 7 deletions

View File

@ -6,7 +6,15 @@ metadata:
app: example-app app: example-app
annotations: annotations:
spec: spec:
selector:
matchLabels:
app: example-app
replicas: 2 replicas: 2
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
template: template:
metadata: metadata:
labels: labels:
@ -31,10 +39,15 @@ spec:
limits: limits:
memory: "256Mi" memory: "256Mi"
cpu: "500m" cpu: "500m"
volumeMouts: volumeMounts:
- name: config-volume - name: secret-volume
mountPath: /configs/ mountPath: /secrets/
volumes: - name: config-volume
- name: config-volume mountPath: /configs/
configMap: volumes:
name: example-config #name of our configmap object - name: secret-volume
secret:
secretName: mysecret
- name: config-volume
configMap:
name: example-config #name of our configmap object

View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: Secret
metadata:
name: mysecret
type: Opaque
stringData:
secret.json: |-
{
"api_key" : "somesecretgoeshere"
}
#kubectl create secret generic mysecret --from-file .\golang\secrets\secret.json