Skip to content

Commit

Permalink
Add support for arm and arm64 in ingress-nginx app
Browse files Browse the repository at this point in the history
Signed-off-by: Manuel Alejandro de Brito Fontes <[email protected]>
  • Loading branch information
aledbf authored and alexellis committed Nov 21, 2019
1 parent 2399600 commit d9ce991
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ k3sup app install inlets-operator
# ARM will be available in 0.12.0
k3sup app install cert-manager

# nginx - install the Nginx IngressController, PC only
# nginx - install the Nginx IngressController
k3sup app install nginx-ingress
```

Expand Down
12 changes: 12 additions & 0 deletions pkg/cmd/nginx_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@ func makeInstallNginx() *cobra.Command {

overrides["defaultBackend.enabled"] = "false"

arch := getArchitecture()
fmt.Printf("Node architecture: %q\n", arch)

switch arch {
case "amd64":
// use default image
case "arm", "arm64":
overrides["controller.image.repository"] = fmt.Sprintf("quay.io/kubernetes-ingress-controller/nginx-ingress-controller-%v", arch)
default:
return fmt.Errorf("architecture %v is not supported by ingress-nginx", arch)
}

hostMode, flagErr := command.Flags().GetBool("host-mode")
if flagErr != nil {
return flagErr
Expand Down

0 comments on commit d9ce991

Please sign in to comment.