-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Create cluster via config file #381
Conversation
f25a070
to
b734001
Compare
TODOs:
|
b92286b
to
20f68cf
Compare
// +optional | ||
AvailabilityZones []string `json:"availabilityZones,omitempty"` | ||
|
||
// TODO: refactor and move IAM addons to nodegroup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4363ad3
to
b2ba54f
Compare
6ca413d
to
734f097
Compare
f98fcf8
to
66fd306
Compare
// +optional | ||
InstanceRoleARN string `json:"instanceRoleARN,omitempty"` // TODO: read-only | ||
|
||
// TODO move to separate struct |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4555e43
to
8811196
Compare
5123632
to
8a8dcc4
Compare
I'm rather happy with this, but would like to re-test |
Integration tests passed, |
0d66a41
to
41ea017
Compare
ng.Labels[api.NodeGroupNameLabel] = ng.Name | ||
|
||
for l := range ng.Labels { | ||
if len(strings.Split(l, "/")) > 2 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should actually call proper validation function here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0b82a2c
to
29e1992
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a nit. LGTM overall! Thanks for your efforts
- Make it incompatible with all flags that modify state of config - Most default are implemented by constructors (where possible)
- fix bug where tags slice was shared accidentially - move tag constants to api package - automatically set node labels for cluster and nodegroup names - ensure labels have max 1 '/' separator, otherwise kubelet fails to start
- fix missing return on nodegroup deletion error causing false-positive - ensure describe stack is called with StackId whenever possible, to avoid error on stacks that happen to get deleted already
@mumoshu thanks for looking over this PR! I've removed stale TODO note, and made |
29e1992
to
f568b25
Compare
PrivateNetworking bool `json:"privateNetworking"` | ||
|
||
// +optional | ||
DesiredCapacity int `json:"desiredCapacity"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could the "desired" capacity not be met?
Would it be clearer to have something named like, e.g., the below?
Count int `json:"count"`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we had it as NodeCount
at the top level some time ago, but now it's called DesiredCapacity
to match the AWS API. However, the flag is still --nodes
, so there is a little inconsistency there too. Some refactoring is pending here also (#385).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough 😅
Matching the AWS API probably takes precedence over any other argument/preference 👍
f568b25
to
7b50b82
Compare
Description
This is initial step towards #19. Let's add this in to start with and aim to evolve it as an experimental feature.
This change adds some of the Kubernetes API tooling, and adds JSON tags to
api.ClusterConfig
.From user's perspective, there is now a
--config-file/-f
flag ineksctl create cluster
. The format of the object right now is based directly onapi.ClusterConfig
, we may eventually mould it into Cluster APIProvideSpec
, but for now let's keep it simple.Checklist
make build
)make test
)Closes #377.