-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Support merging of config files and KUBECONFIG #66
Conversation
When writing the kubeconfig for the new EKS cluster then the following will happen: - If --kubeconfig, --auto-kubeconfig or KUBECONFING env var are NOT set then the default kube config location will be used (~/.kube/conf). - If KUBECONFIG is set then we use this (assuming --kubeconfig and --auto-kubeconfig aren't specified). - if KUBECONFIG is set BUT --kubeconfig or --auto-kubeconfig are specified then KUBECONFIG will be ignored. - if a kubeconfig file already exists then we merge in the new EKS cluster details with the existing file. - If `set-context` is true then the current-context will be set to that of the new EKS cluster. - If `set-context` is false (default) then if we are merging with an existing configuration file with a current-context set then this won't be updated. - If there is no existing configuration file then current-context will be set even if `set-context` is false. Issue eksctl-io#29
Errors on further testing, closing. |
@richardcase did you have any chance to resolve the issues? I'd love to get this in before beta.1 (aiming to cut it before end of the week or early next week), otherwise we might need to leave this until after 0.1.0. |
@errordeveloper The merging of the config file and looking at the KUBECONFIG file all works. But when i was testing it i've discovered an issue with |
@richardcase ah, I see, that sounds like a bug and doesn't surprise me, as authenticator creates a separate client. I previously use |
@errordeveloper - sounds like a plan. I have a few changes that i need to include in this. I'll get them committed and pushed. |
Great, thanks!
…On Tue, 19 Jun 2018, 8:51 am Richard Case, ***@***.***> wrote:
@errordeveloper <https://github.com/errordeveloper> - sounds like a plan.
I have a few changes that i need to include in this. I'll get them
committed and pushed.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#66 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAPWS8mtSQIPJ-Xgpp6RbaG6qVkzzKGvks5t-R4agaJpZM4Uq89O>
.
|
A number of changes in relation to the kube configuration file. The setting of current-context defaults to true. Also updated the write-kubeconfig command so that its merges configs as well. Also, when deleting a cluster it will only try and delete an auto-generated config file (otherwise it will warn that you need to do this manually). Issue eksctl-io#29
@errordeveloper - it should be good for testing. |
} | ||
} | ||
|
||
func writeConfig(filename string) error { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
@richardcase I've added some more changes to this, and figured it'll be easier to review as one PR – please see #80. |
When writing the kubeconfig for the new EKS cluster then the following
will happen:
--kubeconfig
,--auto-kubeconfig
orKUBECONFING
env var are NOT setthen the default kube config location will be used (~/.kube/conf).
KUBECONFIG
is set then we use this (assuming--kubeconfig
and--auto-kubeconfig
aren't specified).KUBECONFIG
is set BUT--kubeconfig
or--auto-kubeconfig
arespecified then
KUBECONFIG
will be ignored.cluster details with the existing file.
set-context
is true then thecurrent-context
will be set to thatof the new EKS cluster.
set-context
is true (default) then if we are merging with anexisting configuration file with a
current-context
set then this won'tbe updated.
Issue #29