Skip to content

Commit

Permalink
Fix certmanager race condition and version numbers.
Browse files Browse the repository at this point in the history
* To fix the race condition with certmanager (kubeflow#1125) we move the KF
  issuer into a separate package from the package deploying kubeflow.
  This way we can wait for cert-manager to start before deploying resources.

* Labels need to be immutable otherwise upgrades won't work (see kubeflow#1131).
  So remove version number from common labels and application selector
  so that apply will work to update resources.
  • Loading branch information
Jeremy Lewi committed Apr 24, 2020
1 parent 5de6725 commit 4d17e5f
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
6 changes: 6 additions & 0 deletions cert-manager/cert-manager/kubeflow-issuer/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Define the self-signed issuer for Kubeflow
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: cert-manager
resources:
- ../overlays/self-signed/cluster-issuer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ spec:
selector:
matchLabels:
app.kubernetes.io/name: cert-manager
app.kubernetes.io/instance: cert-manager-v0.7.0
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/version: v0.7.0
app.kubernetes.io/part-of: kubeflow
componentKinds:
- group: rbac
kind: ClusterRole
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ configurations:
- params.yaml
commonLabels:
app.kubernetes.io/name: cert-manager
app.kubernetes.io/instance: cert-manager-v0.7.0
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/version: v0.7.0

Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# TODO(https://github.com/kubeflow/manifests/issues/1052) clean up
# the manifests after the refactor is done. We should move
# cluster-issuer into the kubeflow-issuer package.
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
bases:
Expand Down
6 changes: 2 additions & 4 deletions cert-manager/cert-manager/v3/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ kind: Kustomization
namespace: cert-manager
commonLabels:
app.kubernetes.io/name: cert-manager
app.kubernetes.io/instance: cert-manager-v0.7.0
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/version: v0.7.0
app.kubernetes.io/part-of: kubeflow
resources:
- ../overlays/self-signed
- ../overlays/application/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ spec:
selector:
matchLabels:
app.kubernetes.io/component: cert-manager
app.kubernetes.io/instance: cert-manager-v0.7.0
app.kubernetes.io/instance: cert-manager
app.kubernetes.io/managed-by: kfctl
app.kubernetes.io/name: cert-manager
app.kubernetes.io/part-of: kubeflow
app.kubernetes.io/version: v0.7.0

0 comments on commit 4d17e5f

Please sign in to comment.