Skip to content

Commit 80c6da5

Browse files
committed
exec credential provider: updates to KEP after cluster info PR
Signed-off-by: Andrew Keesler <[email protected]>
1 parent 12266f8 commit 80c6da5

File tree

1 file changed

+11
-6
lines changed
  • keps/sig-auth/541-external-credential-providers

1 file changed

+11
-6
lines changed

keps/sig-auth/541-external-credential-providers/README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ users:
158158
159159
# Whether or not to provide cluster information, which could potentially contain
160160
# very large CA data, to this exec plugin as a part of the KUBERNETES_EXEC_INFO
161-
# environment variable.
161+
# environment variable. Optional.
162162
provideClusterInfo: true
163163
clusters:
164164
- name: my-cluster
@@ -209,7 +209,8 @@ type ExecConfig struct {
209209
// ProvideClusterInfo determines whether or not to provide cluster information,
210210
// which could potentially contain very large CA data, to this exec plugin as a
211211
// 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.
213214
ProvideClusterInfo bool `json:"provideClusterInfo"`
214215
}
215216
```
@@ -243,8 +244,8 @@ In JSON:
243244
"spec": {
244245
"cluster": {
245246
"server": "https://1.2.3.4:8080",
246-
"serverName": "bar",
247-
"caData": " ... ",
247+
"tls-server-name": "bar",
248+
"certificate-authority-data": " ... ",
248249
"config": { ... }
249250
}
250251
}
@@ -310,7 +311,8 @@ type Cluster struct {
310311
// Config holds additional config data that is specific to the exec
311312
// plugin with regards to the cluster being authenticated to.
312313
//
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:
314316
//
315317
// clusters:
316318
// - name: my-cluster
@@ -426,6 +428,9 @@ func LoadExecCredentialFromEnv() (runtime.Object, *rest.Config, error)
426428
//
427429
// If the provided data is successfully unmarshalled, but it does not contain cluster information
428430
// (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.
429434
func LoadExecCredential(data []byte) (runtime.Object, *rest.Config, error)
430435
```
431436

@@ -524,7 +529,7 @@ Unit tests to confirm:
524529
`CertificateAuthority` for reasons stated in design) so
525530
that structs are kept up to date
526531
- 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
528533

529534
Integration (or e2e CLI) tests to confirm:
530535

0 commit comments

Comments
 (0)