Skip to content

Commit

Permalink
updates to deploy and secret yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
marcel-dempers committed Sep 15, 2019
1 parent 1dd2779 commit e66d185
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 7 deletions.
27 changes: 20 additions & 7 deletions kubernetes/deployments/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
12 changes: 12 additions & 0 deletions kubernetes/secrets/secret.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e66d185

Please sign in to comment.