Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

fix: set kubelet config for containerd in templates #1785

Merged
merged 3 commits into from
Aug 16, 2019

Conversation

jackfrancis
Copy link
Member

@jackfrancis jackfrancis commented Aug 15, 2019

Reason for Change:

Simplify containerd kubelet config implementation: do this during cloud-init template generation instead of via sed at the last mile.

Also remove some deprecated "if less than k8s 1.8" logic to make the above more maintainable/expressive.

Issue Fixed:

Fixes #1786

Requirements:

Notes:

@codecov
Copy link

codecov bot commented Aug 16, 2019

Codecov Report

Merging #1785 into master will decrease coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #1785      +/-   ##
==========================================
- Coverage   76.39%   76.38%   -0.01%     
==========================================
  Files         130      130              
  Lines       19351    19356       +5     
==========================================
+ Hits        14783    14785       +2     
- Misses       3771     3774       +3     
  Partials      797      797

@@ -1733,6 +1733,11 @@ func (k *KubernetesConfig) GetOrderedKubeletConfigStringForPowershell() string {
return strings.TrimSuffix(buf.String(), ", ")
}

// HasContainerd returns whether or not we need the containerd runtime
func (k *KubernetesConfig) HasContainerd() bool {
return k.ContainerRuntime == KataContainers || k.ContainerRuntime == Containerd
Copy link
Contributor

Choose a reason for hiding this comment

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

this could be misleading in the future if we assume this function to mean k.ContainerRuntime == Containerd, now I understand your original naming needsContainerd... Maybe we can make it explicit in the comment that Kata needs containerd as well so it shows in the function info when hovering from different files, wdyt? Also so we don't think later that this is an unintentional bug...

Copy link
Contributor

Choose a reason for hiding this comment

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

other than that lgtm

Copy link
Member Author

Choose a reason for hiding this comment

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

I think needsContainerd actually is the best option here, with an appropriate comment

Copy link
Contributor

@CecileRobertMichon CecileRobertMichon left a comment

Choose a reason for hiding this comment

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

/lgtm

@acs-bot
Copy link

acs-bot commented Aug 16, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon, jackfrancis

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [CecileRobertMichon,jackfrancis]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@acs-bot acs-bot merged commit 9862eaa into Azure:master Aug 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

containerd scenarios CSE exit 6
3 participants