-
Notifications
You must be signed in to change notification settings - Fork 880
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commonLabels need to be immutable to support upgrading. (#1140)
* Fix #1131 * kustomize commonLabels get subsituted into selector fields. Selector fields are immutable. So if commonLabels change (e.g. between versions) then we can't reapply/update the existing resources which breaks upgrades (kubeflow/kfctl#304) * For the most part the problematic commonLabels were on our Application resources. The following labels were being set "app.kubernetes.io/version" "app.kubernetes.io/instance" "app.kubernetes.io/managed-by" "app.kubernetes.io/part-of" * Version was definetely changing between versions. instance was also changing between versions to include the version number. * managed-by and part-of could also change (e.g. we may not be using kfctl) * We could still set these labels if we wanted to; we just shouldn't set them as commonLabels and/or include them in the selector as the will inhibit upgrades with kubectl apply. * I created a test validate_resources_test.go to ensure none of these labels are included in commonLabels * I created a simple go binary tools/fix_common_labels.go to update all the resources. * generat_tests.py - Delete the code to remove unmatched tests. * We no longer generate tests that way and the delete code was going to delete valid tests like our new validation test * Get rid of the clean rule in the Makefile for the same reason.
- Loading branch information
Showing
179 changed files
with
446 additions
and
1,133 deletions.
There are no files selected for viewing
12 changes: 4 additions & 8 deletions
12
admission-webhook/bootstrap/overlays/application/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
bases: | ||
- ../../base | ||
resources: | ||
- application.yaml | ||
commonLabels: | ||
app.kubernetes.io/name: bootstrap | ||
app.kubernetes.io/instance: bootstrap-v0.7.0 | ||
app.kubernetes.io/managed-by: kfctl | ||
app.kubernetes.io/component: bootstrap | ||
app.kubernetes.io/part-of: kubeflow | ||
app.kubernetes.io/version: v0.7.0 | ||
app.kubernetes.io/name: bootstrap | ||
kind: Kustomization | ||
resources: | ||
- application.yaml |
12 changes: 4 additions & 8 deletions
12
admission-webhook/webhook/overlays/application/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
bases: | ||
- ../../base | ||
resources: | ||
- application.yaml | ||
commonLabels: | ||
app.kubernetes.io/name: webhook | ||
app.kubernetes.io/instance: webhook-v0.7.0 | ||
app.kubernetes.io/managed-by: kfctl | ||
app.kubernetes.io/component: webhook | ||
app.kubernetes.io/part-of: kubeflow | ||
app.kubernetes.io/version: v0.7.0 | ||
app.kubernetes.io/name: webhook | ||
kind: Kustomization | ||
resources: | ||
- application.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,8 @@ | ||
# TODO(https://github.com/kubeflow/manifests/issues/1052): Refactor | ||
# and cleanup the kustomization once the v3 migration is done. | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
commonLabels: | ||
app.kubernetes.io/component: poddefaults | ||
app.kubernetes.io/name: poddefaults | ||
kind: Kustomization | ||
resources: | ||
# With v3 we want to always use cert-manager to get the | ||
# self-signed certificate | ||
- ../overlays/cert-manager/ | ||
- ../overlays/application/application.yaml | ||
commonLabels: | ||
app.kubernetes.io/name: poddefaults | ||
app.kubernetes.io/instance: poddefaults-v0.7.0 | ||
app.kubernetes.io/managed-by: kfctl | ||
app.kubernetes.io/component: poddefaults | ||
app.kubernetes.io/part-of: kubeflow | ||
app.kubernetes.io/version: v0.7.0 |
12 changes: 4 additions & 8 deletions
12
application/application/overlays/application/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
bases: | ||
- ../../base | ||
resources: | ||
- application.yaml | ||
commonLabels: | ||
app.kubernetes.io/name: kubeflow | ||
app.kubernetes.io/instance: kubeflow-v0.7.0 | ||
app.kubernetes.io/managed-by: kfctl | ||
app.kubernetes.io/component: kubeflow | ||
app.kubernetes.io/part-of: kubeflow | ||
app.kubernetes.io/version: v0.7.0 | ||
app.kubernetes.io/name: kubeflow | ||
kind: Kustomization | ||
resources: | ||
- application.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
bases: | ||
- ../../base | ||
resources: | ||
- application.yaml | ||
commonLabels: | ||
app.kubernetes.io/name: argo | ||
app.kubernetes.io/instance: argo-v2.3.0 | ||
app.kubernetes.io/managed-by: kfctl | ||
app.kubernetes.io/component: argo | ||
app.kubernetes.io/part-of: kubeflow | ||
app.kubernetes.io/version: v2.3.0 | ||
app.kubernetes.io/name: argo | ||
kind: Kustomization | ||
resources: | ||
- application.yaml |
11 changes: 3 additions & 8 deletions
11
aws/aws-alb-ingress-controller/overlays/application/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
commonLabels: | ||
app.kubernetes.io/component: aws-alb-ingress-controller | ||
app.kubernetes.io/name: aws-alb-ingress-controller | ||
kind: Kustomization | ||
resources: | ||
- ../../base | ||
- application.yaml | ||
commonLabels: | ||
app.kubernetes.io/name: aws-alb-ingress-controller | ||
app.kubernetes.io/instance: aws-alb-ingress-controller-v0.7.0 | ||
app.kubernetes.io/managed-by: kfctl | ||
app.kubernetes.io/component: aws-alb-ingress-controller | ||
app.kubernetes.io/part-of: kubeflow | ||
app.kubernetes.io/version: v0.7.0 | ||
|
12 changes: 4 additions & 8 deletions
12
aws/aws-istio-authz-adaptor/overlays/application/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
bases: | ||
- ../../base | ||
resources: | ||
- application.yaml | ||
commonLabels: | ||
app.kubernetes.io/name: aws-istio-authz-adaptor | ||
app.kubernetes.io/instance: aws-istio-authz-adaptor-0.1 | ||
app.kubernetes.io/managed-by: kfctl | ||
app.kubernetes.io/component: aws-istio-authz-adaptor | ||
app.kubernetes.io/part-of: kubeflow | ||
app.kubernetes.io/version: "0.1" | ||
app.kubernetes.io/name: aws-istio-authz-adaptor | ||
kind: Kustomization | ||
resources: | ||
- application.yaml |
12 changes: 4 additions & 8 deletions
12
aws/nvidia-device-plugin/overlays/application/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
bases: | ||
- ../../base | ||
resources: | ||
- application.yaml | ||
commonLabels: | ||
app.kubernetes.io/name: nvidia-device-plugin | ||
app.kubernetes.io/instance: nvidia-device-plugin-1.0.0-beta | ||
app.kubernetes.io/managed-by: kfctl | ||
app.kubernetes.io/component: nvidia-device-plugin | ||
app.kubernetes.io/part-of: kubeflow | ||
app.kubernetes.io/version: v1.0.0-beta | ||
app.kubernetes.io/name: nvidia-device-plugin | ||
kind: Kustomization | ||
resources: | ||
- application.yaml |
16 changes: 6 additions & 10 deletions
16
cert-manager/cert-manager/overlays/application/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
bases: | ||
- ../../base | ||
resources: | ||
- application.yaml | ||
configurations: | ||
- params.yaml | ||
commonLabels: | ||
app.kubernetes.io/name: cert-manager | ||
app.kubernetes.io/instance: cert-manager | ||
app.kubernetes.io/managed-by: kfctl | ||
app.kubernetes.io/component: cert-manager | ||
app.kubernetes.io/part-of: kubeflow | ||
|
||
app.kubernetes.io/name: cert-manager | ||
configurations: | ||
- params.yaml | ||
kind: Kustomization | ||
resources: | ||
- application.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
# TODO(https://github.com/kubeflow/manifests/issues/1052) clean up the manifests | ||
# after the refactor is done. | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: cert-manager | ||
commonLabels: | ||
app.kubernetes.io/name: cert-manager | ||
app.kubernetes.io/instance: cert-manager | ||
app.kubernetes.io/managed-by: kfctl | ||
app.kubernetes.io/component: cert-manager | ||
app.kubernetes.io/part-of: kubeflow | ||
app.kubernetes.io/name: cert-manager | ||
kind: Kustomization | ||
namespace: cert-manager | ||
resources: | ||
- ../overlays/application/application.yaml |
10 changes: 3 additions & 7 deletions
10
common/centraldashboard/overlays/application/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
commonLabels: | ||
app.kubernetes.io/component: centraldashboard | ||
app.kubernetes.io/name: centraldashboard | ||
kind: Kustomization | ||
resources: | ||
- application.yaml | ||
commonLabels: | ||
app.kubernetes.io/name: centraldashboard | ||
app.kubernetes.io/instance: centraldashboard-v0.7.0 | ||
app.kubernetes.io/managed-by: kfctl | ||
app.kubernetes.io/component: centraldashboard | ||
app.kubernetes.io/part-of: kubeflow | ||
app.kubernetes.io/version: v0.7.0 |
14 changes: 2 additions & 12 deletions
14
common/centraldashboard/overlays/stacks/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,12 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
commonLabels: | ||
app.kubernetes.io/component: centraldashboard | ||
app.kubernetes.io/instance: centraldashboard-v1.0.0 | ||
app.kubernetes.io/managed-by: kfctl | ||
app.kubernetes.io/name: centraldashboard | ||
app.kubernetes.io/part-of: kubeflow | ||
app.kubernetes.io/version: v1.0.0 | ||
kind: Kustomization | ||
namespace: kubeflow | ||
patchesStrategicMerge: | ||
- deployment_kf_config.yaml | ||
resources: | ||
- ../../base_v3 | ||
# TODO(jlewi): istio and application are really patches | ||
# not "overlays" in that they are expected to be used as mixins. | ||
# Perhaps move this into mixins to make this more obvious. | ||
- ../../overlays/istio | ||
- ../../overlays/application | ||
patchesStrategicMerge: | ||
# Pull in the patch which will configure central dashboard using a kubeflow | ||
# configmap | ||
- deployment_kf_config.yaml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
bases: | ||
- ../../base | ||
resources: | ||
- application.yaml | ||
commonLabels: | ||
app.kubernetes.io/name: spartakus | ||
app.kubernetes.io/instance: spartakus-v0.7.0 | ||
app.kubernetes.io/managed-by: kfctl | ||
app.kubernetes.io/component: spartakus | ||
app.kubernetes.io/part-of: kubeflow | ||
app.kubernetes.io/version: v0.7.0 | ||
app.kubernetes.io/name: spartakus | ||
kind: Kustomization | ||
resources: | ||
- application.yaml |
12 changes: 4 additions & 8 deletions
12
gcp/basic-auth-ingress/overlays/application/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
bases: | ||
- ../../base | ||
resources: | ||
- application.yaml | ||
commonLabels: | ||
app.kubernetes.io/name: basic-auth-ingress | ||
app.kubernetes.io/instance: basic-auth-ingress-v0.7.0 | ||
app.kubernetes.io/managed-by: kfctl | ||
app.kubernetes.io/component: basic-auth-ingress | ||
app.kubernetes.io/part-of: kubeflow | ||
app.kubernetes.io/version: v0.7.0 | ||
app.kubernetes.io/name: basic-auth-ingress | ||
kind: Kustomization | ||
resources: | ||
- application.yaml |
14 changes: 5 additions & 9 deletions
14
gcp/cloud-endpoints/overlays/application/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,10 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: kubeflow | ||
bases: | ||
- ../../base | ||
resources: | ||
- application.yaml | ||
commonLabels: | ||
app.kubernetes.io/name: cloud-endpoints | ||
app.kubernetes.io/instance: cloud-endpoints-v0.7.0 | ||
app.kubernetes.io/managed-by: kfctl | ||
app.kubernetes.io/component: cloud-endpoints | ||
app.kubernetes.io/part-of: kubeflow | ||
app.kubernetes.io/version: v0.7.0 | ||
app.kubernetes.io/name: cloud-endpoints | ||
kind: Kustomization | ||
namespace: kubeflow | ||
resources: | ||
- application.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
bases: | ||
- ../../base | ||
resources: | ||
- application.yaml | ||
commonLabels: | ||
app.kubernetes.io/name: gpu-driver | ||
app.kubernetes.io/instance: gpu-driver-v0.7.0 | ||
app.kubernetes.io/managed-by: kfctl | ||
app.kubernetes.io/component: gpu-driver | ||
app.kubernetes.io/part-of: kubeflow | ||
app.kubernetes.io/version: v0.7.0 | ||
app.kubernetes.io/name: gpu-driver | ||
kind: Kustomization | ||
resources: | ||
- application.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
bases: | ||
- ../../base | ||
resources: | ||
- application.yaml | ||
commonLabels: | ||
app.kubernetes.io/name: iap-ingress | ||
app.kubernetes.io/instance: iap-ingress-v0.7.0 | ||
app.kubernetes.io/managed-by: kfctl | ||
app.kubernetes.io/component: iap-ingress | ||
app.kubernetes.io/part-of: kubeflow | ||
app.kubernetes.io/version: v0.7.0 | ||
app.kubernetes.io/name: iap-ingress | ||
kind: Kustomization | ||
resources: | ||
- application.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
bases: | ||
- ../../base | ||
resources: | ||
- application.yaml | ||
commonLabels: | ||
app.kubernetes.io/name: prometheus | ||
app.kubernetes.io/instance: prometheus-v0.7.0 | ||
app.kubernetes.io/managed-by: kfctl | ||
app.kubernetes.io/component: prometheus | ||
app.kubernetes.io/part-of: kubeflow | ||
app.kubernetes.io/version: v0.7.0 | ||
app.kubernetes.io/name: prometheus | ||
kind: Kustomization | ||
resources: | ||
- application.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.