Skip to content

Commit

Permalink
Fix AWS IAM auth format
Browse files Browse the repository at this point in the history
  • Loading branch information
jiayiwang7 committed May 23, 2022
1 parent 51e4bdc commit 88dc258
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions pkg/clusterapi/identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ import (
const awsIamKubeconfig = `
# clusters refers to the remote service.
clusters:
- name: aws-iam-authenticator
cluster:
certificate-authority: /var/aws-iam-authenticator/cert.pem
server: https://localhost:21362/authenticate
- name: aws-iam-authenticator
cluster:
certificate-authority: /var/aws-iam-authenticator/cert.pem
server: https://localhost:21362/authenticate
# users refers to the API Server's webhook configuration
# (we don't need to authenticate the API server).
users:
- name: apiserver
- name: apiserver
# kubeconfig files require a context. Provide one for the API Server.
current-context: webhook
contexts:
- name: webhook
context:
cluster: aws-iam-authenticator
user: apiserver
context:
cluster: aws-iam-authenticator
user: apiserver
`

var awsIamMounts = []bootstrapv1.HostPathMount{
Expand Down
16 changes: 8 additions & 8 deletions pkg/clusterapi/identity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,21 +128,21 @@ func TestConfigureAWSIAMAuthInKubeadmControlPlane(t *testing.T) {
Content: `
# clusters refers to the remote service.
clusters:
- name: aws-iam-authenticator
cluster:
certificate-authority: /var/aws-iam-authenticator/cert.pem
server: https://localhost:21362/authenticate
- name: aws-iam-authenticator
cluster:
certificate-authority: /var/aws-iam-authenticator/cert.pem
server: https://localhost:21362/authenticate
# users refers to the API Server's webhook configuration
# (we don't need to authenticate the API server).
users:
- name: apiserver
- name: apiserver
# kubeconfig files require a context. Provide one for the API Server.
current-context: webhook
contexts:
- name: webhook
context:
cluster: aws-iam-authenticator
user: apiserver
context:
cluster: aws-iam-authenticator
user: apiserver
`,
},
{
Expand Down

0 comments on commit 88dc258

Please sign in to comment.