Skip to content

Commit

Permalink
Fix Kubelet Args for 1.28 (#989)
Browse files Browse the repository at this point in the history
* Fix Kubelet Args for 1.28

* add tatlat to owners
  • Loading branch information
tatlat authored Sep 27, 2023
1 parent 88c5c9a commit fba2ec2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ approvers:
- lewisdiamond
- TerryHowe
- vincentni
- tatlat
7 changes: 5 additions & 2 deletions credentialproviderpackage/pkg/configurator/linux/linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,11 @@ func (c *linuxOS) createConfig() (string, error) {

func (c *linuxOS) updateKubeletArguments(line string) string {
args := ""
if !strings.Contains(line, "KubeletCredentialProviders") {
args += " --feature-gates=KubeletCredentialProviders=true"
k8sVersion := os.Getenv("K8S_VERSION")
if semver.Compare(k8sVersion, "v1.26") < 0 {
if !strings.Contains(line, "KubeletCredentialProviders") {
args += " --feature-gates=KubeletCredentialProviders=true"
}
}

val, err := c.createConfig()
Expand Down

0 comments on commit fba2ec2

Please sign in to comment.