cleanup naming

This commit is contained in:
2025-10-29 06:53:38 -05:00
parent bef187c121
commit 8500e6a126

View File

@@ -34,7 +34,7 @@ spec:
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingAdmissionPolicy
metadata:
name: "force-stage-ns-prefix-for-stage-editor"
name: "force-ns-prefix-for-stage-create-update"
spec:
failurePolicy: Fail
matchConstraints:
@@ -48,14 +48,14 @@ spec:
expression: "request.userInfo.username == 'system:serviceaccount:ontime-operator:stage-editor'"
validations:
- expression: "object.metadata.namespace.startsWith('team-')"
message: "Stages must be created in namespaces starting with 'team-'"
message: "Stages must be managed in namespaces starting with 'team-'"
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingAdmissionPolicyBinding
metadata:
name: "force-stage-ns-prefix-for-stage-editor-binding"
name: "force-ns-prefix-for-stage-create-update-binding"
spec:
policyName: "force-stage-ns-prefix-for-stage-editor"
policyName: "force-ns-prefix-for-stage-create-update"
validationActions: [Deny]
matchResources:
resourceRules:
@@ -67,7 +67,7 @@ spec:
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingAdmissionPolicy
metadata:
name: "force-stage-ns-prefix-for-stage-editor-delete"
name: "force-ns-prefix-for-stage-editor-delete"
spec:
failurePolicy: Fail
matchConstraints:
@@ -81,14 +81,14 @@ spec:
expression: "request.userInfo.username == 'system:serviceaccount:ontime-operator:stage-editor'"
validations:
- expression: "request.namespace.startsWith('team-')"
message: "Stages must be created in namespaces starting with 'team-'"
message: "Stages must be managed in namespaces starting with 'team-'"
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingAdmissionPolicyBinding
metadata:
name: "force-stage-ns-prefix-for-stage-editor-delete-binding"
name: "force-ns-prefix-for-stage-editor-delete-binding"
spec:
policyName: "force-stage-ns-prefix-for-stage-editor-delete"
policyName: "force-ns-prefix-for-stage-editor-delete"
validationActions: [Deny]
matchResources:
resourceRules: