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

🌱 Tiltfile: rename deploy_kustomizations to additional_kustomizations #9439

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,8 @@ def deploy_observability():
objects = ["capi-visualizer:serviceaccount"],
)

def deploy_kustomizations():
for name in settings.get("deploy_kustomizations", []):
def deploy_additional_kustomizations():
for name in settings.get("additional_kustomizations", []):
yaml = read_file("./.tiltbuild/yaml/{}.kustomization.yaml".format(name))
k8s_yaml(yaml)
objs = decode_yaml_stream(yaml)
Expand Down Expand Up @@ -653,7 +653,7 @@ deploy_provider_crds()

deploy_observability()

deploy_kustomizations()
deploy_additional_kustomizations()

enable_providers()

Expand Down
5 changes: 2 additions & 3 deletions docs/book/src/developer/tilt.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,10 @@ Supported values are:
\*: Note: the UI will be accessible via a link in the tilt console
**deploy_kustomizations** (map[string]string, default={}): If set, installs the additional kustomizations to the cluster.
**additional_kustomizations** (map[string]string, default={}): If set, install the additional resources built using kustomize to the cluster.
Example:
```yaml
deploy_kustomizations:
additional_kustomizations:
capv-metrics: ../cluster-api-provider-vsphere/config/metrics
```
Expand Down
18 changes: 9 additions & 9 deletions hack/tools/internal/tilt-prepare/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ var (
// Types used to de-serialize the tilt-settings.yaml/json file from the Cluster API repository.

type tiltSettings struct {
Debug map[string]tiltSettingsDebugConfig `json:"debug,omitempty"`
ExtraArgs map[string]tiltSettingsExtraArgs `json:"extra_args,omitempty"`
DeployCertManager *bool `json:"deploy_cert_manager,omitempty"`
DeployObservability []string `json:"deploy_observability,omitempty"`
DeployKustomizations map[string]string `json:"deploy_kustomizations,omitempty"`
EnableProviders []string `json:"enable_providers,omitempty"`
AllowedContexts []string `json:"allowed_contexts,omitempty"`
ProviderRepos []string `json:"provider_repos,omitempty"`
Debug map[string]tiltSettingsDebugConfig `json:"debug,omitempty"`
ExtraArgs map[string]tiltSettingsExtraArgs `json:"extra_args,omitempty"`
DeployCertManager *bool `json:"deploy_cert_manager,omitempty"`
DeployObservability []string `json:"deploy_observability,omitempty"`
EnableProviders []string `json:"enable_providers,omitempty"`
AllowedContexts []string `json:"allowed_contexts,omitempty"`
ProviderRepos []string `json:"provider_repos,omitempty"`
AdditionalKustomizations map[string]string `json:"additional_kustomizations,omitempty"`
}

type tiltSettingsDebugConfig struct {
Expand Down Expand Up @@ -309,7 +309,7 @@ func tiltResources(ctx context.Context, ts *tiltSettings) error {
)
}

for name, path := range ts.DeployKustomizations {
for name, path := range ts.AdditionalKustomizations {
name := fmt.Sprintf("%s.kustomization", name)
tasks[name] = sequential(
kustomizeTask(path, fmt.Sprintf("%s.yaml", name)),
Expand Down
Loading