From efaca05999da1b3869b3a386f21883213b472386 Mon Sep 17 00:00:00 2001 From: Monis Khan Date: Wed, 15 Sep 2021 16:08:49 -0400 Subject: [PATCH] prevent kapp from altering the selector of our services This makes it so that our service selector will match exactly the YAML we specify instead of including an extra "kapp.k14s.io/app" key. This will take us closer to the standard kubectl behavior which is desirable since we want to avoid future bugs that only manifest when kapp is not used. Signed-off-by: Monis Khan --- deploy/concierge/deployment.yaml | 6 ++++++ deploy/local-user-authenticator/deployment.yaml | 3 +++ deploy/supervisor/service.yaml | 9 +++++++++ 3 files changed, 18 insertions(+) diff --git a/deploy/concierge/deployment.yaml b/deploy/concierge/deployment.yaml index 612e1158..6cfbf09e 100644 --- a/deploy/concierge/deployment.yaml +++ b/deploy/concierge/deployment.yaml @@ -242,6 +242,9 @@ metadata: name: #@ defaultResourceNameWithSuffix("api") namespace: #@ namespace() labels: #@ labels() + #! prevent kapp from altering the selector of our services to match kubectl behavior + annotations: + kapp.k14s.io/disable-default-label-scoping-rules: "" spec: type: ClusterIP selector: #@ deploymentPodLabel() @@ -256,6 +259,9 @@ metadata: name: #@ defaultResourceNameWithSuffix("proxy") namespace: #@ namespace() labels: #@ labels() + #! prevent kapp from altering the selector of our services to match kubectl behavior + annotations: + kapp.k14s.io/disable-default-label-scoping-rules: "" spec: type: ClusterIP selector: #@ deploymentPodLabel() diff --git a/deploy/local-user-authenticator/deployment.yaml b/deploy/local-user-authenticator/deployment.yaml index 258f1c5f..bb154f81 100644 --- a/deploy/local-user-authenticator/deployment.yaml +++ b/deploy/local-user-authenticator/deployment.yaml @@ -73,6 +73,9 @@ metadata: namespace: local-user-authenticator labels: app: local-user-authenticator + #! prevent kapp from altering the selector of our services to match kubectl behavior + annotations: + kapp.k14s.io/disable-default-label-scoping-rules: "" spec: type: ClusterIP selector: diff --git a/deploy/supervisor/service.yaml b/deploy/supervisor/service.yaml index 669fa86d..b07fbd9c 100644 --- a/deploy/supervisor/service.yaml +++ b/deploy/supervisor/service.yaml @@ -12,6 +12,9 @@ metadata: name: #@ defaultResourceNameWithSuffix("nodeport") namespace: #@ namespace() labels: #@ labels() + #! prevent kapp from altering the selector of our services to match kubectl behavior + annotations: + kapp.k14s.io/disable-default-label-scoping-rules: "" spec: type: NodePort selector: #@ deploymentPodLabel() @@ -44,6 +47,9 @@ metadata: name: #@ defaultResourceNameWithSuffix("clusterip") namespace: #@ namespace() labels: #@ labels() + #! prevent kapp from altering the selector of our services to match kubectl behavior + annotations: + kapp.k14s.io/disable-default-label-scoping-rules: "" spec: type: ClusterIP selector: #@ deploymentPodLabel() @@ -70,6 +76,9 @@ metadata: name: #@ defaultResourceNameWithSuffix("loadbalancer") namespace: #@ namespace() labels: #@ labels() + #! prevent kapp from altering the selector of our services to match kubectl behavior + annotations: + kapp.k14s.io/disable-default-label-scoping-rules: "" spec: type: LoadBalancer selector: #@ deploymentPodLabel()