This file contains hidden or 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
#@ load("@ytt:yaml", "yaml") | |
#@ load("@ytt:regexp", "regexp") | |
#@ load("@ytt:overlay", "overlay") | |
#@ def as_dict(parts, leaf): | |
#@ if len(parts) == 0: | |
#@ return leaf | |
#@ end | |
#@ return {parts[0]: as_dict(parts[1:], leaf)} | |
#@ end |
This file contains hidden or 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
#@ load("@ytt:data", "data") | |
#@ load("@ytt:yaml", "yaml") | |
#@ load("@ytt:struct", "struct") | |
#@ profiles = struct.make(full="full", is_any_enabled=lambda p: False) | |
#@ def grypeValues(grype): | |
#@ newGrype = yaml.decode(yaml.encode(grype)) | |
#@ | |
#@ if not profiles.is_any_enabled([profiles.full]) and not "metadataStore" in newGrype: |
This file contains hidden or 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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: foodb | |
namespace: knative-serving | |
labels: | |
app.kubernetes.io/name: knative-serving | |
app.kubernetes.io/version: 1.0 | |
app.kubernetes.io/component: database | |
spec: {} |
This file contains hidden or 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
#@ load("@ytt:data", "data") | |
#@ load("parse-input.star", "fruit_from_struct") | |
--- | |
fruits: #@ fruit_from_struct(data.values) |
This file contains hidden or 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
#@ load("@ytt:data", "data") | |
--- #@ data.values |
This file contains hidden or 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
#! .gitlab-ci.yml | |
#@ load("@ytt:template", "template") | |
#@ load("helpers.lib.yaml", "setup", "teardown") | |
test: | |
script: | |
- #@ template.replace(setup()) | |
- echo running my own command | |
- #@ template.replace(teardown()) |
This file contains hidden or 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
--- | |
vlans: | |
- vlan-id: 10 | |
- vlan-id: 20 | |
- vlan-id: 30 | |
some_other_configuration: #! some other config here |
This file contains hidden or 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
kind: SecretProviderClass | |
metadata: | |
namespace: default | |
name: db_credentials | |
spec: | |
provider: aws | |
parameters: | |
objects: | | |
- objectName: TO_BE_REPLACED_BY_YTT | |
objectType: "secretsmanager" |
This file contains hidden or 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
#@ load("@ytt:data", "data") | |
#@ def get_package_repository(repository_name, package_name): | |
#@ if repository_name == "": | |
#@ for repository in data.values.repositories: | |
#@ for package in data.values.repositories[repository].packages: | |
#@ if package.name == package_name: | |
#@ return data.values.repositories[repository] | |
#@ end | |
#@ end |
This file contains hidden or 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
#@ load("@ytt:data", "data") | |
#@ def removeprefix(prefix, s): | |
#@ return s[len(prefix):] if s.startswith(prefix) else s | |
#@ end | |
#@ def config_key_for(auth_var_expr): | |
#@ var_name_parts = \ | |
#@ removeprefix("..._", auth_var_expr) \ | |
#@ .split("_") |