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

Update Tiltfile to differentiate between aks and kind cluster #5289

Open
Tracked by #5257
nawazkh opened this issue Nov 19, 2024 · 3 comments · Fixed by #5306
Open
Tracked by #5257

Update Tiltfile to differentiate between aks and kind cluster #5289

nawazkh opened this issue Nov 19, 2024 · 3 comments · Fixed by #5306
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

Comments

@nawazkh
Copy link
Member

nawazkh commented Nov 19, 2024

Tiltfile uses if "aks" in settings.get("kustomize_substitutions", {}).get("MGMT_CLUSTER_NAME", ""): to check if the tilt is being used with AKS cluster as a management cluster.
This is an inefficient approach. Especially when a user is switching from AKS -> KIND.

Suggested approach:

  • There are two approaches to solve this
    1. Have MGMT_CLUSTER_TYPE saved to an .env file in the repo directory with MGMT_CLUSTER_TYPE=aks when running make aks-create. Source this env file before running tilt-up. The env file must be updated when running make kind-create.
      OR
    2. Update tilt-settings.yaml, add or delete MGMT_CLUSTER_TYPE every time aks-create or kind-create is called. Tilt-settings.yaml gets parsed in Tiltfile
      tilt_file = "./tilt-settings.yaml" if os.path.exists("./tilt-settings.yaml") else "./tilt-settings.json"
    • Once settings struct in tiltfile is updated, we can then use it to check if the mgmt cluster type is aks or not.
  • Once a similar logic is implemented, we want to update all the occurrences of if "aks" in settings.get("kustomize_substitutions", {}).get("MGMT_CLUSTER_NAME", ""): in the Tiltfile with appropriate if condition.
@nawazkh nawazkh changed the title Update tiltfile to know the mgmt cluster is aks Update Tiltfile to differentiate between aks and kind cluster Nov 19, 2024
@nawazkh nawazkh added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. labels Nov 19, 2024
@rihib
Copy link
Contributor

rihib commented Nov 24, 2024

Hello, I would like to work on this issue.

/assign

@nawazkh
Copy link
Member Author

nawazkh commented Jan 3, 2025

/reopen

Reopen reason: #5306 (comment)

@k8s-ci-robot k8s-ci-robot reopened this Jan 3, 2025
@k8s-ci-robot
Copy link
Contributor

@nawazkh: Reopened this issue.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@nawazkh nawazkh moved this from Done to Todo in CAPZ Planning Jan 3, 2025
@github-project-automation github-project-automation bot moved this from Todo to In Progress in CAPZ Planning Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Projects
Status: In Progress
3 participants