@@ -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.
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,8 @@ 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
+ "certificate-authority-data " : " ... " ,
248
249
"config" : { ... }
249
250
}
250
251
}
@@ -310,7 +311,8 @@ type Cluster struct {
310
311
// Config holds additional config data that is specific to the exec
311
312
// plugin with regards to the cluster being authenticated to.
312
313
//
313
- // This data is sourced from the clientcmd Cluster object's extensions[exec] field:
314
+ // This data is sourced from the clientcmd Cluster object's
315
+ // extensions[client.authentication.k8s.io/exec] field:
314
316
//
315
317
// clusters:
316
318
// - name: my-cluster
@@ -426,6 +428,9 @@ func LoadExecCredentialFromEnv() (runtime.Object, *rest.Config, error)
426
428
//
427
429
// If the provided data is successfully unmarshalled, but it does not contain cluster information
428
430
// (i.e., ExecCredential.Spec.Cluster == nil), then the returned rest.Config and error will be nil.
431
+ //
432
+ // Note that the returned rest.Config will use anonymous authentication, since the exec plugin has
433
+ // not returned credentials for this cluster yet.
429
434
func LoadExecCredential(data []byte) (runtime.Object, *rest.Config, error)
430
435
```
431
436
@@ -524,7 +529,7 @@ Unit tests to confirm:
524
529
` CertificateAuthority ` for reasons stated in design) so
525
530
that structs are kept up to date
526
531
- Helper methods properly create ` "k8s.io/client-go/rest".Config ` from
527
- ` "k8s.io/client-go/pkg/apis/clientauthentication".Cluster `
532
+ ` "k8s.io/client-go/pkg/apis/clientauthentication".Cluster ` and vice versa
528
533
529
534
Integration (or e2e CLI) tests to confirm:
530
535
0 commit comments