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

kops toolbox template does not work in isolated environment. #12447

Closed
guydog28 opened this issue Sep 30, 2021 · 10 comments · Fixed by #12464
Closed

kops toolbox template does not work in isolated environment. #12447

guydog28 opened this issue Sep 30, 2021 · 10 comments · Fixed by #12464
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@guydog28
Copy link
Contributor

guydog28 commented Sep 30, 2021

/kind bug

We have a completely offline (no internet) environment where I am trying to generate a cluster yaml from a kops go template. It will not work because it wants to download the channels from the internet. Am I missing something? Is there a way to specifiy to ignore channels or use a local copy or other intranet hosted copy?

1. What kops version are you running? The command kops version, will display
this information.

1.20.2

2. What Kubernetes version are you running? kubectl version will print the
version if a cluster is running or provide the Kubernetes version specified as
a kops flag.

N/A

3. What cloud provider are you using?

N/A

4. What commands did you run? What is the simplest way to reproduce this issue?

kops toolbox template --values values.yaml --template templates_folder --output output.yaml --fail-on-missing=false

5. What happened after the commands executed?

failed because it could not contact internet to download the channels file

6. What did you expect to happen?

it to work offline as expected and generate my cluster yaml.

7. Please provide your cluster manifest. Execute
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

8. Please run the commands with most verbose logging by adding the -v 10 flag.
Paste the logs into this report, or in a gist and provide the gist link here.

N/A

9. Anything else do we need to know?

We can't upgrade to 1.21.0 if it happens to be fixed in that version due to #12184

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Sep 30, 2021
@olemarkus
Copy link
Member

You can point to a local channel file using --channel file://...

@guydog28
Copy link
Contributor Author

guydog28 commented Oct 1, 2021

I tried that first. It seemed like it ignored it.

@guydog28
Copy link
Contributor Author

guydog28 commented Oct 1, 2021

Looks like it is in fact ignored in 1.20. default is loaded without checking options in release-1.20 branch, and fixed in master/v1.22.0-alpha.2 and v1.23.0-alpha.1 with commit 69b0117. So I guess this is fixed but not anywhere I can use it.

1.20:

channelLocation = kopsapi.DefaultChannel

master:

channel, err := kopsapi.LoadChannel(options.channel)

@johngmyers
Copy link
Member

There is also the channel none

@guydog28
Copy link
Contributor Author

guydog28 commented Oct 2, 2021

@johngmyers which would be great if it was reading the value! lol

@olemarkus
Copy link
Member

Most likely 1.22 will be the next release so the fastest way to get the bugfix is to wait for that release.

@hakman
Copy link
Member

hakman commented Oct 2, 2021

I think #12464 should be a quick fix at least for 1.21.
There will be another 1.21 release but not sure about 1.20.
@guydog28 Any special reason you are using such old version of kOps?

@guydog28
Copy link
Contributor Author

guydog28 commented Oct 2, 2021

@hakman im stuck on 1.20 due to #12184

@hakman
Copy link
Member

hakman commented Oct 9, 2021

@hakman hakman closed this as completed Oct 9, 2021
@guydog28
Copy link
Contributor Author

Fantastic, thanks @hakman!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants