diff --git a/infrastructure/ontime-operator/namespace-prefix-policy.yaml b/infrastructure/ontime-operator/namespace-prefix-policy.yaml index 42210ca..2ff640d 100644 --- a/infrastructure/ontime-operator/namespace-prefix-policy.yaml +++ b/infrastructure/ontime-operator/namespace-prefix-policy.yaml @@ -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: