Created
September 8, 2022 16:39
-
-
Save pivotaljohn/fbc564e32de808ebf5d9cb560f8f119f to your computer and use it in GitHub Desktop.
Set the namespace special for one resource
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
--- | |
kind: Deployment | |
metadata: | |
name: A | |
--- | |
kind: Deployment | |
metadata: | |
name: B | |
--- | |
kind: Deployment | |
metadata: | |
name: B | |
--- | |
kind: ConfigMap | |
metadata: | |
name: fluentd-config |
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
#@ load("@ytt:overlay", "overlay") | |
#@ fluentdConfigMap = overlay.subset({"kind": "ConfigMap", "metadata": {"name": "fluentd-config"}}) | |
#@overlay/match by=fluentdConfigMap | |
--- | |
metadata: | |
#@overlay/match missing_ok=True | |
namespace: kube-system | |
#@overlay/match by=overlay.not_op(fluentdConfigMap), expects="1+" | |
--- | |
metadata: | |
#@overlay/match missing_ok=True | |
namespace: fluentd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment