Skip to content

[binami/kafka] nodePort field explicitly set to null if not provided in the values #33037

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
alexgenon opened this issue Apr 16, 2025 · 4 comments · May be fixed by #33134
Open

[binami/kafka] nodePort field explicitly set to null if not provided in the values #33037

alexgenon opened this issue Apr 16, 2025 · 4 comments · May be fixed by #33134
Assignees
Labels
kafka stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@alexgenon
Copy link

alexgenon commented Apr 16, 2025

Name and Version

bitnami/kafka 32.2.0

What architecture are you using?

amd64

What steps will reproduce the bug?

  1. Deploy Kafka using the Helm values below, kustomize and ArgoCD
  2. In ArgoCD, you can see in the Desired Manifest for the external service that the nodePort value is set to null.
  3. Sync in ArgoCD
  4. 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.

@alexgenon alexgenon added the tech-issues The user has a technical issue about an application label Apr 16, 2025
@github-actions github-actions bot added the triage Triage is needed label Apr 16, 2025
@carrodher
Copy link
Member

Thank you for bringing this issue to our attention. We appreciate your involvement! If you're interested in contributing a solution, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here.

Your contribution will greatly benefit the community. Feel free to reach out if you have any questions or need assistance.

alexgenon added a commit to alexgenon/charts that referenced this issue Apr 23, 2025
…in the values

Fixes bitnami#33037

Signed-off-by: Alexandre Genon <alexgenon@users.noreply.github.com>
@alexgenon
Copy link
Author

Thank you @carrodher, I created #33134.
I hope I did not miss anything (that's my first PR on a Helm charts git repo)!

@carrodher
Copy link
Member

Thank you for opening this issue and submitting the associated Pull Request. Our team will review and provide feedback. Once the PR is merged, the issue will automatically close.

Your contribution is greatly appreciated!

alexgenon added a commit to alexgenon/charts that referenced this issue May 8, 2025
Fixes bitnami#33037

Signed-off-by: Alexandre Genon <alexgenon@users.noreply.github.com>
Copy link

github-actions bot commented May 9, 2025

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

@github-actions github-actions bot added the stale 15 days without activity label May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kafka stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants