Skip to content

Instantly share code, notes, and snippets.

@ThomasVitale
Last active September 4, 2023 17:19
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 ThomasVitale/ab58531ecd916ec0c83908e7cf86a596 to your computer and use it in GitHub Desktop.
Save ThomasVitale/ab58531ecd916ec0c83908e7cf86a596 to your computer and use it in GitHub Desktop.
ytt yaml fragment snippet
#@data/values-schema
---
service:
enabled: true
#@ load("@ytt:data", "data")
#@ load("@ytt:yaml", "yaml")
#@ def service():
---
kind: Service
apiVersion: v1
metadata:
name: echo-service
spec:
selector:
app: echo
ports:
- name: my-port
port: 8080
#@ end
#@ if/end data.values.service.enabled:
---
#@ service()
#!@ yaml.encode(service())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment