Created
July 24, 2020 18:16
-
-
Save harsimranmaan/81821943dde73ba9570c2f793d7d1760 to your computer and use it in GitHub Desktop.
The deployment and config maps objects for my-app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local p = import '../params.libsonnet'; | |
local params = p.components.hello; | |
[ | |
{ | |
apiVersion: 'v1', | |
kind: 'ConfigMap', | |
metadata: { | |
name: 'demo-config', | |
}, | |
data: { | |
'index.html': params.indexData, | |
}, | |
}, | |
{ | |
apiVersion: 'apps/v1', | |
kind: 'Deployment', | |
metadata: { | |
name: 'demo-deploy', | |
labels: { | |
app: 'demo-deploy', | |
}, | |
}, | |
spec: { | |
replicas: params.replicas, | |
selector: { | |
matchLabels: { | |
app: 'demo-deploy', | |
}, | |
}, | |
template: { | |
metadata: { | |
labels: { | |
app: 'demo-deploy', | |
}, | |
}, | |
spec: { | |
containers: [ | |
{ | |
name: 'main', | |
image: 'nginx:stable', | |
imagePullPolicy: 'Always', | |
volumeMounts: [ | |
{ | |
name: 'web', | |
mountPath: '/usr/share/nginx/html', | |
}, | |
], | |
}, | |
], | |
volumes: [ | |
{ | |
name: 'web', | |
configMap: { | |
name: 'demo-config', | |
}, | |
}, | |
], | |
}, | |
}, | |
}, | |
}, | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment