Skip to content

Instantly share code, notes, and snippets.

@making
Created February 28, 2021 05:33
Show Gist options
  • Save making/5875519ce58d8a7060e9c533159e83d1 to your computer and use it in GitHub Desktop.
Save making/5875519ce58d8a7060e9c533159e83d1 to your computer and use it in GitHub Desktop.
全リソースのnamespaceを設定したい
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: demo
name: demo
spec:
replicas: 1
selector:
matchLabels:
app: demo
template:
metadata:
labels:
app: demo
spec:
containers:
- image: ghcr.io/making/hello-tanzu
name: hello-tanzu
#@ load("@ytt:overlay", "overlay")
apiVersion: v1
kind: Namespace
metadata:
name: demo
#@overlay/match by=overlay.not_op(overlay.subset({"kind":"Namespace"})),expects="1+"
---
metadata:
#@overlay/match missing_ok=True
namespace: demo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment