Skip to content

Commit e6c1047

Browse files
authored
Merge pull request #8934 from zalando-incubator/postgresql-owning-app
Enable postgresql owning-application annotation check in prod
2 parents dd4d7d6 + 787183c commit e6c1047

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

cluster/config-defaults.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,7 @@ teapot_admission_controller_validate_pod_template_resources: "true"
605605
teapot_admission_controller_preemption_enabled: "true"
606606
teapot_admission_controller_postgresql_delete_protection_enabled: "true"
607607
teapot_admission_controller_namespace_delete_protection_enabled: "true"
608+
teapot_admission_controller_postgresql_owning_application_check_enabled: "true"
608609
{{else if eq .Cluster.Environment "e2e"}}
609610
teapot_admission_controller_validate_application_label: "false"
610611
teapot_admission_controller_validate_base_images: "false"
@@ -616,6 +617,7 @@ teapot_admission_controller_validate_pod_template_resources: "false"
616617
teapot_admission_controller_preemption_enabled: "true"
617618
teapot_admission_controller_postgresql_delete_protection_enabled: "false"
618619
teapot_admission_controller_namespace_delete_protection_enabled: "false"
620+
teapot_admission_controller_postgresql_owning_application_check_enabled: "false"
619621
{{else}}
620622
teapot_admission_controller_validate_application_label: "false"
621623
teapot_admission_controller_validate_base_images: "false"
@@ -627,6 +629,7 @@ teapot_admission_controller_validate_pod_template_resources: "true"
627629
teapot_admission_controller_preemption_enabled: "false"
628630
teapot_admission_controller_postgresql_delete_protection_enabled: "false"
629631
teapot_admission_controller_namespace_delete_protection_enabled: "false"
632+
teapot_admission_controller_postgresql_owning_application_check_enabled: "false"
630633
{{end}}
631634

632635
# Enable automatic replacement of vanity images with ECR images

cluster/manifests/01-admission-control/config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ data:
173173
priorityclass.preemption.enable: "{{ .Cluster.ConfigItems.teapot_admission_controller_preemption_enabled }}"
174174

175175
postgresql.delete-protection.enable: "{{ .Cluster.ConfigItems.teapot_admission_controller_postgresql_delete_protection_enabled }}"
176+
postgresql.owning-application-check.enable: "{{ .Cluster.ConfigItems.teapot_admission_controller_postgresql_owning_application_check_enabled }}"
176177

177178
namespace.delete-protection.enable: "{{ .Cluster.ConfigItems.teapot_admission_controller_namespace_delete_protection_enabled }}"
178179

cluster/manifests/01-admission-control/teapot.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ webhooks:
222222
sideEffects: "NoneOnDryRun"
223223
matchPolicy: Equivalent
224224
rules:
225-
- operations: [ "CREATE", "DELETE" ]
225+
- operations: [ "CREATE", "DELETE", "UPDATE" ]
226226
apiGroups: ["acid.zalan.do"]
227227
apiVersions: ["v1"]
228228
resources: ["postgresqls"]

0 commit comments

Comments
 (0)