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