Skip to content
This repository has been archived by the owner on Oct 6, 2021. It is now read-only.

Local Kubeconfig for easier development #31

Merged
merged 1 commit into from
Oct 7, 2018

Conversation

christopherhein
Copy link
Contributor

@christopherhein christopherhein commented Jun 24, 2018

Also allows a local kubeconfig to be passed into for easier testing.

@galexrt
Copy link
Member

galexrt commented Jun 24, 2018

I don't think TPR support should be removed in favor for 1.10, unless we "announce" it and/or make a tag/branch with TPR and one continuing development without TPR support..
As probably some projects using this library are still using TPRs.

Are you experiencing issues with 1.10 using the operator-kit as is?

@christopherhein
Copy link
Contributor Author

Specifically trying to get support for 1.10 client-go with support for the ExecCredential client authentication flow to support EKS / https://github.com/kubernetes-sigs/aws-iam-authenticator. The=1.8.2 makes that difficult. Also the TPR removal was due to 1.10 libraries removing the TPR functions

@christopherhein
Copy link
Contributor Author

In theory in my projects I could use dep and [[override]] but the TPR references will still not work, if I’m not mistake...

@christopherhein christopherhein changed the title Kubernetes 1.10 support Local Kubeconfig for easier development Oct 6, 2018
@christopherhein
Copy link
Contributor Author

@jbw976 Updated.

@christopherhein christopherhein force-pushed the feature/1-10-support branch 2 times, most recently from 717082e to 8a3160b Compare October 6, 2018 09:26
Copy link
Member

@galexrt galexrt left a comment

Choose a reason for hiding this comment

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

Thanks for updating the PR!

if err != nil {
return nil, nil, fmt.Errorf("failed to get k8s config. %+v", err)
}

clientset, err := kubernetes.NewForConfig(config)
if err != nil {
return nil, nil, fmt.Errorf("failed to get k8s client. %+v", err)
return nil, nil, fmt.Errorf("failed to get kubernetes client. %+v", err)
Copy link
Member

Choose a reason for hiding this comment

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

The other errors generated in this file all have k8s not kubernetes, so it would be good to keep it the same here as it was.

@christopherhein
Copy link
Contributor Author

@galexrt updated 👍

Copy link
Member

@galexrt galexrt left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@galexrt galexrt left a comment

Choose a reason for hiding this comment

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

After the flag has been moved to init(), I'll go ahead and merge.

**Why:**

* makes it so you can pass `-kubeconfig` for a local config

**This change addresses the need by:**

* closes rook#30

Signed-off-by: Christopher Hein <me@christopherhein.com>
@christopherhein
Copy link
Contributor Author

@galexrt @jbw976 all updated.

@galexrt galexrt merged commit 3a90049 into rook:master Oct 7, 2018
@galexrt
Copy link
Member

galexrt commented Oct 7, 2018

@christopherhein Thanks for bearing with me!

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

Successfully merging this pull request may close these issues.

2 participants