Skip to content
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

cert manager is only installed if version mismatch or not yet installed #5278

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions tilt_modules/cert_manager/Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,13 @@ def deploy_cert_manager(registry="quay.io/jetstack", version="v1.3.1", load_to_k
# NOTE!
# Applying the same manifest twice to same cluster kubectl get stuck with older versions of kubernetes/cert-manager.
# https://github.com/jetstack/cert-manager/issues/3121
print("Installing cert-manager")
local("kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/{}/cert-manager.yaml".format(version), quiet=silent, echo_off=silent)

#verify that the installed version is the same as the version parameter and cert-manager is installed
#install the cert-manager if one of these is false
installed_version = local("kubectl get deployment -n cert-manager cert-manager -o=jsonpath='{.spec.template.spec.containers[0].image}' | awk -F':' '{print $2}'")
mboersma marked this conversation as resolved.
Show resolved Hide resolved
if str(installed_version).strip()!= version:
print("Cert-manager either not installed or version mismatch, installing...")
local("kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/{}/cert-manager.yaml".format(version))

# verifies cert-manager is properly working (https://cert-manager.io/docs/installation/kubernetes/#verifying-the-installation)
# 1. wait for the cert-manager to be running
Expand Down
Loading