-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
kops toolbox template: ignores config file for clusterName in templates #5454
Comments
Possible duplicate of #5015 |
similar, If I remember correctly it died with no ~/.kube/conf file. Related issue: are there any other magic variables in the code base? when making templates I really do not want it reading ~/.kube/conf for anything. |
I wonder if there are any other magic variables floating around. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle rotten |
It looks like this is the line in question: kops/cmd/kops/toolbox_template.go Line 114 in ed8e81c
If this was guarded with a conditional that checked whether it was already defined in the context, then you should be able to define it in a value and kops would no longer rely on the kubeconfig file. |
@rifelpet thanks for looking into it |
same issue with Version 1.11.0 (git-2c2042465) |
Any update on this? It seems to render the template function unusable without a kubecfg. I was hoping to use this feature in a CI pipeline. |
@2tim I do not think you need a kubeconfig, you just need to have a config varable not called "clusterName" ( "myClusterName" works fine) that you call from the template to insert the cluster name in the yaml file. kops will still put out a message though, if I remember correctly. |
Thanks for the tip. That was the first thing I tried due to the example.
That not working, and the log message certainly don’t make me trust it but
I will keep at it.
…On Thu, Mar 21, 2019 at 8:58 PM Marc Spitzer ***@***.***> wrote:
@2tim <https://github.com/2tim> I do not think you need a kubeconfig, you
just need to have a config varable not called "clusterName" (
"myClusterName" works fine) that you call from the template to insert the
cluster name in the yaml file. kops will still put out a message though, if
I remember correctly.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5454 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AE73vvVi2ribgTzaEwZaYArIbNweRQh6ks5vZDjNgaJpZM4VUXmo>
.
|
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle rotten |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
------------- BUG REPORT TEMPLATE --------------------
kops
version are you running? The commandkops version
, will displaythis information.
Version 1.10.0-alpha.1
What Kubernetes version are you running?
kubectl version
will print theversion if a cluster is running or provide the Kubernetes version specified as
a
kops
flag.v1.10.5
What cloud provider are you using?
AWS
What commands did you run? What is the simplest way to reproduce this issue?
kops toolbox template --values=test.yml --template=template.yml --format-yaml
with no ~/.kube/config
I did not have a kube config file with multple clusters in it so I can not test for that behavior
Template generation should use the config file, pulling things out of kube config can lead to nasty suprises
kops get --name my.example.com -o yaml
to display your cluster manifest.You may want to remove your cluster name and other sensitive information.
N/A
-v 10
flag.Paste the logs into this report, or in a gist and provide the gist link here.
N/A
Workaround is just uses a different string for key
The text was updated successfully, but these errors were encountered: