-
-
Notifications
You must be signed in to change notification settings - Fork 462
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
[Enhancement] Refactoring: normalize label flags (k3s node & runtime) (#598, @ejose19) #598
Conversation
e34257f
to
3b026a0
Compare
3b026a0
to
f0c20e0
Compare
tests/assets/config_test_simple.yaml
Outdated
@@ -22,7 +22,12 @@ env: | |||
- envVar: bar=baz,bob | |||
nodeFilters: | |||
- all | |||
labels: | |||
k3sNodeLabels: |
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.
Would it make sense to rather have this under
options:
k3s:
nodeLabels: []
?
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.
Sure, that looks better, wonder if there should be runtime
as well under options
so only main properties are k3d
specific.
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.
Guess that would make sense.. config file is still alpha, so we could do a revamp for the first beta to make things more clean/consistent.
Thanks for your efforts here @ejose19 ! |
@iwilltry42 Yes, actually I was going to do another PR after this one to add |
Thanks for the initiative! I'm already on it though 😬
I'm struggling, if we should actually leave it there, as we cannot even justify it with "node-specific" option, as all of those k3s flags are "node-specific" 🤔
We could add a deprecation notice and internally treat it like the new name. |
@iwilltry42 Kubernetes labels will probably be one of the most used However, in case you still don't want to proceed with that (and remove the newly added option from // both `servers` and `agents` can take either a number or an array of node specific details
servers: 1
agents:
- volume: '/my/host/path:/path/in/node'
port: 8080:80
k3sExtraArgs:
- --node-label=foo=bar reducing the need to specify That of course would require more work, and it's out of the scope of this PR, so let me know how should I proceed here and I will make the adjustments. |
Hi @ejose19, |
@iwilltry42 that's great! However you didn't let me know how I should proceed in this PR? |
@ejose19 , I think this is those are the last missing pieces before merging:
|
Yeah adjusting to latest changes is not an issue, but since you said this:
what I want to know is, should I remove EDIT: I saw your comments on 7087264#commitcomment-50836483, and now it's clear that you just want to adjust this PR to anything that might have changed in |
4e7e391
to
743dfac
Compare
cfd423a
to
13af0df
Compare
13af0df
to
d32cd1a
Compare
@iwilltry42 This should be good now, here's the summary of changes:
|
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.
Looks good!
Just one last thing to clarify 👍
Ok, should be good now. I also added a validation for user provided From that I deducted that anything that begins with |
LGTM! Thanks a lot for your contribution :) |
- k3d config examples migrated to `apiVersion: k3d.io/v1alpha3` [https://github.com/rancher/k3d/pull/605](https://github.com/rancher/k3d/pull/605) - `:direct` node filter option used when load balancer is disabled [https://github.com/rancher/k3d/pull/656](https://github.com/rancher/k3d/pull/656) - `--label` --> `--runtime-label` [https://github.com/rancher/k3d/pull/598](https://github.com/rancher/k3d/pull/598) - `--k3s-server-arg` --> `--k3s-arg` with server node filter (`@server:*`) [https://github.com/rancher/k3d/pull/605](https://github.com/rancher/k3d/pull/605) - Updated documentation Signed-off-by: Timofey Ilinykh <[email protected]>
- k3d config examples migrated to `apiVersion: k3d.io/v1alpha3` [https://github.com/rancher/k3d/pull/605](https://github.com/rancher/k3d/pull/605) - `:direct` node filter option used when load balancer is disabled [https://github.com/rancher/k3d/pull/656](https://github.com/rancher/k3d/pull/656) - `--label` --> `--runtime-label` [https://github.com/rancher/k3d/pull/598](https://github.com/rancher/k3d/pull/598) - `--k3s-server-arg` --> `--k3s-arg` with server node filter (`@server:*`) [https://github.com/rancher/k3d/pull/605](https://github.com/rancher/k3d/pull/605) - Updated documentation Signed-off-by: Timofey Ilinykh <[email protected]>
- k3d config examples migrated to `apiVersion: k3d.io/v1alpha3` [https://github.com/rancher/k3d/pull/605](https://github.com/rancher/k3d/pull/605) - `:direct` node filter option used when load balancer is disabled [https://github.com/rancher/k3d/pull/656](https://github.com/rancher/k3d/pull/656) - `--label` --> `--runtime-label` [https://github.com/rancher/k3d/pull/598](https://github.com/rancher/k3d/pull/598) - `--k3s-server-arg` --> `--k3s-arg` with server node filter (`@server:*`) [https://github.com/rancher/k3d/pull/605](https://github.com/rancher/k3d/pull/605) - removed `disableImageVolume` option from examples and test assets - Updated documentation Signed-off-by: Timofey Ilinykh <[email protected]>
- k3d config examples migrated to `apiVersion: k3d.io/v1alpha3` [https://github.com/rancher/k3d/pull/605](https://github.com/rancher/k3d/pull/605) - `:direct` node filter option used when load balancer is disabled [https://github.com/rancher/k3d/pull/656](https://github.com/rancher/k3d/pull/656) - `--label` --> `--runtime-label` [https://github.com/rancher/k3d/pull/598](https://github.com/rancher/k3d/pull/598) - `--k3s-server-arg` --> `--k3s-arg` with server node filter (`@server:*`) [https://github.com/rancher/k3d/pull/605](https://github.com/rancher/k3d/pull/605) - removed `disableImageVolume` option from examples and test assets - Updated documentation Signed-off-by: Timofey Ilinykh <[email protected]>
What
This PR aims to normalize label flags brought by #378 & #584, both in naming and availability of methods (so both flags can be used in
k3d clusters create
&k3d node create
)Why
Besides the individual usefulness of having these flags, also being consistent in naming and availability of commands is something users will appreciate
Implications
As
labels
property (and its cli shorthand-l
) is being replaced by--runtime-label
to avoid ambiguity (as determined in #584 (comment)), this is a breaking change.