forked from openshift/machine-config-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
templates: Add node.openshift.io/rhelmajor label, drop os_version one
This removes the functionality added in openshift#514 which I don't think really worked for what people needed; a node selector can't parse the value. All we care about is currently 7 or 8; this signals things like `iptables` vs `nftables`. And the presence of this label also signals "RHEL" too; though we keep the `os_id` label in case e.g. a daemonset should only run on RHCOS (or traditional RHEL). Closes: openshift#582
- Loading branch information
Showing
4 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
templates/master/01-master-kubelet/_base/units/kubelet-rhelmajor.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: "kubelet-rhelmajor.service" | ||
enabled: true | ||
contents: | | ||
[Unit] | ||
Description=Generate rhelmajor version for kubelet | ||
Before=kubelet.service | ||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
EnvironmentFile=/etc/os-release | ||
# Really we should fix VERSION_ID in rhcos but that requires rpm-ostree changes | ||
ExecStart=/bin/sh -c '(echo -n RHELMAJOR= && if [ "${ID}" = rhcos ]; then echo ${VERSION} | cut -d . -f 2; else echo ${VERSION_ID} | cut -d . -f 1; fi) > /run/kubelet-rhelmajor' | ||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
templates/worker/01-worker-kubelet/_base/units/kubelet-rhelmajor.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: "kubelet-rhelmajor.service" | ||
enabled: true | ||
contents: | | ||
[Unit] | ||
Description=Generate rhelmajor version for kubelet | ||
Before=kubelet.service | ||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
EnvironmentFile=/etc/os-release | ||
# Really we should fix VERSION_ID in rhcos but that requires rpm-ostree changes | ||
ExecStart=/bin/sh -c '(echo -n RHELMAJOR= && if [ "${ID}" = rhcos ]; then echo ${VERSION} | cut -d . -f 2; else echo ${VERSION_ID} | cut -d . -f 1; fi) > /run/kubelet-rhelmajor' | ||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters