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 custom channels to cluster spec #4268

Closed

Conversation

chris-h-phillips
Copy link
Contributor

We have several addons in addition to the ones that kops installs for us that we wanted to manage in our own custom channels. This was discussed a bit here

#2399.

This allows you to specify additional custom channels for protokube.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 12, 2018
@chris-h-phillips chris-h-phillips force-pushed the additional-channels branch 3 times, most recently from e7e05ea to 22e8be3 Compare January 13, 2018 20:02
@chrislovecnm
Copy link
Contributor

/ok-to-test

Many people have been discussing this :) Appreciate the contribution. Need to have @justinsb and @robinpercy review the API change! Let me chew on this a bit as I am wondering if we want to allow the channels and bootstrap files as API objects themselves.

Appreciate the contribution, and please be patient on this PR, this is an awesome one, and we have to get it right.

/assign @justinsb @robinpercy

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jan 13, 2018
@robinpercy
Copy link
Contributor

This looks great. I don't have any issue with the API change, but I need to look into how addons that are duplicated between channels would be handled. One of the main use cases I'm looking for is the ability to override default addons.

@k8s-github-robot
Copy link

@polarbizzle PR needs rebase

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 24, 2018
@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 24, 2018
Copy link
Contributor

@KashifSaadat KashifSaadat left a comment

Choose a reason for hiding this comment

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

LGTM, won't add the flag on yet to give time for more thorough review.

@chris-h-phillips chris-h-phillips force-pushed the additional-channels branch 3 times, most recently from 74e8942 to d5b6156 Compare February 7, 2018 23:48
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: polarbizzle
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: justinsb

Assign the PR to them by writing /assign @justinsb in a comment when ready.

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

@chris-h-phillips
Copy link
Contributor Author

@KashifSaadat Do you think we're good at this point?

@chrislovecnm
Copy link
Contributor

/assign @justinsb

We need Justin to look at this one, I like it but I am wondering if we need a top level object.

@justinsb
Copy link
Member

So we don't really want to expose the channels format as part of our API, because it feels like we're very close to being able to replace channels with something more unified with upstream. Can I ask about your use case @polarbizzle ... would you be happy with just a manifest that we would kubectl apply -f, rather than having the channels wrapper?

Otherwise I'm struggling to think how we can migrate off the channels format. Currently it's all internal, and while a handful of people might have figured out how to define their own channels, I'm betting it's not too many, and they'll be very capable of moving to a new format :-)

@jordanjennings
Copy link
Contributor

@justinsb Not to sidetrack this issue, but what's the upcoming alternative you are referring to?

@chris-h-phillips
Copy link
Contributor Author

We've just been looking for a good way to manage the addons for our cluster with some mechanism. Right now we just manually kubectl apply -f things. We didn't want to write some new way to maintain the lifecycle of addons but to be consistent with what kops was already doing. If there's some upstream addon management capability that will soon be a part of kops then we would embrace that for sure. I'm with @jordanjennings -- being curious about what the alternative you're hinting at is.

@justinsb
Copy link
Member

Ah - the Declarative Application Management ( https://docs.google.com/document/d/1cLPGweVEYrVqQvBLJg6sxV-TrE5Rm2MNOBA_cxZP2WU/edit
) work seems to be coming together for management of system addons. So you'd be able to just kubectl apply -f whatever a channel becomes in that world.

Although actually, now that I've said - that same argument applies here. So we can support a channel manifest here, but we can encourage people to use a "bare" manifest today and then have the new manifest tomorrow. We can tell people that channels manifests will continue to work, but I'll try to have a look at making this just work with bare manifests.

I do think we might want something more like this though:

addons:
  - name: foo
    manifest: https://k8s.io/foo
  - name: bar
    manifest: https://k8s.io/bar

Because I think we'll likely support more options going forward. (We don't even need name today). Would you be OK with that (and if the code is a barrier I can merge this an propose a quick PR to move to objects instead)

One super-interesting option would be to expose some of the automagic addons. Maybe that's a good use for name - if you define kube-dns you can override the built-in kube-dns manifest.

@justinsb justinsb added this to the 1.9 milestone Feb 21, 2018
@chris-h-phillips
Copy link
Contributor Author

For now we're having success publishing our addons into a channel in s3 and having it get picked up and applied the same way the bootstrap channel does. I can see how we'd want to improve the addon story as a whole in some of the ways you mention. I'll defer to you on what the most appropriate way forward is.

@so0k
Copy link
Contributor

so0k commented Feb 27, 2018

As discussed in the Issue referenced, we also manage custom channels and this PR would be very helpful for us

At the moment, we apply channels manually using make targets after the cluster is provisioned and on ad-hoc basis.

Our channels use case is mainly through Terraform templated yaml manifests

  • Create pre-defined namespaces, rbac and a locked down tiller per namespace
  • Create cluster-wide rbac / service accounts
  • some upstream kops channels that are not part of bootstrap

rest of the cluster deployments is managed using helm and through CI/CD (using the service accounts created during bootstrap)

I will read up on the Declarative Application Management document to see how we can migrate to that

@justinsb
Copy link
Member

So I'm very happy to get this in, I just ask that we tweak the schema a bit to support the richer model we have going forwards. Let me propose a PR based on this one :-)

@justinsb
Copy link
Member

Please take a look at #4538 to see if that works for you - it's just switching it to an object to allow for more options in future.

@k8s-ci-robot
Copy link
Contributor

@polarbizzle: PR needs rebase.

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 1, 2018
@justinsb
Copy link
Member

justinsb commented Mar 1, 2018

Merged as part of #4538 - thanks for getting this in - excited to play with this :-)

@justinsb justinsb closed this Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/addon-manager cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. 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.

9 participants