Skip to content

Commit e2ea110

Browse files
authored
refactor: rename credential provider response secret (#710)
**What problem does this PR solve?**: Wanted to avoid "creds" abbreviation. Also, the Konvoy secret names are `<cluster-name>-image-registry-credentials` and `<cluster-name>-image-registry-mirror-credentials` so it was pretty confusing also having a `<cluster-name>-registry-creds`. Wanted to make it a little more descriptive. (Suggestions welcome!) Here is what that Secret looks like: ``` { "kind":"CredentialProviderResponse", "apiVersion":"credentialprovider.kubelet.k8s.io/v1", "cacheKeyType":"Image", "cacheDuration":"0s", "auth":{ "docker.io": {"username": "<>", "password": "<>"} } } ``` **Which issue(s) this PR fixes**: Fixes # **How Has This Been Tested?**: <!-- Please describe the tests that you ran to verify your changes. Provide output from the tests and any manual steps needed to replicate the tests. --> **Special notes for your reviewer**: <!-- Use this to provide any additional information to the reviewers. This may include: - Best way to review the PR. - Where the author wants the most review attention on. - etc. -->
1 parent 1060ccd commit e2ea110

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

pkg/handlers/generic/mutation/imageregistries/credentials/credentials_secret.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,5 +114,5 @@ func kubeletStaticCredentialProviderSecretContents(configs []providerConfig) (st
114114
}
115115

116116
func credentialSecretName(clusterName string) string {
117-
return fmt.Sprintf("%s-registry-creds", clusterName)
117+
return fmt.Sprintf("%s-credential-provider-response", clusterName)
118118
}

pkg/handlers/generic/mutation/imageregistries/credentials/inject_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ import (
2828
)
2929

3030
const (
31-
validSecretName = "myregistry-credentials"
32-
registryStaticCredentialsSecretSuffix = "registry-creds"
31+
validSecretName = "myregistry-credentials"
3332
)
3433

3534
func Test_needImageRegistryCredentialsConfiguration(t *testing.T) {

0 commit comments

Comments
 (0)