|
70 | 70 | type tiltSettings struct {
|
71 | 71 | Debug map[string]debugConfig `json:"debug,omitempty"`
|
72 | 72 | ExtraArgs map[string]extraArgs `json:"extra_args,omitempty"`
|
73 |
| - DeployCertManager bool `json:"deploy_cert_manager,omitempty"` |
| 73 | + DeployCertManager *bool `json:"deploy_cert_manager,omitempty"` |
74 | 74 | DeployObservability []string `json:"deploy_observability,omitempty"`
|
75 | 75 | EnableProviders []string `json:"enable_providers,omitempty"`
|
76 | 76 | AllowedContexts []string `json:"allowed_contexts,omitempty"`
|
@@ -161,12 +161,16 @@ func readTiltSettings(path string) (*tiltSettings, error) {
|
161 | 161 | return nil, errors.Wrap(err, "failed to unmarshal tilt-settings content")
|
162 | 162 | }
|
163 | 163 |
|
164 |
| - setDebugDefaults(ts) |
| 164 | + setDefaults(ts) |
165 | 165 | return ts, nil
|
166 | 166 | }
|
167 | 167 |
|
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 | + |
170 | 174 | for k := range ts.Debug {
|
171 | 175 | p := ts.Debug[k]
|
172 | 176 | if p.Continue == nil {
|
@@ -234,7 +238,7 @@ func tiltResources(ctx context.Context, ts *tiltSettings) error {
|
234 | 238 | // If required, all the task to install cert manager.
|
235 | 239 | // NOTE: strictly speaking cert-manager is not a resource, however it is a dependency for most of the actual resources
|
236 | 240 | // 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 { |
238 | 242 | tasks["cert-manager-cainjector"] = preLoadImageTask(fmt.Sprintf("quay.io/jetstack/cert-manager-cainjector:%s", config.CertManagerDefaultVersion))
|
239 | 243 | tasks["cert-manager-webhook"] = preLoadImageTask(fmt.Sprintf("quay.io/jetstack/cert-manager-webhook:%s", config.CertManagerDefaultVersion))
|
240 | 244 | tasks["cert-manager-controller"] = preLoadImageTask(fmt.Sprintf("quay.io/jetstack/cert-manager-controller:%s", config.CertManagerDefaultVersion))
|
|
0 commit comments