Skip to content

Instantly share code, notes, and snippets.

@pivotaljohn
Created May 4, 2021 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pivotaljohn/de4268fe2cbafdaa6fc17cef76909dfe to your computer and use it in GitHub Desktop.
Save pivotaljohn/de4268fe2cbafdaa6fc17cef76909dfe to your computer and use it in GitHub Desktop.
encoding some YAML
---
kind: ConfigMap
data: {}
#@ load("@ytt:overlay", "overlay")
#@ load("@ytt:data", "data")
#@ load("@ytt:yaml", "yaml")
#@overlay/match by=overlay.subset({"kind":"ConfigMap"})
---
data:
#@overlay/match missing_ok=True
config.yaml: #@ yaml.encode(data.values.config_file_contents)
#@data/values
---
config_file_contents:
server:
type: foo
name: bar
timeout: 5s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment