@@ -60,25 +60,26 @@ helm_repo(
6060)
6161
6262########### Certmanager
63- # Certmanager is required for the validating webhook in the cortex-nova bundle.
64- def setup_certmanager ():
65- cache_dir = '.tilt/cert-manager'
66- cert_manager_version = 'v1.19.3'
67- if not os .path .exists (cache_dir ):
68- local ('mkdir -p ' + cache_dir )
69- if not os .path .exists (cache_dir + '/cert-manager-' + cert_manager_version + '.yaml' ):
70- url = 'https://github.com/cert-manager/cert-manager/releases/download/' + cert_manager_version + '/cert-manager.yaml'
71- local ('curl -L ' + url + ' -o ' + cache_dir + '/cert-manager-' + cert_manager_version + '.yaml' )
72- local ('kubectl apply -f ' + cache_dir + '/cert-manager-' + cert_manager_version + '.yaml' )
73- # Patch all three cert-manager deployments to add runAsUser for Docker Desktop compatibility
74- patch_json = '{"spec":{"template":{"spec":{"securityContext":{"runAsUser":1000}}}}}'
75- local ('kubectl patch deployment cert-manager -n cert-manager --type=strategic -p \' ' + patch_json + '\' ' )
76- local ('kubectl patch deployment cert-manager-cainjector -n cert-manager --type=strategic -p \' ' + patch_json + '\' ' )
77- local ('kubectl patch deployment cert-manager-webhook -n cert-manager --type=strategic -p \' ' + patch_json + '\' ' )
78- # Wait for all three deployments to be ready
79- local ('kubectl wait --namespace cert-manager --for=condition=available deployment/cert-manager --timeout=120s' )
80- local ('kubectl wait --namespace cert-manager --for=condition=available deployment/cert-manager-cainjector --timeout=120s' )
81- local ('kubectl wait --namespace cert-manager --for=condition=available deployment/cert-manager-webhook --timeout=120s' )
63+ # Certmanager is required for the validating webhooks in the cortex bundles, so
64+ # we need to deploy it before the bundles. If you don't need the webhooks locally,
65+ # you can disable them in the values.yaml and skip deploying certmanager.
66+ cache_dir = '.tilt/cert-manager'
67+ cert_manager_version = 'v1.19.3'
68+ if not os .path .exists (cache_dir ):
69+ local ('mkdir -p ' + cache_dir )
70+ if not os .path .exists (cache_dir + '/cert-manager-' + cert_manager_version + '.yaml' ):
71+ url = 'https://github.com/cert-manager/cert-manager/releases/download/' + cert_manager_version + '/cert-manager.yaml'
72+ local ('curl -L ' + url + ' -o ' + cache_dir + '/cert-manager-' + cert_manager_version + '.yaml' )
73+ local ('kubectl apply -f ' + cache_dir + '/cert-manager-' + cert_manager_version + '.yaml' )
74+ # Patch all three cert-manager deployments to add runAsUser for Docker Desktop compatibility
75+ patch_json = '{"spec":{"template":{"spec":{"securityContext":{"runAsUser":1000}}}}}'
76+ local ('kubectl patch deployment cert-manager -n cert-manager --type=strategic -p \' ' + patch_json + '\' ' )
77+ local ('kubectl patch deployment cert-manager-cainjector -n cert-manager --type=strategic -p \' ' + patch_json + '\' ' )
78+ local ('kubectl patch deployment cert-manager-webhook -n cert-manager --type=strategic -p \' ' + patch_json + '\' ' )
79+ # Wait for all three deployments to be ready
80+ local ('kubectl wait --namespace cert-manager --for=condition=available deployment/cert-manager --timeout=120s' )
81+ local ('kubectl wait --namespace cert-manager --for=condition=available deployment/cert-manager-cainjector --timeout=120s' )
82+ local ('kubectl wait --namespace cert-manager --for=condition=available deployment/cert-manager-webhook --timeout=120s' )
8283
8384########### Dependency CRDs
8485# Make sure the local cluster is running if you are running into startup issues here.
@@ -194,7 +195,6 @@ k8s_yaml(helm('./helm/bundles/cortex-crds', name='cortex-crds', set=crd_extra_va
194195
195196if 'nova' in ACTIVE_DEPLOYMENTS :
196197 print ("Activating Cortex Nova bundle" )
197- setup_certmanager ()
198198 k8s_yaml (helm ('./helm/bundles/cortex-nova' , name = 'cortex-nova' , values = tilt_values , set = env_set_overrides ))
199199 k8s_resource ('cortex-nova-postgresql-v18' , labels = ['Cortex-Nova' ], port_forwards = [
200200 port_forward (8000 , 5432 ),
0 commit comments