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

Error on install docker-registry to custom namespace #821

Open
janfrederik opened this issue Dec 12, 2022 · 5 comments
Open

Error on install docker-registry to custom namespace #821

janfrederik opened this issue Dec 12, 2022 · 5 comments

Comments

@janfrederik
Copy link

janfrederik commented Dec 12, 2022

Error message when installing docker-registry to a specific namespace, using ark install docker-registry -n myregistry.

Expected Behaviour

The docker registry should be installed in the namespace myregistry.

Current Behaviour

Error message:

Error: to override the "default", install via tiller

Install without specifying a namespace works like a charm.

Are you a GitHub Sponsor yet (Yes/No?)

No

Steps to Reproduce (for bugs)

ark get k3s
ark install ingress-nginx -n ingress-nginx
ark install docker-registry -n myregistry

Context

Your Environment

  • What Kubernetes distribution are you using?
Client Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.4", GitCommit:"872a965c6c6526caa949f0c6ac028ef7aff3fb78", GitTreeState:"clean", BuildDate:"2022-11-09T13:36:36Z", GoVersion:"go1.19.3", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.7
Server Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.8+k3s1", GitCommit:"648004e4faeaf9e8705386342e95ec9bd211c2b8", GitTreeState:"clean", BuildDate:"2022-11-18T18:29:47Z", GoVersion:"go1.18.8", Compiler:"gc", Platform:"linux/amd64"}
  • Operating System and version (e.g. Linux, Windows, MacOS):

Windows 11 22H2 10.0.22621.

Running: WSL2 "Ubuntu 22.04.1 LTS", with Docker Desktop v4.14.1.

Linux 5.15.79.1-microsoft-standard-WSL2 #1 SMP Wed Nov 23 01:01:46 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
  • What arkade version is this?
Version: 0.8.50
Git Commit: 238a5fc390147e6658bd8d1562f257dfedf88f43
@janfrederik janfrederik changed the title Install docker-registry in custom namespace doesn't work Error on install docker-registry to custom namespace Dec 12, 2022
@rgee0
Copy link
Contributor

rgee0 commented Dec 19, 2022

Seems to be by design currently:

namespace, _ := command.Flags().GetString("namespace")
if namespace != "default" {
return fmt.Errorf(`to override the "default", install via tiller`)
}

@janfrederik
Copy link
Author

janfrederik commented Dec 20, 2022

Seems to be by design currently

I see.
But why?
Would be logic to be able to install to a different namespace.

@alexellis
Copy link
Owner

@janfrederik are you willing to send a PR and test it?

@janfrederik
Copy link
Author

are you willing to send a PR and test it?
@alexellis Alas, I have no knowledge of Go and no experience with building and testing arkade. I could make a PR leaving out the lines 59-61 that @rgee0 quoted above, but that's all.

@alexellis
Copy link
Owner

I have an eBook on Go that you may find useful, if you want to do the PR, send me an email to [email protected] for a 50% discount on the premium edition.

You need to clone the code
Change the lines
Run go build
Then test the new arkade binary that was created with a different namespace

Following that, create a fork, sync your changes and send a PR up.

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

No branches or pull requests

3 participants