@@ -47,8 +47,7 @@ func Test_linuxOS_updateKubeletArguments(t *testing.T) {
47
47
args : args {line : "" },
48
48
outputConfigPath : dir + "/" + credProviderFile ,
49
49
configWantPath : "testdata/expected-config.yaml" ,
50
- want : fmt .Sprintf (" --feature-gates=KubeletCredentialProviders=true " +
51
- "--image-credential-provider-config=%s%s" , dir , credProviderFile ),
50
+ want : fmt .Sprintf (" --image-credential-provider-config=%s%s" , dir , credProviderFile ),
52
51
},
53
52
{
54
53
name : "test multiple match patterns" ,
@@ -67,27 +66,10 @@ func Test_linuxOS_updateKubeletArguments(t *testing.T) {
67
66
args : args {line : "" },
68
67
outputConfigPath : dir + "/" + credProviderFile ,
69
68
configWantPath : "testdata/expected-config-multiple-patterns.yaml" ,
70
- want : fmt .Sprintf (" --feature-gates=KubeletCredentialProviders=true " +
71
- "--image-credential-provider-config=%s%s" , dir , credProviderFile ),
72
- },
73
- {
74
- name : "skip credential provider if already provided" ,
75
- fields : fields {
76
- profile : "eksa-packages" ,
77
- extraArgsPath : dir ,
78
- basePath : dir ,
79
- config : constants.CredentialProviderConfigOptions {
80
- ImagePatterns : []string {constants .DefaultImagePattern },
81
- DefaultCacheDuration : constants .DefaultCacheDuration ,
82
- },
83
- },
84
- args : args {line : " --feature-gates=KubeletCredentialProviders=true" },
85
- outputConfigPath : dir + "/" + credProviderFile ,
86
- configWantPath : "testdata/expected-config.yaml" ,
87
69
want : fmt .Sprintf (" --image-credential-provider-config=%s%s" , dir , credProviderFile ),
88
70
},
89
71
{
90
- name : "skip both cred provider and feature gate if provided" ,
72
+ name : "skip credential provider if already provided" ,
91
73
fields : fields {
92
74
profile : "eksa-packages" ,
93
75
extraArgsPath : dir ,
@@ -97,7 +79,7 @@ func Test_linuxOS_updateKubeletArguments(t *testing.T) {
97
79
DefaultCacheDuration : constants .DefaultCacheDuration ,
98
80
},
99
81
},
100
- args : args {line : " --feature-gates=KubeletCredentialProviders=false -- image-credential-provider-config=blah" },
82
+ args : args {line : " --image-credential-provider-config=blah" },
101
83
outputConfigPath : dir + "/" + credProviderFile ,
102
84
configWantPath : "" ,
103
85
want : "" ,
@@ -117,8 +99,7 @@ func Test_linuxOS_updateKubeletArguments(t *testing.T) {
117
99
outputConfigPath : dir + "/" + credProviderFile ,
118
100
configWantPath : "testdata/expected-config-alpha.yaml" ,
119
101
k8sVersion : "v1.25" ,
120
- want : fmt .Sprintf (" --feature-gates=KubeletCredentialProviders=true " +
121
- "--image-credential-provider-config=%s%s" , dir , credProviderFile ),
102
+ want : fmt .Sprintf (" --image-credential-provider-config=%s%s" , dir , credProviderFile ),
122
103
},
123
104
{
124
105
name : "test v1 api 1.27" ,
@@ -135,8 +116,7 @@ func Test_linuxOS_updateKubeletArguments(t *testing.T) {
135
116
outputConfigPath : dir + "/" + credProviderFile ,
136
117
configWantPath : "testdata/expected-config.yaml" ,
137
118
k8sVersion : "v1.27" ,
138
- want : fmt .Sprintf (" --feature-gates=KubeletCredentialProviders=true " +
139
- "--image-credential-provider-config=%s%s" , dir , credProviderFile ),
119
+ want : fmt .Sprintf (" --image-credential-provider-config=%s%s" , dir , credProviderFile ),
140
120
},
141
121
}
142
122
for _ , tt := range tests {
0 commit comments