openfaas / ofc-bootstrap

Bootstrap OpenFaaS Cloud for your team
https://docs.openfaas.com/openfaas-cloud/intro/
MIT License
179 stars 61 forks source link

Migrate to arkade for CLIs and dependent apps #244

Closed alexellis closed 3 years ago

alexellis commented 3 years ago

Signed-off-by: Alex Ellis (OpenFaaS Ltd) alexellis2@gmail.com

Description

Migrate to arkade for CLIs and dependent apps

Migrates to arkade for checking environment, installing CLIs, and for apps (helm charts). This reduces ongoing maintenance and moves any options required into arkade.

As such, some names may change to defaults such as the name used for Minio and SealedSecrets.

How Has This Been Tested?

Tested without TLS or auth, a function built and was deployed on my computer with k3d.

alexellis commented 3 years ago

@Waterdrips / @wilsonianb PTAL

alexellis commented 3 years ago

Minio is incorrectly configured due to the app creating its own secrets and the apply command wanting to create its own ones too. A build and deployment works, but there are no logs stored.

alexellis commented 3 years ago

I've fixed the issue for Minio and restored the early namespace pre-creation step.

alexellis commented 3 years ago

@wilsonianb Are you logging into your k3s node and running ofc-bootstrap on it directly?

arkade (and therefore ofc-bootstrap) shouldn't be run as root. It's not supposed to be run on the computer hosting your Kubernetes cluster, but from your laptop or client machine. k3sup for instance fetches the kubeconfig file from a remote host after installing k3s, changing the permissions in the process.

I tested with k3d, so that's a similar client/server configuration.

alexellis commented 3 years ago

Tested with OAuth, Minio and @Waterdrips covered cert-manager

wilsonianb commented 3 years ago

Are you logging into your k3s node and running ofc-bootstrap on it directly?

Yep, as root...

Trying again locally, I ran into a similar error, which I believe is due to https://github.com/alexellis/arkade/pull/258/files#r544694671

ofc-bootstrap apply ran successfully after I moved my kubeconfig to $HOME/.kube/config