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

change platform-version to updater-interface-version #30

Merged

Conversation

etungsten
Copy link
Contributor

@etungsten etungsten commented Mar 19, 2020

Issue number:
Addresses #4

Description of changes:
This commit renames references of platform-version to
platform-interface-version to better convey the label's meaning and
avoid conflicts with other keywords.

Testing done:
Built my own Bottlerocket update operator container with the changes, modified update-operator.yaml to pull that container for the agent and controller.
Labelled my nodes in my cluster with the updated key name (bottlerocket.aws/updater-interface-version) and I see the pods being scheduled to run immediately after.

$ kubectl label node $(kubectl get nodes -o jsonpath='{.items[*].metadata.name}') bottlerocket.aws/updater-interface-version=1.0.0
node/ip-192-168-17-182.us-west-2.compute.internal labeled
node/ip-192-168-25-184.us-west-2.compute.internal labeled
node/ip-192-168-40-60.us-west-2.compute.internal labeled
node/ip-192-168-60-95.us-west-2.compute.internal labeled
node/ip-192-168-70-84.us-west-2.compute.internal labeled
node/ip-192-168-9-191.us-west-2.compute.internal labeled 
$ kubectl get pods -A
NAMESPACE      NAME                                         READY   STATUS    RESTARTS   AGE
bottlerocket   update-operator-agent-5zm4x                  1/1     Running   0          14s
bottlerocket   update-operator-agent-6wlwq                  1/1     Running   0          14s
bottlerocket   update-operator-agent-85xfj                  1/1     Running   0          14s
bottlerocket   update-operator-agent-j99mq                  1/1     Running   0          14s
bottlerocket   update-operator-agent-r27ng                  1/1     Running   0          14s
bottlerocket   update-operator-agent-tjwjs                  1/1     Running   0          14s
bottlerocket   update-operator-controller-f749847d7-2mvhs   1/1     Running   0          2m52s
....

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

Copy link
Member

@jahkeup jahkeup left a comment

Choose a reason for hiding this comment

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

Looks good!

Unless others object, I'm in favor of moving on with the updater-interface-version name.

README.md Outdated Show resolved Hide resolved
@@ -94,7 +94,7 @@ spec:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: bottlerocket.aws/platform-version
- key: bottlerocket.aws/updater-interface-version
operator: Exists
Copy link
Member

Choose a reason for hiding this comment

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

Quick thought (and not for this particular PR to resolve):

I think we may want to update this deployment prior to making any changes to the updater components host side. The current deployments will land on hosts that end up having a bumped version without this being scoped down to updater-interface-version==1.0.0. That way we can begin to vend a newer version without impacting existing deployments (which are scheduled if the key exists at all).

I had originally aimed to have the host set its interface version by providing a compiled in default setting. If we do this then we reduce the chance that the wrong version be set for a host and eliminate the need for cluster operators to label their nodes.

[settings.kubernetes.node-labels]
"bottlerocket.aws/updater-interface-version" = "1.0.0"

This commit renames references of `platform-version` to
`platform-interface-version` to better convey the label's meaning and
avoid conflicts with other keywords.
@etungsten
Copy link
Contributor Author

Addresses @jahkeup 's comments - updated README with suggestion.

@jahkeup jahkeup linked an issue Mar 24, 2020 that may be closed by this pull request
@jahkeup
Copy link
Member

jahkeup commented Mar 24, 2020

We should make sure to include instructions for the next update to change the labels to the new name.

Copy link
Contributor

@samuelkarp samuelkarp left a comment

Choose a reason for hiding this comment

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

Once we release this, we'll need to call out that this is a breaking change in the release notes. I think this is a good change, but anyone who is already using the update operator is going to have to make manual changes to the annotations in their Kubernetes cluster.

@etungsten etungsten merged commit dbaa59e into bottlerocket-os:develop Mar 26, 2020
@etungsten etungsten deleted the platform-version-key-change branch March 26, 2020 23:12
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.

Change platform-version key name
3 participants