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 kubeappsapis behind nginx #2901

Merged
merged 3 commits into from
May 28, 2021

Conversation

antgamdia
Copy link
Contributor

Description of the change

This PR simply adds (if the feature flag is enabled) the current kubeapps-apis behind the nginx reverse proxy. This way, we can pass through the authentication token as in the rest of the services.

Benefits

Besides paving the way for #2851, it also allows using the API without any port-forwarding.

Possible drawbacks

Note that -currently- it uses a privileged SA to list everything, but it is not a production-ready thing and we soon change are changing it to use the user's credentials, it's not a big deal.

Applicable issues

N/A

Additional information

I hope to be sending the auth PR soon :S

Copy link
Contributor

@absoludity absoludity left a comment

Choose a reason for hiding this comment

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

Note that -currently- it uses a privileged SA to list everything, but it is not a production-ready thing and we soon change are changing it to use the user's credentials, it's not a big deal.

Right, I'll feel better about this once the kubeappsapis service requires a --unsafe-use-demo-svc-account or similar to use the service account. Currently it uses it by default for easy testing and because it's not (wasn't) exposed, but as long as that's one of the first changes you'll make to the kubeappsapis service, I'm happy :)

@@ -139,6 +139,22 @@ data:
{{- end }}
}

{{- if .Values.featureFlags.kubeappsAPIsServer }}
location ~* /api/kubeappsapis {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we just use /kubeappsapis or even /apis given that the full paths would then be things like /apis/core/packages/v1alpha1/...

What do you think? It's still behind a featureflag so I've no problem changing it later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea indeed, shorter and more concise. Changing right away!
Regarding the SA flag, yep, totally agree. Of course, we are not gonna release a new official version as it is right now,
However, let's see how this flag can be passed through, I'm struggling with passing information towards the plugins. I Will let you know in another PR.

@antgamdia antgamdia merged commit ce47fce into vmware-tanzu:master May 28, 2021
@antgamdia antgamdia deleted the addKubeappsapisBehindNginx branch May 28, 2021 16:27
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.

None yet

2 participants