Describe the bug
I am operating on an Azure AKS cluster, where fluxcd with the helm-operator is working properly. I am trying to configure the nginx-ingress chart via the fluxcd CDR HelmRelease. Specifically to tell nginx-ingress to use an already created static public IP. To make this work one needs to set the controller.service.loadBalancerIP property as well as defining a special annotation.
However, it seems both properties are completely ignored.
What leads me to believe the issue lies within the helm-operator (or within the HelmRelease config ) is that when issuing the following helm 3 command it works without any problems:
helm upgrade nginx-ingress --install --wait --namespace nginx-ingress \
--set controller.service.loadBalancerIP="12.234.162.41" \
--set controller.service.annotations."service\.beta\.kubernetes\.io/azure-load-balancer-resource-group"="name-of-resource-group" \
stable/nginx-ingress
To Reproduce
Steps to reproduce the behaviour:
helm upgrade helm-operator --install --force --wait \
--set helm.versions='v3' \
--namespace "$NS_FLUX" \
fluxcd/helm-operator
Following HelmRelease poses the problem. The nginx-ingress is installed. However the properties under values seem to be completely ignored.
apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
name: helm-nginx-ingress
namespace: nginx-ingress
spec:
releaseName: nginx-ingress
targetNamespace: nginx-ingress
chart:
repository: https://kubernetes-charts.storage.googleapis.com/
name: nginx-ingress
version: 1.24.4
values:
controller.service:
loadBalancerIP: "12.234.162.41"
annotations:
service.beta.kubernetes.io/azure-load-balancer-resource-group: "name-of-resource-group"
Expected behavior
The nginx-ingress release should be deployed and the chart values configured should be applied.
The result should be exactly the same as when using the above mentioned helm command.
Additional context
The operator does not work with flattened values, try:
...
values:
controller:
service:
loadBalancerIP:
This is it. Thanks a lot. Would be nice if this could be specifically noted somewhere in the docs.
After all, one is not used to the fact that flattened values are not supported while working with yaml definitions.
For other users having the same problem, my final and working HelmRelease looked as follow. The important part is not flattening values.controller.service.loadBalancerIP.
apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
name: helm-nginx-ingress
namespace: nginx-ingress
spec:
releaseName: nginx-ingress
targetNamespace: nginx-ingress
chart:
repository: https://kubernetes-charts.storage.googleapis.com/
name: nginx-ingress
version: 1.24.4
values:
controller:
service:
loadBalancerIP: "12.234.162.41"
annotations:
service.beta.kubernetes.io/azure-load-balancer-resource-group: "name-of-resource-group"
Most helpful comment
The operator does not work with flattened values, try: