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

Design Proposal #003: Extending Use of --config-file #545

Merged
merged 7 commits into from
Feb 22, 2019

Conversation

errordeveloper
Copy link
Contributor

Description

This is a design proposal towards #462.

@errordeveloper errordeveloper changed the title Initial draft Design Proposal #003: ClusterConfig and NodeGroupConfig Feb 14, 2019
@errordeveloper errordeveloper self-assigned this Feb 14, 2019

### Alternative Approach

One alternative could be to avoid creating a separate object, and keep objects and relationships simpler.
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 kind of like it more actually.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems like separating object will be less helpful when it comes to implementing more complex features in the future, and having similar kind of filter flags in 'eksctl apply' maybe of use too. We can always split objects later, bit merging object would be kind of harder (or at least it seems like that now).

Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer this, too. As I've noted in #462, separating object is not a requirement.


- Is it appropriate to also allow referencing nodegroup that is defined externally withing `ClusterConfig`?
- Where in standalone `NodeGroup` config should lables live? (If we copy the same struct, we will get `spec.labels`,
while it might make more sense to have them as `metadata.labels`).
Copy link
Contributor

Choose a reason for hiding this comment

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

I could see metadata.labels on NodeGroupConfig and metadata.labelSelectors to almost match K8s config, but not sure how much extra work that would add to the controller.

Copy link
Contributor

@D3nn D3nn left a comment

Choose a reason for hiding this comment

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

Don't know who else will look at the design proposal, hence the NIT comments which aren't about the proposal itself.

Probably best for now to put the NodeGroups in the ClusterConfig for reasons that @errordeveloper mentioned and split them later if necessary.

Examples:

```
eksctl create cluster --config-file=cluster.yaml --exclude-nodegroups='.*-private' ## only nodegroups matching regex will be created
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if maybe we should leave out the object type when using a config file? It would be more consistent with kubectl.

eksctl create --config-file=cluster.yaml --exclude='nodegroup:.*-private' --exclude=vpc or
eksctl create --config-file=cluster.yaml --exclude='nodegroup:.*-private',vpc
eksctl create --config-file=cluster.yaml --include=cluster,nodegroup

Examples:

```
eksctl create cluster --config-file=cluster.yaml --exclude-nodegroups='.*-private' ## only nodegroups matching regex will be created
Copy link
Contributor

@mumoshu mumoshu Feb 15, 2019

Choose a reason for hiding this comment

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

At glance --exclude-nodegroups='.*-private' isn't a must-have as we already have --without-nodegroup.

Can we start the implementation without --exclude-nodegroups to make the scope of the initial implementation and making reviews easier?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I think it could be a reasonable temporary measure. The --without-nodegroup flag is really about the initial nodegroup and is meant to be incompatible with --config-file, but at present is simply ignored when passed along with --config-file. We might not actually need this temporary measure, it'd make sense to start with eksctl create nodegroup part, and then add the filter flags to eksctl create cluster as a final step.

Copy link
Contributor

Choose a reason for hiding this comment

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

Where we landed was to keep the grammar similar to nodegroup creation. Meaning we would be inclusive instead of exclusive. i.e. create config --only "glob pattern(s)" to create the nodegroups identified by the glob pattern. We may want a better flag name

Also, if --without-nodegroup is passed along with the config name, the cluster create will ignore all nodegroups defined in the config file.

mumoshu
mumoshu previously approved these changes Feb 15, 2019
Copy link
Contributor

@mumoshu mumoshu left a comment

Choose a reason for hiding this comment

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

Would something like eksctl apply --config-file cluster.yaml that automatically creates nodegroups missing in the AWS region, and deletes nodegroups missing in the config file be covered in this proposal?

If not, this LGTM! Thanks as always for your effort.

@errordeveloper
Copy link
Contributor Author

Would something like eksctl apply --config-file cluster.yaml that automatically creates nodegroups missing in the AWS region, and deletes nodegroups missing in the config file be covered in this proposal?

@mumoshu I think eksctl apply is technically out of scope at the moment, but it's certainly is a on the horizon. My strategy at the moment is to focus on bitesize functionality, but pave the way for eksctl apply to become more tangible. I think we will start discussing eksctl apply more after we have upgrades.
Also, the idea of this proposal is to keep it small enough in scope. We somehow we ended-up without a proper ClusterConfig proposal to begin with, but maybe we can create one once we are getting closer to a beta version of the API, and use it as a means of driving beta to GA.

@mumoshu
Copy link
Contributor

mumoshu commented Feb 15, 2019

I agree with your strategy 👍

@errordeveloper
Copy link
Contributor Author

I think this is good to go, we can always make improvements later. Will try to re-run the job in Circle, maybe just a flake..

@errordeveloper errordeveloper changed the title Design Proposal #003: ClusterConfig and NodeGroupConfig Design Proposal #003: Use config files for managing nodegroups Feb 21, 2019
@errordeveloper errordeveloper changed the title Design Proposal #003: Use config files for managing nodegroups Design Proposal #003: Extending Use of --config-file Feb 22, 2019
@errordeveloper
Copy link
Contributor Author

Let's merge it, and if anyone feels like it needs an update - please open another PR :)

@errordeveloper errordeveloper merged commit dc88e5f into master Feb 22, 2019
@errordeveloper errordeveloper deleted the proposal-003 branch February 22, 2019 10:21
@voxxit
Copy link

voxxit commented May 22, 2019

Did anything ever come of the NodeGroupConfig?

@errordeveloper
Copy link
Contributor Author

errordeveloper commented May 23, 2019 via email

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.

7 participants