arkade icon indicating copy to clipboard operation
arkade copied to clipboard

Error on install docker-registry to custom namespace

Open janfrederik opened this issue 2 years ago • 5 comments

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 avatar Dec 12 '22 11:12 janfrederik

Seems to be by design currently: https://github.com/alexellis/arkade/blob/405b09a74d502385f95d0b7ab666d649ca2fa179/cmd/apps/registry_app.go#L58-L61

rgee0 avatar Dec 19 '22 08:12 rgee0

Seems to be by design currently

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

janfrederik avatar Dec 20 '22 08:12 janfrederik

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

alexellis avatar Jan 18 '23 16:01 alexellis

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.

janfrederik avatar Jan 31 '23 15:01 janfrederik

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.

alexellis avatar Feb 01 '23 09:02 alexellis