0

How to update the configuration of an existing OpenFaas cluster like

--set faasIdler.dryRun=true/false

While creating the cluster we can specify the configuration. But how to update the existing configuration using Arkade.

dassum
  • 4,727
  • 2
  • 25
  • 38

1 Answers1

0

you can rerun arkade install again with new parameters and it will upgrade. If you want to test in a safe space, use ark get kind, and then use kind to build a test cluster on your local. That's what I did to get the output (below).

Background: Under the hood arkade uses Helm to manage applications installed into kubernetes clusters, and Helm can do in place upgrades.

Below is an example

Before, with 1 gateway replica:

kubectl get pods -n openfaas
NAMESPACE            NAME                                         READY   STATUS    RESTARTS   AGE
openfaas             alertmanager-697bb8b556-8mtt7                1/1     Running   0          2m41s
openfaas             basic-auth-plugin-858495b9c6-jnr2m           1/1     Running   0          2m41s
openfaas             gateway-755d7f49fb-8q987                     2/2     Running   0          2m41s
openfaas             nats-cdc589ff7-7l8x8                         1/1     Running   0          2m41s
openfaas             prometheus-666d8674bb-958td                  1/1     Running   0          2m41s
openfaas             queue-worker-79876dbdc4-hpxg6                1/1     Running   0          2m41s

Upgrading to 2 gateway replicas:

ark install openfaas --max-inflight=5 --set gateway.replicas=2

The output for arkade install will show you the actual Helm command used. In this case helm upgrade --install, which will install if the app doesn't exist, and upgrade if it does:

VALUES values.yaml
Command: /home/kylos/.arkade/bin/helm [upgrade --install openfaas openfaas/openfaas --namespace openfaas --values /tmp/charts/openfaas/values.yaml --set clusterRole=false --set operator.create=false --set openfaasImagePullPolicy=IfNotPresent --set faasnetes.imagePullPolicy=Always --set basicAuthPlugin.replicas=1 --set queueWorker.replicas=1 --set serviceType=NodePort --set gateway.directFunctions=true --set gateway.replicas=2 --set ingressOperator.create=false --set queueWorker.maxInflight=5 --set basic_auth=true]
Release "openfaas" has been upgraded. Happy Helming!

Here you'll see two gateway pods:

kubectl get pods -n openfaas
NAME                                 READY   STATUS    RESTARTS   AGE
alertmanager-697bb8b556-8mtt7        1/1     Running   0          7m41s
basic-auth-plugin-858495b9c6-jnr2m   1/1     Running   0          7m41s
gateway-755d7f49fb-8q987             2/2     Running   0          7m41s
gateway-755d7f49fb-vw8z8             2/2     Running   0          4m39s
nats-cdc589ff7-7l8x8                 1/1     Running   0          7m41s
prometheus-666d8674bb-958td          1/1     Running   0          7m41s
queue-worker-79876dbdc4-hpxg6        1/1     Running   0          7m41s
Kyle
  • 199
  • 1
  • 3