-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Remove deprecated 'enable-cri' flag in kubernetes 1.7 #1408
Conversation
Signed-off-by: Amit Kumar Jaiswal <amitkumarj441@gmail.com>
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
@@ -13,7 +13,7 @@ KUBELET_HOSTNAME="--hostname-override={{ ansible_hostname }}" | |||
--pod-infra-container-image={{ pod_infra_image_repo }}:{{ pod_infra_image_tag }} \ | |||
--kube-reserved cpu={{ kubelet_cpu_limit }},memory={{ kubelet_memory_limit|regex_replace('Mi', 'M') }} \ | |||
--node-status-update-frequency={{ kubelet_status_update_frequency }} \ | |||
{% if kube_version | version_compare('v1.6', '>=') %} | |||
{% if kube_version | version_compare('v1.7', '>=') %} | |||
--enable-cri={{ kubelet_enable_cri }} --cgroups-per-qos={{ kubelet_cgroups_per_qos }} \ |
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.
this won't work. enable-cri was removed in 1.7.0
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.
@matlockx But as I tested, adding a kube_version
check for --enable-cri
was enough to upgrade to 1.7.0 using upgrade-cluster (with default options).
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.
interesting. i just tested it and kubelet service failed to start with 'Error: unknown flag: --enable-cri'. maybe you haven't changed the version to 1.7.0? because the check just excludes the block from being used if your version is still 1.6.* and on top of that it does not make sense to me to change the check like that. i think it should be something like
{% if kube_version | version_compare('v1.6', '>=') %}
{# flag got removed with 1.7.0 #}
{% if kube_version | version_compare('v1.7', '<') %}
--enable-cri={{ kubelet_enable_cri }}
{% endif %}
what does kubectl version
say on your cluster.
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.
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.
@matlockx Alright. On my cluster kubectl version
is 1.5.6 and you're right with your suggestion.
Thanks for reminding me 😀 !
Can I update the changes you suggested above?
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. but i'm not a maintainer, so it has to go through review by one of them anyhow.
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.
Okay @matlockx ! Just updated it.
Updated!!
Updated!
@@ -14,6 +14,8 @@ KUBELET_HOSTNAME="--hostname-override={{ ansible_hostname }}" | |||
--kube-reserved cpu={{ kubelet_cpu_limit }},memory={{ kubelet_memory_limit|regex_replace('Mi', 'M') }} \ | |||
--node-status-update-frequency={{ kubelet_status_update_frequency }} \ | |||
{% if kube_version | version_compare('v1.6', '>=') %} | |||
{# flag got removed with 1.7.0 #} | |||
{% if kube_version | version_compare('v1.7', '<') %} | |||
--enable-cri={{ kubelet_enable_cri }} --cgroups-per-qos={{ kubelet_cgroups_per_qos }} \ |
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.
you forgot the closing endif, it must be:
{% if kube_version | version_compare('v1.6', '>=') %}
{# flag got removed with 1.7.0 #}
{% if kube_version | version_compare('v1.7', '<') %}
--enable-cri={{ kubelet_enable_cri }} \
{% endif %}
--cgroups-per-qos={{ kubelet_cgroups_per_qos }} \
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.
anyhow, you should double check the file after the jinja2 replacements. i haven't checked it.
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.
Thanks @matlockx for pointing this out.
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.
you are welcome
Updated with closing endif.
ci check this |
ci check this |
@rsmitty i see, you got the ci super power :) |
ok, how do you read the ci result? https://gitlab.com/kargo-ci/kubernetes-incubator__kubespray/pipelines/9534059 says 'passed' but it still says here 'failed' and: any other suggestions regarding the change? |
It's just the webhooks being dumb, CI passed |
can we merge this? |
awesome! thanks |
Signed-off-by: Amit Kumar Jaiswal amitkumarj441@gmail.com