Last active
September 8, 2017 10:41
-
-
Save ant31/43e82d9e6478ed3b197676125ac1c901 to your computer and use it in GitHub Desktop.
Kpm Manfiests
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
# Manifest 'hand-written' by the user | |
# metadata: ~equivalent to Chart.yaml | |
package: | |
name: foo/bar | |
version: 0.0.1 | |
# List resources to deploy | |
resources: | |
# can be a template | |
# jinja2 | |
- template: deployment.yaml.j2 | |
expander: jinja2 | |
# jsonnet | |
- template: svc.jsonnet | |
expander: jsonnet | |
# can be a file-path to import | |
- file: ingress.yaml | |
# can be an inlined resource | |
- value: {apiVersion: 'v1', kind: 'ServiceAccount', | |
metadata: {name: 'app-sa'}} | |
# Could be a globing / recursive walk (No-implemented) | |
- file: resources/**/*.yaml | |
recursive: true | |
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
# Manifest generated to be consumed by the CLI / API | |
# Difference: resources are expanded and all included | |
package: | |
name: foo/bar | |
version: 0.0.1 | |
# List resources to deploy | |
resources: | |
# the jinja2 resource | |
- {"kind": "Deployment", | |
"spec": { | |
"template": { | |
"spec": { | |
.... | |
# the jsonnet resource | |
- {"kind": "Service", | |
"spec": { | |
"type": "ClusterIP", | |
"ports": [ | |
{ | |
"targetPort": 80, | |
"protocol": "TCP", | |
"port": 80 | |
} | |
],} | |
# inlined resource | |
- {apiVersion: 'v1', kind: 'ServiceAccount', | |
metadata: {name: 'app-sa'}} | |
- ... |
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
# Same than manifest.yaml, but using jsonnet | |
package: { | |
name: "foo/bar", | |
version: "0.0.1"}, | |
resources: [ | |
# can be a template | |
# jinja2 | |
import("deployment.jsonnet"), | |
import("svc.jsonnet"), | |
import("...") | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment