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

WIP: add-ons design proposal #242

Closed
wants to merge 10 commits into from
Closed

WIP: add-ons design proposal #242

wants to merge 10 commits into from

Conversation

errordeveloper
Copy link
Contributor

No description provided.

Copy link
Contributor

@christopherhein christopherhein left a comment

Choose a reason for hiding this comment

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

Overall 💯 agree with this feature. Added some changes and my thoughts.

What could really help this would be talking about a couple example projects or addons that would scope into this. For example --addons=helm (or whatever implementation looks like)

When we pass helm as an addon eksctl uses the compiled in helm libraries to call helm init from the go SDK. How do we tell it to use RBAC? Did it auto create the SA and ClusterRoleBinding, etc? When you call the sdk does it automatically write the files to the persons home directory?

Or for another --addons=dashboard when this is triggered it uses the referenced github manifest links to apply to the cluster.

Last one, kube2iam when you deploy this is will use the helm chart with params (do we have a dependency graph that we now have to manage?) then it will deploy the IAM Assume Role Cloudformation template which referenced there node group to get the instance role ARN? it is auto-compiled into the nodegroup CFN, if so how would we handle removing it.

Hopefully that will help guide this a little more from the experience perspective. For example if I as a customer still need to manage my own upgrades of these addons I believe that would be acceptable as long as the initial heavy lifting was done. But maybe we strive for the implementation to be idempotent and if you deploy the dashboard and we upgrade the cli with a newer version you could run eksctl apply addon dashboard and it would apply the manifests in place just updating the existing. For helm this could get complicated cause now we need a way to persist the state of the individual addon names that they were deployed as.

Again super excited about this feature, happy to see we're starting with a proposal!


- fully deterministic behaviour for a given version of eksctl, thereby it should have
- strict versioning of built-in add-ons by default
- any externally-sourced config has to be pinned down or vendored *[TBD]*

This comment was marked as abuse.

This comment was marked as abuse.


An add-on extends functionality of a Kubernetes cluster, it may consist of a workload and/or configuration within the give cluster or the cloud provider. The workload, if present, would may classify as an operator or a controller, however that is not neccessary.

The difference between add-ons and anything user decided to run themselves, is that from user's point of view, add-on is something they don't need to maintain directly. A cluster provider or bootstrap tool (i.e. eksctl), is expected to ensure ease of use, by providing minumum viable (that configuration to ensure end-to-end integration and compatibility), as well as catering for reconfiguration and upgrades.

This comment was marked as abuse.

- any externally-sourced config has to be pinned down or vendored *[TBD]*
- there should be an option to use latest version or altenative source URL
- user should be able:
- remove any add-on (including it's dependencies) at any time

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

- install add-on at any time
- an add-on may consists exclusively of
- a reference to any Helm chart (or a copy of one)
- a reference to a Ksonnet application definition

This comment was marked as abuse.

This comment was marked as abuse.

- upgrade an add-on
- install add-on at any time
- an add-on may consists exclusively of
- a reference to any Helm chart (or a copy of one)

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

1. discuss and specify add-on definition objects and repository layout
2. discuss and specify how different config management tools would integrate (Helm, K/Jsonnet, kubegen, kustomize)
3. implement ability to
- install a built-in add-on (must ensure upgrades are catered for)

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

Copy link
Contributor

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

Maybe the proposal could include a sample config file for the addons.

apiVersion: eksctl.io/v1alpha1
kind: Config
metadata:
  name: eks-dev
spec:
  addons:
    - name: cert-manager
      namespace: kube-system
      chart:
        repository: https://kubernetes-charts.storage.googleapis.com
        name: cert-manager
        version: v0.5.0
      values:
        createCustomResource: true
        rbac:
          create: true
    - name: kured
      namespace: adm
      chart:
        repository: https://kubernetes-charts.storage.googleapis.com
        name: kured
        version: 0.1.0
      values:
        updateStrategy: OnDelete
        rbac:
          create: true

@christopherhein christopherhein dismissed their stale review October 8, 2018 21:53

dismissing feedback over conversation.

- name (fixed) *[TBD]*
- version tag or revision (has default value that user can override)
- source URL (has default value that user can override)
- set of customisations (no default value, user defined)

This comment was marked as abuse.

- Kubernetes workload definitions
- Kubernetes configuration objects - PersistentVolumes, ConfigMaps, ...etc
- cloud provider resource definitons (e.g. CloudFormation sub-resources)
- dependencies (supported Kubernetes versions and corresponding cloud providers, list of references to other add-ons)

This comment was marked as abuse.

This comment was marked as abuse.


- fully deterministic behaviour for a given version of eksctl, thereby it should have
- strict versioning of built-in add-ons by default
- any externally-sourced config has to be pinned down or vendored *[TBD]*

This comment was marked as abuse.

- upgrade an add-on
- install add-on at any time
- an add-on may consists exclusively of
- a reference to any Helm chart (or a copy of one)

This comment was marked as abuse.

- fully deterministic behaviour for a given version of eksctl, thereby it should have
- strict versioning of built-in add-ons by default
- any externally-sourced config has to be pinned down or vendored *[TBD]*
- there should be an option to use latest version or altenative source URL

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

- install a built-in add-on (must ensure upgrades are catered for)
- install an external add-on
- reconfigure customer an installed add-on
- upgrade any installed add-on

This comment was marked as abuse.


- built-in add-ons:
- only one version of each add-on is expected to be built-in, alternative versions have to be sourced externally
- only built-in add-ons may include Go code to create AWS resources (this may change in the future, yet significantly simplifies initial design and ensures security)

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

spec:
source:
repo: https://github.com/weaveworks/eksctl
branch: $HEAD

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

- fully deterministic behaviour for a given version of eksctl, thereby it should have
- strict versioning of built-in add-ons by default
- any externally-sourced config has to be pinned down or vendored *[TBD]*
- there should be an option to use latest version or altenative source URL

This comment was marked as abuse.

- any externally-sourced config has to be pinned down or vendored *[TBD]*
- there should be an option to use latest version or altenative source URL
- user should be able:
- remove any add-on (including it's dependencies) at any time

This comment was marked as abuse.

- user should be able:
- remove any add-on (including it's dependencies) at any time
- customise an add-on in an arbitrary fashion
- upgrade an add-on

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

- remove any add-on (including it's dependencies) at any time
- customise an add-on in an arbitrary fashion
- upgrade an add-on
- install add-on at any time

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

- upgrade an add-on
- install add-on at any time
- an add-on may consists exclusively of
- a reference to any Helm chart (or a copy of one)

This comment was marked as abuse.

1. discuss and specify add-on definition objects and repository layout
2. discuss and specify how different config management tools would integrate (Helm, K/Jsonnet, kubegen, kustomize)
3. implement ability to
- install a built-in add-on (must ensure upgrades are catered for)

This comment was marked as abuse.

@errordeveloper
Copy link
Contributor Author

errordeveloper commented Nov 2, 2018

I'll probably get back to this only after I'm back from my vocation, and that'd be in December. Just FYI.

cluster provider.

### kubernetes/kops

Copy link
Contributor Author

@errordeveloper errordeveloper Nov 8, 2018

Choose a reason for hiding this comment

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

TIL: kops doesn't have a way to easily upgrade only network add-ons (or at least it's not documented); it happens to be part of cluster upgrade... we should verify this, of course :)

@yhvh
Copy link

yhvh commented Nov 26, 2018

I vote against this feature, too much complexity for such a small gain.
I would prefer the project maintained a tighter focus.

@mumoshu
Copy link
Contributor

mumoshu commented Nov 30, 2018

I think I have the same sentiment as @yhvh. The specs looks awesome, but the gain seems so small.

As long as eksctl is able to create correct IAM role/permissions for well-known addons, I don't mind if it doesn't actually install k8s resource objects.

I'd just write some bash/pulumi/helmfile/etc to install them.

@cdenneen
Copy link

@yhvh @mumoshu Can you elaborate on the small gain here? The result I believe will allow you to create a cluster (new, replacement, standby, etc) and have many of the addons automatically install, configure in a repeatable/consistent fashion. This married with GitOps proposal will allow clusters to be built with completeness. I think this proposal is very useful and has tremendous potential gains.

To build a cluster (minimal) THEN apply pieces to enhance it (cluster autoscaler, hpa, helm, kube2iam, weave-flux, etc) and THEN to deploy your services to it (jenkins, gitlab, artifactory, etc) much less your own helm charts for app1, app2, app3.

With having the addons + GitOps implemented you'll have the ability to build a cluster that has weave networking, IAM policy changes, cluster autoscaler, flux, etc as well as jenkins, gitlab, artifactory and app1/app2 deployed... especially in a disaster scenario you are "back in business". In a non-disaster scenario you stand up replacement cluster and then cut over. If you implement additional pieces like @istio and px-motion (@portworx) you could do so much more.

@prageethw
Copy link
Contributor

my view also addons gonna be an extra burden and quickly can go out of date or will be a too much hassle maintaining them, a great example is kops addons, I found they are out of date whereas helm moved on a long time ago with new patches, versions etc.

@cdenneen
Copy link

cdenneen commented Jan 31, 2019 via email

@prageethw
Copy link
Contributor

Addons would be helm based and if your using GitOps then any updates you do should be in git and therefore should be whatever version you specified. If you manually install something like cluster auto scaler via helm you would have to update the helm release manually same as via a config for eksctl. The addons aren’t eksctl specific they are using helm charts.

I agree on one thing that if addons introduced to eksctl it has to be based on helm, but what puzzles me where the real value we see on addons if that's the case. To me, kops add-on is an old concept they adopted before helm became mainstream.

One reason I like to keep plain old k8s separate from all other extra such as metrics server, ca, etc because at any time they add-ons can go broke against particular k8s version, kops or even eks. This is something we face in prod every day we never upgrade helm charts until we are highly confident it will work after some extensive testing, so it is often required whether a particular version of the addon is compatible with specific k8s or eks,kops or whatever minor differences on them.

so even we have add-ons we ultimately will end up in helm to manage such situations hence my argument it is not an ideal concept, now if add-ons would be part of EKS itself i find it makes more sense as it will be tested before a major release, (still I found giving full control to individual user what add-ons they wanna install more measured approach)

@mumoshu
Copy link
Contributor

mumoshu commented Jan 31, 2019

@cdenneen Hey! Thanks for the response.

Indeed, the concept of add-ons is great, a tool that declaratively manages a cluster and its apps as a whole is awesome, GitOps is the way to go, I believe too. I think we are on the same page.

It is just that doing it in the scope of eksctl, especially as the form of "add-ons", is just an implementation detail to me. And "add-ons" seemed not a good implementation to me.

Add-ons are great if and only if it is well maintained. And it turned out to be not easy to maintain them. Honestly saying even a big project, like kops, who should have so many users and contributors, seems to have failed maintaining it well. Why repeat the same thing that failed before, without major improvements(I suppose. Sry if I missed that it is covered in this proposal) over the last trial?

Also, add-ons is not a pre-requisite for GitOps. For example, I'm currently trying to apply GitOps to both clusters and apps(helm releases). I'd just use eksctl to declaratively manage clusters, and helmfile to declaratively manage apps.

I'm developing an another high-level command that accepts a config file that covers both clusters and apps, calls eksctl and helmfile. My GitOps pipeline implemented by atlantis/codefresh/brigade/etc the command. Implementation-wise, you can use whatever tools that match your use-case. It is true that the market of such high-level commands is still small, but it doesn't mean eksctl should be one.

So, you do need a tool to declaratively manage everything including clusters and apps, and probably a CD solution(whether it is GitOps flavored or not, it doesn't matter) that supports it. But the tool should not necessarily be eksctl.

@cdenneen
Copy link

cdenneen commented Jan 31, 2019 via email

@mumoshu
Copy link
Contributor

mumoshu commented Jan 31, 2019

Thanks again for sharing your idea!

I think having this under one umbrella truly helps keeps things easier to maintain

I completely agree with you :)

You could spin up brand new cluster, ALL your config and apps, run full test suite and determine if everything works as a whole

Yep, this is exactly the same U/X I want to achieve via my own high-level command and GitOps pipelines.

I'd also like to:

  • Deploy my own apps along with eksctl add-ons, so that I don't need to script anything to be run after eksctl
  • Regularly update only my apps, not eksctl add-ons, after the initial cluster bootstrap
  • In case one of add-ons is out-dated, I'd like to update it out of eksctl
  • Include terraform/cloudformation variables in my declarative "clusterr" config to manage cloud-provider resources along with my cluster (on top of the cloud-provider resources) and apps(on top of clusters).
  • Have a reusable GitOps pipeline or its framework implemented as a Kubernetes operator, or something similar that runs on a serverless platform like Lambda or Fargate. Then we don't need to reimplement the whole GitOps pipelines on top of various CI/CD services, platforms, etc.

I wish we could come up with a generic solution someday!

@whereisaaron
Copy link

My add-ons design proposal it don’t do it 😄 Every project you ‘add-on’ you might as well volunteer to maintain those projects too. If eksctl installs them, eksctl on the hook to patch and upgrade them for every release of those projects too. Every if just firing off helm charts you are still tracking versions and breaking changes to chart values settings.

If you think a project is utterly essential cluster bootstrap material, and can’t be installed and maintained separately by other tools, like maybe EKS AMI, CNI plug-in, core-dns. But anything that can be installed (and upgraded) by your choice(s) of helm/brigade/kubectl/octopus/cfn/terraform/etc. after eksctl bootstrap should IMHO not be part of eksctl.

I could see maybekiam/kube2iam could be integrated in to eksctl bootstrapping, given the AWS IAM policy integration required, which is a legit eksctl bootstrapping role; It would be nice if eksctl handles everything up to point that users could do the rest with their choice of k8s native tools, but no further.

I have used other k8s cluster creation systems that have ‘add ons’, like GKE and kube-aws and every time I have used the add ons I’ve regretted it later due some maintenance drama upgrading or reconfiguring the add-on later.

Also, everyone’s stack of in-cluster add-ons is different and integrated and secured in different ways. Currently supporting everyone’s node/ASG/VPC bootstrapping desires is challenge enough for eksctl without trying to be the kitchen sink of all k8s add-on services combinations.

Totally not my decision but that my personal opinion. I think it somewhat aligns with what @mumoshu is saying, but he is just way more polite 😉

@mumoshu
Copy link
Contributor

mumoshu commented Jun 3, 2019

@errordeveloper @christopherhein @stefanprodan @whereisaaron FYI, there's a relevant discussion in SIG Cluster Lifecycle to form a shared interface for addon installation and overall lifecycle kubernetes-sigs/cluster-addons#10

@errordeveloper
Copy link
Contributor Author

there's a relevant discussion in SIG Cluster Lifecycle to form a shared interface for addon installation and overall lifecycle kubernetes-sigs/cluster-addons#10

Yes, indeed. My original intention was to develop something under eksctl umbrella first, and them propose it upstream. However, the upstream conversation has started before we started to work on anything.

I've been meaning to share an update here and close the PR. Myself and other colleagues of mine will continue to take active part in upstream discussions, and once a clear definition of a spec emerges, we are going to look at how it can be implemented in eksctl.

@vladfr vladfr mentioned this pull request Jun 12, 2019
@michaelbeaumont michaelbeaumont deleted the proposal-001 branch September 22, 2020 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.