Skip to content

Commit f64e992

Browse files
committed
Rename credentialProviders to accessProviders
Signed-off-by: kahirokunn <[email protected]>
1 parent 1e36a2c commit f64e992

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

cmd/secretreader-plugin/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Use the following provider config to exec the secret-reader plugin.
5757
}
5858
```
5959

60-
### Note: `ClusterProfile.status.credentialProviders[].cluster.extensions`
60+
### Note: `ClusterProfile.status.accessProviders[].cluster.extensions`
6161

6262
- Required: set `extensions[].name` to `client.authentication.k8s.io/exec`.
6363
- The library reads only the `extension` field of that entry and passes it through to `ExecCredential.Spec.Cluster.Config`.
@@ -67,7 +67,7 @@ Example:
6767

6868
```yaml
6969
status:
70-
credentialProviders:
70+
accessProviders:
7171
- name: secretreader
7272
cluster:
7373
server: https://<spoke-server>

examples/controller-example/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This example automatically sets up the following, stores the spoke cluster token
55
- Create a hub cluster and a spoke cluster with kind
66
- On the spoke, create a ServiceAccount and ClusterRole/Binding that can list Pods and issue a token
77
- On the hub, create a Secret with the token in `data.token`
8-
- On the hub, create a `ClusterProfile` with spoke information (set `secretreader` in `status.credentialProviders`)
8+
- On the hub, create a `ClusterProfile` with spoke information (set `secretreader` in `status.accessProviders`)
99

1010
## Prerequisites
1111

@@ -43,15 +43,15 @@ KUBECONFIG=./examples/controller-example/hub.kubeconfig ./examples/controller-ex
4343

4444
## Note: ClusterProfile extensions
4545

46-
- Required: set `status.credentialProviders[].cluster.extensions[].name` to `client.authentication.k8s.io/exec`.
46+
- Required: set `status.accessProviders[].cluster.extensions[].name` to `client.authentication.k8s.io/exec`.
4747
- The library reads only the `extension` field of that entry (arbitrary JSON). Other `extensions` entries are ignored.
4848
- That `extension` is passed through to `ExecCredential.Spec.Cluster.Config`. The `secretreader` plugin uses `clusterName` in that object.
4949

5050
Example (to be merged into `ClusterProfile.status`):
5151

5252
```yaml
5353
status:
54-
credentialProviders:
54+
accessProviders:
5555
- name: secretreader
5656
cluster:
5757
server: https://<spoke-server>

examples/controller-example/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818

1919
func main() {
2020
// Flags
21-
credentialsProviders := credentials.SetupProviderFileFlag()
21+
accessProviders := credentials.SetupProviderFileFlag()
2222
namespace := flag.String("namespace", "default", "Namespace of the ClusterProfile on the hub cluster")
2323
clusterProfileName := flag.String("clusterprofile", "", "Name of the ClusterProfile to target (required)")
2424
flag.Parse()
@@ -28,7 +28,7 @@ func main() {
2828
}
2929

3030
// Load providers file
31-
cpCreds, err := credentials.NewFromFile(*credentialsProviders)
31+
cpCreds, err := credentials.NewFromFile(*accessProviders)
3232
if err != nil {
3333
log.Fatalf("Got error reading credentials providers: %v", err)
3434
}

examples/controller-example/setup-kind-demo.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ EOF
125125
STATUS_PATCH=$(cat <<EOF
126126
{
127127
"status": {
128-
"credentialProviders": [
128+
"accessProviders": [
129129
{
130130
"name": "secretreader",
131131
"cluster": {

0 commit comments

Comments
 (0)