gatekeeper
gatekeeper copied to clipboard
Provide a way to define multiple value for the same location in AssignMetadata
Describe the solution you'd like I would like to be able to define multiple values for the same location when using AssignMetadata, like this:
apiVersion: mutations.gatekeeper.sh/v1alpha1
kind: AssignMetadata
metadata:
name: jobs-ingress-annotation
namespace: gatekeeper-system
spec:
match:
scope: Namespaced
kinds:
- apiGroups: ["*"]
kinds: ["Ingress"]
namespaces: ["system-jobs"]
location: metadata.annotations
parameters:
assign:
value:
test/input1: tsmcx-isser
test/input2: tsmcx-isser
test/input3: tsmcx-isser
test/input4: tsmcx-isser
This would save the amount of code to write, and having to define those individually.
Anything else you would like to add: It would be also handy to be able to provide key word to be reused from the same object, here this value: spec.rules.http.paths.backend.service.name
apiVersion: mutations.gatekeeper.sh/v1alpha1
kind: AssignMetadata
metadata:
name: jobs-ingress-annotation
namespace: gatekeeper-system
spec:
match:
scope: Namespaced
kinds:
- apiGroups: ["*"]
kinds: ["Ingress"]
namespaces: ["system-jobs"]
location: metadata.annotations.test/input1
parameters:
assign:
value: { spec.rules.http.paths.backend.service.name }
Thanks.
Thanks for the feedback! This sounds like it may be similar to the functionality mentioned in #1348
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.