-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🌱 Add hack to upgrade cert-manager in Tiltfile #3462
🌱 Add hack to upgrade cert-manager in Tiltfile #3462
Conversation
32f5ea3
to
3c347ae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
/assign @ncdc
/milestone v0.3.9
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vincepri The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@fabriziopandini does |
@ncdc If you are referring to this issue cert-manager/cert-manager#3121, |
@ncdc |
Are we planning to have Nvm, I saw @fabriziopandini 's response above |
I wish in the future tilt uses clusterctl in one way or another, instead of re-implementing things |
# check if cert-mamager is already installed, otherwise pre-load images & apply the manifest | ||
# NB. this is required until https://github.com/jetstack/cert-manager/issues/3121 is addressed otherwise | ||
# when applying the manifest twice to same cluster kubectl get stuck | ||
existsCheck = str(local("kubectl get namespaces")) | ||
if existsCheck.find("cert-manager") == -1: | ||
# pre-load cert-manager images in kind | ||
images = ["cert-manager-controller", "cert-manager-cainjector", "cert-manager-webhook"] | ||
if settings.get("preload_images_for_kind"): | ||
for image in images: | ||
local("docker pull {}/{}:{}".format(registry, image, version)) | ||
local("kind load docker-image --name {} {}/{}:{}".format(settings.get("kind_cluster_name"), registry, image, version)) | ||
|
||
# apply the cert-manager manifest | ||
local("kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/{}/cert-manager.yaml".format(version)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this only happen if you already have a cluster up and running with an older version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my tests this happens when you have a cluster running with v01.6.0 already installed
(tilt up, then exit from tilt without cleaning up your environment, then tilt up again)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/retitle 🌱 Add hack to upgrade cert-manager in Tiltfile
What this PR does / why we need it:
This PR updates the version of cert-manager used in the Tilfile to v0.16.0 (same installed by clusterctl after #3313 merged)
Additionally, the cert-manager version is now a variable that can be set in the
tilt-settings.yaml
file, so, no code change are required to test older versions if required (tested with v0.11.0).Finally, the code that verifies if cert-manager is properly working is now aligned to https://cert-manager.io/docs/installation/kubernetes/#verifying-the-installation (same used in clusterctl)