Skip to content

Commit

Permalink
Use a different bucket for pod-identity-webhook discovery store
Browse files Browse the repository at this point in the history
  • Loading branch information
rifelpet committed Oct 4, 2024
1 parent 6241230 commit 1f4a97f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
12 changes: 12 additions & 0 deletions tests/e2e/kubetest2-kops/deployer/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,18 @@ func (d *deployer) stateStore() string {
return ss
}

// discoveryStore returns the VFS path to use for public OIDC documents
func (d *deployer) discoveryStore() string {
discovery := os.Getenv("KOPS_DISCOVERY_STORE")
if discovery == "" {
switch d.CloudProvider {
case "aws":
discovery = "s3://k8s-kops-ci-prow"
}
}
return discovery
}

func (d *deployer) stagingStore() string {
sb := os.Getenv("KOPS_STAGING_BUCKET")
if sb == "" {
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/kubetest2-kops/deployer/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ func (d *deployer) templateValues(zones []string, publicIP string) (map[string]i
"kubernetesVersion": d.KubernetesVersion,
"publicIP": publicIP,
"stateStore": d.stateStore(),
"discoveryStore": d.discoveryStore(),
"zones": zones,
"sshPublicKey": string(publicKey),
}, nil
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/scenarios/podidentitywebhook/cluster.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
podIdentityWebhook:
enabled: true
serviceAccountIssuerDiscovery:
discoveryStore: "{{.stateStore}}/{{.clusterName}}"
discoveryStore: "{{.discoveryStore}}/{{.clusterName}}"
enableAWSOIDCProvider: true
sshAccess:
- {{.publicIP}}
Expand Down

0 comments on commit 1f4a97f

Please sign in to comment.