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

Allow CNF Cert Suite app's go-clients to work in a k8s pod. #1543

Merged

Conversation

greyerof
Copy link
Contributor

This change will allow the go-clients to be initialized properly in case the app is running inside a pod in a k8s/OCP cluster.

The method rest.InClusterConfig() reads the pod's SA tokens/creentials and returns a rest.Config struct that can be used to initialize all the go-clients.

If that method returns an error, it assumes it's running outside a cluster, using the provided filenames to create the rest.Config.

This change will allow the go-clients to be initialized properly in case
the app is running inside a pod in a k8s/OCP cluster.

The method rest.InClusterConfig() reads the pod's SA tokens/creentials
and returns a rest.Config struct that can be used to initialize all the
go-clients.

If that method returns an error, it assumes it's running outside a
cluster, using the provided filenames to create the rest.Config.
greyerof and others added 2 commits October 20, 2023 07:47
The preflight's Operator checks were failing because the
clientcmdapi.Config struct wasn't filled up properly.
@greyerof greyerof merged commit 5e3f749 into redhat-best-practices-for-k8s:main Oct 20, 2023
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.

3 participants