Skip to content

Commit d7e004b

Browse files
authored
Merge pull request #7103 from sbueringer/pr-tilt-enable-cert-manager-default
🐛 tilt: Enable deploy cert-manager per default again
2 parents 3f6f56f + 7b09c26 commit d7e004b

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

Tiltfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ load("ext://uibutton", "cmd_button", "location", "text_input")
1313
version_settings(True, ">=0.22.2")
1414

1515
settings = {
16-
"deploy_cert_manager": True,
1716
"enable_providers": ["docker"],
1817
"kind_cluster_name": os.getenv("CAPI_KIND_CLUSTER_NAME", "capi-test"),
1918
"debug": {},

hack/tools/tilt-prepare/main.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ var (
7070
type tiltSettings struct {
7171
Debug map[string]debugConfig `json:"debug,omitempty"`
7272
ExtraArgs map[string]extraArgs `json:"extra_args,omitempty"`
73-
DeployCertManager bool `json:"deploy_cert_manager,omitempty"`
73+
DeployCertManager *bool `json:"deploy_cert_manager,omitempty"`
7474
DeployObservability []string `json:"deploy_observability,omitempty"`
7575
EnableProviders []string `json:"enable_providers,omitempty"`
7676
AllowedContexts []string `json:"allowed_contexts,omitempty"`
@@ -161,12 +161,16 @@ func readTiltSettings(path string) (*tiltSettings, error) {
161161
return nil, errors.Wrap(err, "failed to unmarshal tilt-settings content")
162162
}
163163

164-
setDebugDefaults(ts)
164+
setDefaults(ts)
165165
return ts, nil
166166
}
167167

168-
// setDebugDefaults sets default values for debug related fields in tiltSettings.
169-
func setDebugDefaults(ts *tiltSettings) {
168+
// setDefaults sets default values for debug related fields in tiltSettings.
169+
func setDefaults(ts *tiltSettings) {
170+
if ts.DeployCertManager == nil {
171+
ts.DeployCertManager = pointer.BoolPtr(true)
172+
}
173+
170174
for k := range ts.Debug {
171175
p := ts.Debug[k]
172176
if p.Continue == nil {
@@ -234,7 +238,7 @@ func tiltResources(ctx context.Context, ts *tiltSettings) error {
234238
// If required, all the task to install cert manager.
235239
// NOTE: strictly speaking cert-manager is not a resource, however it is a dependency for most of the actual resources
236240
// and running this is the same task group of the kustomize/provider tasks gives the maximum benefits in terms of reducing the total elapsed time.
237-
if ts.DeployCertManager {
241+
if ts.DeployCertManager == nil || *ts.DeployCertManager {
238242
tasks["cert-manager-cainjector"] = preLoadImageTask(fmt.Sprintf("quay.io/jetstack/cert-manager-cainjector:%s", config.CertManagerDefaultVersion))
239243
tasks["cert-manager-webhook"] = preLoadImageTask(fmt.Sprintf("quay.io/jetstack/cert-manager-webhook:%s", config.CertManagerDefaultVersion))
240244
tasks["cert-manager-controller"] = preLoadImageTask(fmt.Sprintf("quay.io/jetstack/cert-manager-controller:%s", config.CertManagerDefaultVersion))

0 commit comments

Comments
 (0)