@@ -158,7 +158,7 @@ users:
158
158
159
159
# Whether or not to provide cluster information, which could potentially contain
160
160
# very large CA data, to this exec plugin as a part of the KUBERNETES_EXEC_INFO
161
- # environment variable.
161
+ # environment variable. Optional. Defaults to false.
162
162
provideClusterInfo : true
163
163
clusters :
164
164
- name : my-cluster
@@ -209,7 +209,8 @@ type ExecConfig struct {
209
209
// ProvideClusterInfo determines whether or not to provide cluster information,
210
210
// which could potentially contain very large CA data, to this exec plugin as a
211
211
// part of the KUBERNETES_EXEC_INFO environment variable. By default, it is set
212
- // to false.
212
+ // to false. Package k8s.io/client-go/tools/auth/exec provides helper methods for
213
+ // reading this environment variable.
213
214
ProvideClusterInfo bool `json:"provideClusterInfo"`
214
215
}
215
216
```
@@ -243,8 +244,10 @@ In JSON:
243
244
"spec" : {
244
245
"cluster" : {
245
246
"server" : " https://1.2.3.4:8080" ,
246
- "serverName" : " bar" ,
247
- "caData" : " ... " ,
247
+ "tls-server-name" : " bar" ,
248
+ "insecure-skip-tls-verify" : true ,
249
+ "certificate-authority-data" : " ... " ,
250
+ "proxy-url" : " https://4.5.6.7:9090/proxy" ,
248
251
"config" : { ... }
249
252
}
250
253
}
@@ -310,7 +313,8 @@ type Cluster struct {
310
313
// Config holds additional config data that is specific to the exec
311
314
// plugin with regards to the cluster being authenticated to.
312
315
//
313
- // This data is sourced from the clientcmd Cluster object's extensions[exec] field:
316
+ // This data is sourced from the clientcmd Cluster object's
317
+ // extensions[client.authentication.k8s.io/exec] field:
314
318
//
315
319
// clusters:
316
320
// - name: my-cluster
@@ -426,6 +430,9 @@ func LoadExecCredentialFromEnv() (runtime.Object, *rest.Config, error)
426
430
//
427
431
// If the provided data is successfully unmarshalled, but it does not contain cluster information
428
432
// (i.e., ExecCredential.Spec.Cluster == nil), then the returned rest.Config and error will be nil.
433
+ //
434
+ // Note that the returned rest.Config will use anonymous authentication, since the exec plugin has
435
+ // not returned credentials for this cluster yet.
429
436
func LoadExecCredential(data []byte) (runtime.Object, *rest.Config, error)
430
437
```
431
438
@@ -524,7 +531,7 @@ Unit tests to confirm:
524
531
` CertificateAuthority ` for reasons stated in design) so
525
532
that structs are kept up to date
526
533
- Helper methods properly create ` "k8s.io/client-go/rest".Config ` from
527
- ` "k8s.io/client-go/pkg/apis/clientauthentication".Cluster `
534
+ ` "k8s.io/client-go/pkg/apis/clientauthentication".Cluster ` and vice versa
528
535
529
536
Integration (or e2e CLI) tests to confirm:
530
537
0 commit comments