Closed as not planned
Closed as not planned
Description
Name and Version
bitnami/kafka 32.2.0
What architecture are you using?
amd64
What steps will reproduce the bug?
- Deploy Kafka using the Helm values below, kustomize and ArgoCD
- In ArgoCD, you can see in the Desired Manifest for the external service that the nodePort value is set to null.
- Sync in ArgoCD
- The external service is marked as out of sync in ArgoCD since a NodePort has been allocated to it.
Are you using any custom parameters or values?
sasl:
client:
users:
- kafka
existingSecret: kafka-credentials
controller:
automountServiceAccountToken: true # required by LB auto-discovery
heapOpts: -Xmx512m -Xms512m
replicaCount: 1
externalAccess:
enabled: true
defaultInitContainers:
autoDiscovery:
enabled: true
rbac: # required by LB auto-discovery
create: true
What is the expected behavior?
If the externalAccess.broker.service.nodePorts
field is not specified in the values file, it should not be set in the inflated manifest
What do you see instead?
Field /spec/ports/*/nodePort
in external service is set to null, causing ArgoCD to flag the service as out of sync.
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/component: kafka
app.kubernetes.io/instance: kafka
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: kafka
app.kubernetes.io/version: 4.0.0
helm.sh/chart: kafka-32.2.0
pod: kafka-controller-0
name: kafka-controller-0-external
namespace: monitoring
spec:
allocateLoadBalancerNodePorts: true
ports:
- name: tcp-kafka
nodePort: null
port: 9094
targetPort: external
publishNotReadyAddresses: false
selector:
app.kubernetes.io/component: controller-eligible
app.kubernetes.io/instance: kafka
app.kubernetes.io/name: kafka
app.kubernetes.io/part-of: kafka
statefulset.kubernetes.io/pod-name: kafka-controller-0
type: LoadBalancer
Additional information
Using the values below, Helm will create a service of type LoadBalancer
using the template svc-external-access.yaml.
This template will use the values of externalAccess.broker.service.nodePorts
to set the nodePort values in /spec/ports/*/nodePort
.
But if this array is not set, then it explicitly sets the nodePort
field to null. See svc-external-access.yaml#L50-L53.