I have a k8s cluster on which I have installed openfaas in the following way:
helm repo add openfaas https://openfaas.github.io/faas-netes/
helm repo update
kubectl apply -f https://raw.githubusercontent.com/openfaas/faas-netes/master/namespaces.yml
helm upgrade openfaas --install openfaas/openfaas \
--namespace openfaas \
--set generateBasicAuth=true \
--set serviceType=LoadBalancer \
--set clusterRole=true \
--set functionNamespace=openfaas-fn
Now, I have the following stack.yml
:
version: 1.0
provider:
name: openfaas
gateway: http://localhost:31112
functions:
my-function:
lang: csharp
handler: ./MyFunction
image: my-function:my-tag
labels:
com.openfaas.scale.min: 1
com.openfaas.scale.max: 1
com.openfaas.scale.factor: 0
The deployed function is then decorated with the above mentioned labels, which I found in the openfaas documentation. However, if I look at the replica set controlling the function's pod, I see it is adorned with the following annotation:
deployment.kubernetes.io/max-replicas=2
What is the effect of this latter annotation on the function's replica set over the actual function's scaling? What would happen if I set
com.openfaas.scale.max: 3
as my function's label?
I would like to make sure to really have control over my function's horizontal scaling. How should I proceed?