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

🌱 improve templates ui in tilt #6984

Merged

Conversation

fabriziopandini
Copy link
Member

What this PR does / why we need it:
Small improvements in templates UI in tilt:

  • templates show up using provider labels, so things are in order e.g. CAPD, CAPD.clusterclass, CAPD.templates
  • add inputs to buttons so it is possible to change substitutions values on the fly

@fabriziopandini fabriziopandini requested a review from Jont828 July 26, 2022 18:47
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 26, 2022
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 26, 2022
Copy link
Contributor

@ykakarap ykakarap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvements.

Some cosmetic improvements:

  • Now because the same cluster name is reused, unless changed by the user, the yaml created will keep modifying the same cluster over and over again. It would be nice to rename some of the button and logs to become "applying cluster " instead of "creating cluster " to avoid any confusion.

  • Similarly the button "Delete" + template_name + "clusters" wont behave the same way as the cluster names no longer follow a predicable pattern. It would be nice to also add a text-input to the Delete button so that one can delete a target cluster.

Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 27, 2022
Copy link
Member

@chrischdi chrischdi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great improvement 👍 Already thought about that too.

/lgtm

@Jont828
Copy link
Contributor

Jont828 commented Jul 28, 2022

@fabriziopandini This change looks great! In tilt.md where we document that the substitutions in kustomize_substitutions will be used in deploying templates. I noticed an issue where it only works for CLUSTER_NAME, NAMESPACE, KUBERNETES_VERSION, CONTROL_PLANE_MACHINE_COUNT, WORKER_MACHINE_COUNT, and any other substitution wouldn't go through because we don't actually set it as an environment variable anywhere.

For example, if you set CLUSTER_IDENTITY_NAME: cluster-identity and reference it in your template, CLUSTER_IDENTITY_NAME would be undefined and we get an error like this:

Error: value for variables [AZURE_CLUSTER_IDENTITY_SECRET_NAME, AZURE_CLUSTER_IDENTITY_SECRET_NAMESPACE, AZURE_CONTROL_PLANE_MACHINE_TYPE, AZURE_NODE_MACHINE_TYPE, CLUSTER_IDENTITY_NAME] is not set. Please set the value using os environment variables or the clusterctl config file

I opened #6968 to fix it, but do you think you could add this change here?

Tiltfile Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 1, 2022
@fabriziopandini
Copy link
Member Author

@Jont828 @ykakarap PTAL
I have restored random name generation + set os variables + make sure all commands works in different namespaces
I have also open tilt-dev/tilt#5907 to make UX more intuitive, but this should not block current PR

Tiltfile Show resolved Hide resolved
Tiltfile Outdated Show resolved Hide resolved
@fabriziopandini fabriziopandini force-pushed the improve-templates-in-tilt branch from 0f12635 to 804ffc4 Compare August 4, 2022 10:20
Copy link
Member

@chrischdi chrischdi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 4, 2022
Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vincepri

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 k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 4, 2022
@k8s-ci-robot k8s-ci-robot merged commit 0b368a4 into kubernetes-sigs:main Aug 4, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.3 milestone Aug 4, 2022
@Jont828
Copy link
Contributor

Jont828 commented Aug 4, 2022

Thanks for making this change!

@fabriziopandini fabriziopandini deleted the improve-templates-in-tilt branch September 1, 2022 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants