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

Add workloadapi options for cmd-registry-memory #56

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

denis-tingaikin
Copy link
Member

Signed-off-by: denis-tingajkin denis.tingajkin@xored.com

Motivation

Added svid picker
Added spire logging

Signed-off-by: denis-tingajkin <denis.tingajkin@xored.com>
Signed-off-by: denis-tingajkin <denis.tingajkin@xored.com>
source, err := workloadapi.NewX509Source(ctx)
source, err := workloadapi.NewX509Source(ctx,
workloadapi.WithClientOptions(workloadapi.WithLogger(log.Entry(ctx))),
workloadapi.WithDefaultX509SVIDPicker(func(svids []*x509svid.SVID) *x509svid.SVID {
Copy link
Member

Choose a reason for hiding this comment

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

So I'm not clear why we are using the SVID Picker here...

Copy link
Member Author

@denis-tingaikin denis-tingaikin Aug 16, 2020

Choose a reason for hiding this comment

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

Actually the deployment can fetch few svids. By default workloadapi.NewX509Source just picks first.
So I think we should pick svid for registry if for that has been added spire entry.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm... I'm inclined to not worry about it right now... in practice at least in K8s, I believe its only returning one SVID, and this forces an SVID schema on users they may not want.

Copy link
Member Author

Choose a reason for hiding this comment

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

in practice at least in K8s, I believe its only returning one SVID

I guess it is related to user spire setup...

nsmbot pushed a commit that referenced this pull request Dec 29, 2020
This PR syncs files with https://github.com/networkservicemesh/cmd-template

Revision: https://github.com/networkservicemesh/cmd-template/commits/5e735856d8be1fb56c377c31bb57f8094d8f38f6

commit 5e735856d8be1fb56c377c31bb57f8094d8f38f6
Author: Denis Tingaikin <49399980+denis-tingajkin@users.noreply.github.com>
Date:   Tue Dec 29 13:49:50 2020 +0700

    update golangci linter (#56)

    Signed-off-by: denis-tingajkin <denis.tingajkin@xored.com>

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
@denis-tingaikin denis-tingaikin marked this pull request as draft March 16, 2022 08:52
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