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

initial pass at populating the os version label #514

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ contents: |
Type=notify
ExecStartPre=/bin/mkdir --parents /etc/kubernetes/manifests
ExecStartPre=/bin/rm -f /var/lib/kubelet/cpu_manager_state
EnvironmentFile=/etc/os-release
EnvironmentFile=-/etc/kubernetes/kubelet-workaround
EnvironmentFile=-/etc/kubernetes/kubelet-env

Expand All @@ -19,7 +20,7 @@ contents: |
--container-runtime=remote \
--container-runtime-endpoint=/var/run/crio/crio.sock \
--allow-privileged \
--node-labels=node-role.kubernetes.io/master \
--node-labels=node-role.kubernetes.io/master,node.openshift.io/os_version=${VERSION},node.openshift.io/os_id=${ID} \
Copy link
Member

Choose a reason for hiding this comment

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

This breaks RHEL scaleup:

kubelet_node_status.go:92] Unable to register node "ip-10-0-156-42.ec2.internal" with API server: Node "ip-10-0-156-42.ec2.internal" is invalid: metadata.labels: Invalid value: "7 (Core)": a valid label must be an empty string or consist of alphanumeric characters, ''-'', ''_'' or ''.'', and must start and end with an alphanumeric character (e.g. ''MyValue'',  or ''my_value'',  or ''12345'', regex used for validation is ''(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?'')'

--minimum-container-ttl-duration=6m0s \
--client-ca-file=/etc/kubernetes/ca.crt \
--cloud-provider=aws \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ contents: |
Type=notify
ExecStartPre=/bin/mkdir --parents /etc/kubernetes/manifests
ExecStartPre=/bin/rm -f /var/lib/kubelet/cpu_manager_state
EnvironmentFile=/etc/os-release
EnvironmentFile=-/etc/kubernetes/kubelet-workaround
EnvironmentFile=-/etc/kubernetes/kubelet-env

Expand All @@ -19,7 +20,7 @@ contents: |
--container-runtime=remote \
--container-runtime-endpoint=/var/run/crio/crio.sock \
--allow-privileged \
--node-labels=node-role.kubernetes.io/master \
--node-labels=node-role.kubernetes.io/master,node.openshift.io/os_version=${VERSION},node.openshift.io/os_id=${ID} \
--minimum-container-ttl-duration=6m0s \
--client-ca-file=/etc/kubernetes/ca.crt \
--cloud-provider= \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ contents: |
Type=notify
ExecStartPre=/bin/mkdir --parents /etc/kubernetes/manifests
ExecStartPre=/bin/rm -f /var/lib/kubelet/cpu_manager_state
EnvironmentFile=/etc/os-release
EnvironmentFile=-/etc/kubernetes/kubelet-workaround
EnvironmentFile=-/etc/kubernetes/kubelet-env

Expand All @@ -19,7 +20,7 @@ contents: |
--container-runtime=remote \
--container-runtime-endpoint=/var/run/crio/crio.sock \
--allow-privileged \
--node-labels=node-role.kubernetes.io/master \
--node-labels=node-role.kubernetes.io/master,node.openshift.io/os_version=${VERSION},node.openshift.io/os_id=${ID} \
--minimum-container-ttl-duration=6m0s \
--client-ca-file=/etc/kubernetes/ca.crt \
--cloud-provider= \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ contents: |
Type=notify
ExecStartPre=/bin/mkdir --parents /etc/kubernetes/manifests
ExecStartPre=/bin/rm -f /var/lib/kubelet/cpu_manager_state
EnvironmentFile=/etc/os-release
EnvironmentFile=-/etc/kubernetes/kubelet-workaround
EnvironmentFile=-/etc/kubernetes/kubelet-env

Expand All @@ -18,7 +19,7 @@ contents: |
--container-runtime=remote \
--container-runtime-endpoint=/var/run/crio/crio.sock \
--allow-privileged \
--node-labels=node-role.kubernetes.io/worker \
--node-labels=node-role.kubernetes.io/worker,node.openshift.io/os_version=${VERSION},node.openshift.io/os_id=${ID} \
--minimum-container-ttl-duration=6m0s \
--volume-plugin-dir=/etc/kubernetes/kubelet-plugins/volume/exec \
--client-ca-file=/etc/kubernetes/ca.crt \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ contents: |
Type=notify
ExecStartPre=/bin/mkdir --parents /etc/kubernetes/manifests
ExecStartPre=/bin/rm -f /var/lib/kubelet/cpu_manager_state
EnvironmentFile=/etc/os-release
EnvironmentFile=-/etc/kubernetes/kubelet-workaround
EnvironmentFile=-/etc/kubernetes/kubelet-env

Expand All @@ -18,7 +19,7 @@ contents: |
--container-runtime=remote \
--container-runtime-endpoint=/var/run/crio/crio.sock \
--allow-privileged \
--node-labels=node-role.kubernetes.io/worker \
--node-labels=node-role.kubernetes.io/worker,node.openshift.io/os_version=${VERSION},node.openshift.io/os_id=${ID} \
--minimum-container-ttl-duration=6m0s \
--volume-plugin-dir=/etc/kubernetes/kubelet-plugins/volume/exec \
--client-ca-file=/etc/kubernetes/ca.crt \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ contents: |
Type=notify
ExecStartPre=/bin/mkdir --parents /etc/kubernetes/manifests
ExecStartPre=/bin/rm -f /var/lib/kubelet/cpu_manager_state
EnvironmentFile=/etc/os-release
EnvironmentFile=-/etc/kubernetes/kubelet-workaround
EnvironmentFile=-/etc/kubernetes/kubelet-env

Expand All @@ -18,7 +19,7 @@ contents: |
--container-runtime=remote \
--container-runtime-endpoint=/var/run/crio/crio.sock \
--allow-privileged \
--node-labels=node-role.kubernetes.io/worker \
--node-labels=node-role.kubernetes.io/worker,node.openshift.io/os_version=${VERSION},node.openshift.io/os_id=${ID} \
--minimum-container-ttl-duration=6m0s \
--volume-plugin-dir=/etc/kubernetes/kubelet-plugins/volume/exec \
--client-ca-file=/etc/kubernetes/ca.crt \
Expand Down
3 changes: 2 additions & 1 deletion templates/master/01-master-kubelet/_base/units/kubelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ contents: |
Type=notify
ExecStartPre=/bin/mkdir --parents /etc/kubernetes/manifests
ExecStartPre=/bin/rm -f /var/lib/kubelet/cpu_manager_state
EnvironmentFile=/etc/os-release
EnvironmentFile=-/etc/kubernetes/kubelet-workaround
EnvironmentFile=-/etc/kubernetes/kubelet-env

Expand All @@ -21,7 +22,7 @@ contents: |
--container-runtime=remote \
--container-runtime-endpoint=/var/run/crio/crio.sock \
--allow-privileged \
--node-labels=node-role.kubernetes.io/master \
--node-labels=node-role.kubernetes.io/master,node.openshift.io/os_version=${VERSION},node.openshift.io/os_id=${ID} \
--minimum-container-ttl-duration=6m0s \
--client-ca-file=/etc/kubernetes/ca.crt \
--cloud-provider={{cloudProvider .}} \
Expand Down
3 changes: 2 additions & 1 deletion templates/worker/01-worker-kubelet/_base/units/kubelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ contents: |
Type=notify
ExecStartPre=/bin/mkdir --parents /etc/kubernetes/manifests
ExecStartPre=/bin/rm -f /var/lib/kubelet/cpu_manager_state
EnvironmentFile=/etc/os-release
EnvironmentFile=-/etc/kubernetes/kubelet-workaround
EnvironmentFile=-/etc/kubernetes/kubelet-env

Expand All @@ -20,7 +21,7 @@ contents: |
--container-runtime=remote \
--container-runtime-endpoint=/var/run/crio/crio.sock \
--allow-privileged \
--node-labels=node-role.kubernetes.io/worker \
--node-labels=node-role.kubernetes.io/worker,node.openshift.io/os_version=${VERSION},node.openshift.io/os_id=${ID} \
--minimum-container-ttl-duration=6m0s \
--volume-plugin-dir=/etc/kubernetes/kubelet-plugins/volume/exec \
--client-ca-file=/etc/kubernetes/ca.crt \
Expand Down