mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-04 11:31:26 +02:00
Allow services update when changing annotations (#818)
The current implementations for `pkg.util.k8sutil.SameService` considers only service annotations change on the default annotations created by the operator. Custom annotations are not compared and consequently not applied after the first service creation. This commit introduces a complete annotations comparison between the current service created by the operator and the new one generated based on the configs. Also, it adds tests on the above-mentioned function.
This commit is contained in:
+10
-1
@@ -270,7 +270,16 @@ class EndToEndTestCase(unittest.TestCase):
|
||||
}
|
||||
k8s.update_config(patch_custom_service_annotations)
|
||||
|
||||
k8s.create_with_kubectl("manifests/postgres-manifest-with-service-annotations.yaml")
|
||||
pg_patch_custom_annotations = {
|
||||
"spec": {
|
||||
"serviceAnnotations": {
|
||||
"annotation.key": "value"
|
||||
}
|
||||
}
|
||||
}
|
||||
k8s.api.custom_objects_api.patch_namespaced_custom_object(
|
||||
"acid.zalan.do", "v1", "default", "postgresqls", "acid-minimal-cluster", pg_patch_custom_annotations)
|
||||
|
||||
annotations = {
|
||||
"annotation.key": "value",
|
||||
"foo": "bar",
|
||||
|
||||
Reference in New Issue
Block a user