Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Honor KUBECONFIG env variable in fluxd #2741

Merged
merged 1 commit into from
Jan 14, 2020

Conversation

2opremio
Copy link
Contributor

@2opremio 2opremio commented Jan 13, 2020

Also, delegate the creation of incluster configuration to the Kubernetes library.

As a result, we are not making use of the --in-cluster argument anymore. Both the --in-cluster and --kube-config arguments have been deprecated (you can use the KUBECONFIG env variable instead).

Overrides #2621

Also, delegate the creation of incluster configuration
to the Kubernetes library.

As a result, we are not making use of the `--in-cluster`
argument anymore. Both the `--in-cluster` and `--kube-config`
arguments have been deprecated (you can use the `KUBECONFIG`
env variable instead).
@2opremio 2opremio requested a review from hiddeco January 13, 2020 18:05
@2opremio 2opremio added this to the 1.18.0 milestone Jan 13, 2020
@2opremio 2opremio changed the title Honor KUBECONFIG env variable Honor KUBECONFIG env variable in fluxd Jan 13, 2020
Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

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

✔️

@2opremio 2opremio merged commit f0597f1 into fluxcd:master Jan 14, 2020
@2opremio 2opremio deleted the honor-kubeconfig-env branch January 14, 2020 00:31
if *k8sInCluster && !httpGitURL {
namespace, err := ioutil.ReadFile("/var/run/secrets/kubernetes.io/serviceaccount/namespace")
fileinfo, err := os.Stat(k8sInClusterSecretsBaseDir)
isInCluster := err != nil && fileinfo.IsDir()

Choose a reason for hiding this comment

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

I think you meant isInCluster := err == nil && fileinfo.IsDir() ... curious how a change so broken could make it to master ?

Copy link
Contributor Author

@2opremio 2opremio Jan 17, 2020

Choose a reason for hiding this comment

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

Because you didn't take part in the review :)

Now seriously, my bad. This didn't get caught by the end to end tests because we generate our own ssh key there.. we should add one covering ssh key generation.

Thanks for reporting it and sorry for the inconvenience.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants