cluster-api icon indicating copy to clipboard operation
cluster-api copied to clipboard

:seedling: Read Flag Information directly from tilt settings file in tilt prepare

Open DiptoChakrabarty opened this issue 3 years ago • 14 comments

What this PR does / why we need it: It allows previous flag parameters to be directly used from within a tilt settings file in tilt-prepare The json/yaml keys added are as follows -> (deploy_cert_manager,kustomize_build,providers,tools,allowed_contexts) , these have been added to the tiltSettings struct

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged): Fixes #6246

DiptoChakrabarty avatar May 05 '22 06:05 DiptoChakrabarty

@DiptoChakrabarty are you able to bring tilt up with this PR as is? I'm getting a number of errors when trying to run this change.

killianmuldoon avatar May 05 '22 14:05 killianmuldoon

@DiptoChakrabarty are you able to bring tilt up with this PR as is? I'm getting a number of errors when trying to run this change.

Yes I had a few errors in tilt file and the arguments name , Ill fix and push soon

DiptoChakrabarty avatar May 06 '22 15:05 DiptoChakrabarty

I think the problem with the PR is currently that we still set the command line args even though we deleted them.

sbueringer avatar May 10 '22 13:05 sbueringer

@sbueringer I removed them from tiltfile , however I was getting another error tiltbuild/yaml/clusterctl.crd.yaml: no such file or directory , .tiltbuild/yaml/docker.provider.yaml: no such file or directory , .tiltbuild/yaml/core.provider.yaml: no such file or directory , I tried setting the docker provider from one of these files I guess I have to set the other files , are there some templates I can follow

DiptoChakrabarty avatar May 10 '22 14:05 DiptoChakrabarty

@DiptoChakrabarty is this ready for another pass?

fabriziopandini avatar May 22 '22 08:05 fabriziopandini

tiltbuild/yaml/clusterctl.crd.yaml: no such file or directory , .tiltbuild/yaml/docker.provider.yaml: no such file or directory , .tiltbuild/yaml/core.provider.yaml: no such file or directory

I am still getting this above error while running tilt up

DiptoChakrabarty avatar May 24 '22 12:05 DiptoChakrabarty

Let's see if someone could help here, but please be a little bit patient because AFAIK most of the contributors are now focusing on the next release so this improvement of the dev UX

fabriziopandini avatar May 31 '22 10:05 fabriziopandini

@fabriziopandini apologies, I was able to resolve the error , I have made the changes and pushed it in the recent commits.

DiptoChakrabarty avatar May 31 '22 13:05 DiptoChakrabarty

the tilt-settings file used is this

{
    "allowed_contexts": ["kind-capi-test"],
    "default_registry": "",
    "deploy_cert_manager": true,
    "enable_providers": ["docker", "kubeadm-bootstrap", "kubeadm-control-plane", "core","aws","vsphere"],
    "provider_repos": ["../cluster-api-provider-aws","../cluster-api-provider-vsphere"],
    "preload_images_for_kind": true,
    "tools": ["kustomize"],
    "kustomize_substitutions": {
        "CLUSTER_TOPOLOGY": "true",
        "EXP_MACHINE_POOL": "true",
        "EXP_CLUSTER_RESOURCE_SET": "true",
        "EXP_KUBEADM_BOOTSTRAP_FORMAT_IGNITION": "true"
    },
    "debug": {
        "core": {
          "continue": false,
          "port": 30000,
          "profiler_port": 40000,
          "metrics_port": 40001
        }
    }
}

DiptoChakrabarty avatar Jul 01 '22 14:07 DiptoChakrabarty

@DiptoChakrabarty is there any way I can help to get this moving forward, there are a couple of tiltfile improvements in flight (https://github.com/kubernetes-sigs/cluster-api/pull/6984 and https://github.com/kubernetes-sigs/cluster-api/pull/6991) and If possible I would like to help avoiding you some rebase dance/dealing with a moving scope

If you are busy I can eventually step in and complete the work

fabriziopandini avatar Aug 02 '22 13:08 fabriziopandini

@DiptoChakrabarty is there any way I can help to get this moving forward, there are a couple of tiltfile improvements in flight (#6984 and #6991) and If possible I would like to help avoiding you some rebase dance/dealing with a moving scope

If you are busy I can eventually step in and complete the work

Ill make the new changes @fabriziopandini ,if there are any suggestions please let me know Ill include them

DiptoChakrabarty avatar Aug 03 '22 15:08 DiptoChakrabarty

I'll take another look after Yuvaraj's findings are addressed

sbueringer avatar Aug 16 '22 10:08 sbueringer

/retest

flake

killianmuldoon avatar Aug 16 '22 11:08 killianmuldoon

Reviewed and tested locally. Everything works for me

@DiptoChakrabarty Can you squash the commits please?

sbueringer avatar Aug 17 '22 12:08 sbueringer

@DiptoChakrabarty Thank you very much!!

/lgtm /approve

sbueringer avatar Aug 17 '22 14:08 sbueringer

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbueringer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Aug 17 '22 14:08 k8s-ci-robot