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

✨ Add generic addon deployment config to tilt #6991

Merged

Conversation

killianmuldoon
Copy link
Contributor

Signed-off-by: killianmuldoon [email protected]

Add a generic deployment mechanism for addons to the tilt file and tilt prepare. This mechanism allows Runtime SDK extensions to be developed alongside the core controllers using the Tilt development flow. It can also be used to develop arbitrary deployments and addons built using the same workflow in tilt as providers use today.

May be related to #6647
/area runtime-sdk
Fixes #6864

@k8s-ci-robot k8s-ci-robot added area/runtime-sdk Issues or PRs related to Runtime SDK cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 28, 2022
@killianmuldoon killianmuldoon force-pushed the tilt/add-addon-deployment branch 3 times, most recently from 49721f2 to efe9632 Compare July 28, 2022 18:12
@killianmuldoon killianmuldoon force-pushed the tilt/add-addon-deployment branch 2 times, most recently from ecf8edb to 6972b86 Compare July 29, 2022 12:53
Tiltfile Outdated Show resolved Hide resolved
@killianmuldoon killianmuldoon force-pushed the tilt/add-addon-deployment branch 3 times, most recently from 44448aa to ec8a8bf Compare July 29, 2022 17:17
@killianmuldoon killianmuldoon changed the title ✨ [WIP] Add generic addon deployment config to tilt ✨ Add generic addon deployment config to tilt Jul 29, 2022
@killianmuldoon killianmuldoon force-pushed the tilt/add-addon-deployment branch 2 times, most recently from 214546b to 1e9ff79 Compare August 1, 2022 14:47
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 1, 2022
@killianmuldoon killianmuldoon force-pushed the tilt/add-addon-deployment branch from 1e9ff79 to 811037e Compare August 1, 2022 14:57
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 1, 2022
@killianmuldoon killianmuldoon force-pushed the tilt/add-addon-deployment branch 4 times, most recently from 11562b0 to 0c4ca17 Compare August 1, 2022 15:27
Tiltfile Outdated Show resolved Hide resolved
Tiltfile Outdated Show resolved Hide resolved
Tiltfile Outdated Show resolved Hide resolved
@killianmuldoon killianmuldoon force-pushed the tilt/add-addon-deployment branch 3 times, most recently from fb202de to bfd2d1a Compare August 1, 2022 20:29
Tiltfile Outdated Show resolved Hide resolved
Tiltfile Outdated Show resolved Hide resolved
@killianmuldoon killianmuldoon force-pushed the tilt/add-addon-deployment branch from 8180a69 to 1abe060 Compare August 25, 2022 17:20
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 25, 2022
@killianmuldoon killianmuldoon force-pushed the tilt/add-addon-deployment branch 3 times, most recently from f076064 to 20bd979 Compare August 26, 2022 10:19
@killianmuldoon killianmuldoon changed the title [WIP] ✨ Add generic addon deployment config to tilt ✨ Add generic addon deployment config to tilt Aug 26, 2022
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 26, 2022
@killianmuldoon killianmuldoon force-pushed the tilt/add-addon-deployment branch 2 times, most recently from 3f3e76e to 53ba52b Compare August 26, 2022 11:23
BinaryName string `json:"binary_name,omitempty"`
Context *string `json:"context"`
}

type providerSettings struct {
Name string `json:"name,omitempty"`
Context *string `json:"context"`
Copy link
Member

Choose a reason for hiding this comment

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

Q: (possibly follow-up): I think Context here also has to be below a config element.

cf.:
vSphere:

{
  "name": "vsphere",
  "config": {
    "image": "gcr.io/cluster-api-provider-vsphere/release/manager",
    "live_reload_deps": [...],
    "label": "CAPV"
  }
}

Tiltfile:

    "core": {
        "context": ".",
        "image": "gcr.io/k8s-staging-cluster-api/cluster-api-controller",
        "live_reload_deps": [...],
        "label": "CAPI",
    }

Context seems to be on the same level as live_reload_deps and thus should be below config.

Just noticed when reviewing addonSettings.

hack/tools/tilt-prepare/main.go Outdated Show resolved Hide resolved
hack/tools/tilt-prepare/main.go Outdated Show resolved Hide resolved
hack/tools/tilt-prepare/main.go Outdated Show resolved Hide resolved
Tiltfile Outdated Show resolved Hide resolved
Tiltfile Outdated Show resolved Hide resolved
Tiltfile Outdated Show resolved Hide resolved
Tiltfile Outdated Show resolved Hide resolved
@killianmuldoon killianmuldoon force-pushed the tilt/add-addon-deployment branch from c369b1b to da235b3 Compare August 26, 2022 14:49
Copy link
Member

@sbueringer sbueringer left a comment

Choose a reason for hiding this comment

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

We're getting very close. Mostly just nits/cleanup

test/extension/config/tilt/hookresponses-configmap.yaml Outdated Show resolved Hide resolved
Tiltfile Outdated Show resolved Hide resolved
return runTaskGroup(ctx, "resources", tasks)
}

func readAddonSettings(path string) (*addonSettings, error) {
path, err := checkWorkloadFileFormat(path, "addon")
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we should also allow arrays here like in the provider case to allow defining multiple addons per repository

Also totally up to you (or possibly follow-up PR)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we should leave that to a follow up if it's needed BTW - is there a provider that uses it this way today?

Copy link
Member

@sbueringer sbueringer Aug 29, 2022

Choose a reason for hiding this comment

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

Afaik not. But I think for extensions/addons it makes sense to support more than one extension per repository.

I can take the follow-up, it's a relatively simple change. Making it relatively soon avoids that folks have to change their config later.

Tiltfile Outdated Show resolved Hide resolved
Tiltfile Show resolved Hide resolved
hack/tools/tilt-prepare/main.go Show resolved Hide resolved
hack/tools/tilt-prepare/main.go Outdated Show resolved Hide resolved
Tiltfile Show resolved Hide resolved
test/extension/config/tilt/extensionconfig.yaml Outdated Show resolved Hide resolved
Tiltfile Outdated Show resolved Hide resolved
Tiltfile Show resolved Hide resolved
@killianmuldoon killianmuldoon force-pushed the tilt/add-addon-deployment branch 2 times, most recently from 7271fab to 405f166 Compare August 29, 2022 16:19
@killianmuldoon killianmuldoon force-pushed the tilt/add-addon-deployment branch from 405f166 to e2652eb Compare August 29, 2022 16:37
@killianmuldoon killianmuldoon force-pushed the tilt/add-addon-deployment branch from e2652eb to 9929d16 Compare August 29, 2022 17:07
@sbueringer
Copy link
Member

/lgtm
/approve

Looks great! We'll address the open findings in a follow-up PR.

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

[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 k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 29, 2022
@killianmuldoon
Copy link
Contributor Author

/hold cancel

Wrong command at #6991 (comment) 🙂

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 29, 2022
@k8s-ci-robot k8s-ci-robot merged commit 2c2a1f1 into kubernetes-sigs:main Aug 29, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.3 milestone Aug 29, 2022
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. area/runtime-sdk Issues or PRs related to Runtime SDK 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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Development workflow for Runtime Extensions
5 participants