Skip to content

Commit

Permalink
Update namespace field value
Browse files Browse the repository at this point in the history
Signed-off-by: Qi Tan <[email protected]>
  • Loading branch information
TQJADE committed Feb 5, 2025
1 parent 29261f3 commit 653b84e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions content/en/docs/writing-policies/generate.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ spec:
kind: ConfigMap
name: zk-kafka-address
# generate the resource in the new namespace
namespace: "{{request.object.metadata.name}}"
namespace: "{{request.object.metadata.namespace}}"
data:
kind: ConfigMap
metadata:
Expand Down Expand Up @@ -115,7 +115,7 @@ spec:
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
name: deny-all-traffic
namespace: "{{request.object.metadata.name}}"
namespace: "{{request.object.metadata.namespace}}"
data:
spec:
# select all pods in the namespace
Expand Down Expand Up @@ -173,7 +173,7 @@ spec:
apiVersion: v1
kind: Secret
name: regcred
namespace: "{{request.object.metadata.name}}"
namespace: "{{request.object.metadata.namespace}}"
synchronize: true
clone:
namespace: default
Expand Down Expand Up @@ -208,7 +208,7 @@ spec:
- kube-public
- kyverno
generate:
namespace: "{{request.object.metadata.name}}"
namespace: "{{request.object.metadata.namespace}}"
synchronize: true
cloneList:
namespace: staging
Expand Down Expand Up @@ -280,7 +280,7 @@ spec:
data:
metadata:
labels:
request.namespace: '{{ request.object.metadata.name }}'
request.namespace: '{{ request.object.metadata.namespace }}'
element: '{{ element }}'
elementIndex: '{{ elementIndex }}'
spec:
Expand Down Expand Up @@ -439,7 +439,7 @@ spec:
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
name: steven-rolebinding
namespace: "{{request.object.metadata.name}}"
namespace: "{{request.object.metadata.namespace}}"
data:
subjects:
- kind: User
Expand Down Expand Up @@ -530,7 +530,7 @@ spec:
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
name: default-deny
namespace: "{{request.object.metadata.name}}"
namespace: "{{request.object.metadata.namespace}}"
synchronize: true
data:
metadata:
Expand Down

0 comments on commit 653b84e

Please sign in to comment.