Skip to content
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

Spire injection client #26

Merged
merged 1 commit into from
Jul 18, 2022
Merged

Conversation

lumjjb
Copy link

@lumjjb lumjjb commented Jul 13, 2022

No description provided.

Signed-off-by: Brandon Lum <lumjjb@gmail.com>
type controllerKey struct{}

// GetControllerAPIClient extracts the ControllerAPIClient from the context.
func GetControllerAPIClient(ctx context.Context) ControllerAPIClient {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing some testing here. Seems like I am running into the untyped == nil. Do I need to setup the context in some way for this to work?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm interesting, yea maybe it requires setting up the context with the injection library.

)

func init() {
injection.Fake.RegisterClient(withFakeControllerClient)
injection.Fake.RegisterClient(withFakeEntrypointerClient)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works with the mocked spire tests. But why don't you need the GetEntrypointerAPIClient here?

@pxp928 pxp928 merged commit 2f8a342 into pxp928:package-spire Jul 18, 2022
pxp928 pushed a commit that referenced this pull request Jul 27, 2022
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
pxp928 pushed a commit that referenced this pull request Jul 28, 2022
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
pxp928 pushed a commit that referenced this pull request Aug 4, 2022
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
pxp928 pushed a commit that referenced this pull request Aug 9, 2022
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants