-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gardener config credential repository #55
Conversation
@jschicktanz You need rebase this pull request with latest master branch. Please check. |
Hello 👋 :) Please comment exported fields and try using Thanks! :) |
pkg/contexts/credentials/repositories/gardenerconfig/handler/container_registry/handler.go
Show resolved
Hide resolved
pkg/contexts/credentials/repositories/gardenerconfig/handler/container_registry/handler.go
Outdated
Show resolved
Hide resolved
pkg/contexts/credentials/repositories/gardenerconfig/handler/container_registry/handler.go
Outdated
Show resolved
Hide resolved
pkg/contexts/credentials/repositories/gardenerconfig/suite_test.go
Outdated
Show resolved
Hide resolved
@jschicktanz You need rebase this pull request with latest master branch. Please check. |
@enrico-kaack-comp, @reshnm You have pull request review open invite, please check |
|
||
r.creds = map[string]core.Credentials{} | ||
for _, cred := range creds { | ||
credName := cred.Name() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! :) That's better. :)
@jschicktanz Yo 👋 :) I resolved the conflict for you :) |
Thanks @Skarlso, and sry for not responding. I had to completely setup my local machine from scratch because of a failed OS update🙈 |
"password": "123", | ||
} | ||
|
||
creds := `{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be rename it to something like gardenconfig
. Creds may be misunderstood as credentials in the sense of a credential context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
specdata := fmt.Sprintf(specTemplate, svr.URL, local.Plaintext) | ||
|
||
repo, err := defaultContext.RepositoryForConfig([]byte(specdata), nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to instantiate the repository, if the server is currently not available?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
Expect(credentials.Properties()).To(Equal(props)) | ||
}) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should test whether the provided credentials are properly propagated to their consumer ids.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Expect(credentials.Properties()).To(Equal(props)) | ||
Expect(credentialsFromRepo).To(Equal(expectedCreds)) | ||
|
||
credSrc, err := defaultContext.GetCredentialsForConsumer(expectedConsumerId, hostpath.IdentityMatcher(identity.CONSUMER_TYPE)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should use your identity matcher object provided by the package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should bundle the consumer test in a dedicated test with the focus of testing the consumer propagation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
What this PR does / why we need it:
Add Gardener config credential repository which can read credentials in a data format used by the Gardener Pipelines (see https://github.com/gardener/cc-utils/tree/master/model). Credentials can be handed to the client either via local files or a http server (see https://github.com/gardener/cc-utils/blob/master/ccc/secrets_server.py#L29).
Which issue(s) this PR fixes:
Fixes #34
Special notes for your reviewer:
Release note: