-
Notifications
You must be signed in to change notification settings - Fork 245
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
Use auth from opsrc #28
Use auth from opsrc #28
Conversation
Put this wip pr up for now to review, still need to merge the auth pr on operator-marketplace and then update vendored dependencies. |
return options, err | ||
} | ||
|
||
options.AuthToken = string(secret.Data["token"]) |
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.
I thought we needed to base64 decode it.
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.
@tkashem Nope, the api just obfuscates it as base64, but when pulling from the client directly it is returned as a string.
pkg/appregistry/appregistry.go
Outdated
@@ -100,3 +107,23 @@ func NewClient(kubeconfig string, logger *logrus.Entry) (clientset marketplace.I | |||
clientset, err = marketplace.NewForConfig(config) | |||
return | |||
} | |||
|
|||
func NewSecretClient(kubeconfig string, logger *logrus.Entry) (clientset *kubernetes.Clientset, err error) { |
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.
nit: maybe kubeclient
is a more appropriate 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.
Sure, updated in latest commit. I also updated the field name in the downloader to match
588d4df
to
516ef1a
Compare
/lgtm |
/lgtm |
-Query opsrc for secret name -Update downloader to get auth token secret -Use auth token in apprclient request header -Update vendored marketplace version
b195849
to
7a4b0a3
Compare
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.
Cool - in the future we may want to play around with removing the dependencies on marketplace libraries and CRDs in favor of flags and arguments.
For now this gets the job done. Nice work putting this together so quickly!
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kevinrizza, njhale, tkashem The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test e2e-aws |
-Query opsrc for secret name
-Update downloader to get auth token secret
-Use auth token in apprclient request header