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

Use auth from opsrc #28

Conversation

kevinrizza
Copy link
Member

-Query opsrc for secret name
-Update downloader to get auth token secret
-Use auth token in apprclient request header

@kevinrizza
Copy link
Member Author

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"])
Copy link
Contributor

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.

Copy link
Member Author

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.

@@ -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) {
Copy link
Contributor

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?

Copy link
Member Author

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

@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 16, 2019
@tkashem
Copy link
Contributor

tkashem commented Feb 16, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. and removed lgtm Indicates that a PR is ready to be merged. labels Feb 16, 2019
@kevinrizza kevinrizza changed the title WIP: Use auth from opsrc Use auth from opsrc Feb 16, 2019
@tkashem
Copy link
Contributor

tkashem commented Feb 16, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 16, 2019
-Query opsrc for secret name
-Update downloader to get auth token secret
-Use auth token in apprclient request header
-Update vendored marketplace version
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Feb 16, 2019
Copy link
Member

@njhale njhale left a 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

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 16, 2019
@openshift-ci-robot
Copy link

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 16, 2019
@kevinrizza
Copy link
Member Author

/test e2e-aws

@openshift-merge-robot openshift-merge-robot merged commit 0531400 into operator-framework:master Feb 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants