Skip to content

Duplicate prometheus port in cluster template #3535

@bhampl

Description

@bhampl

/kind bug

What steps did you take and what happened:
I followed the Getting Started documentation in combination with the cluster API operator.

After applying a generated cluster (with the node-ipam flavor) I get the following warning in the capi-controller-manager log:

warning_handler.go:65] "spec.template.spec.containers[4].ports[0]: duplicate port name \"prometheus\" with spec.template.spec.containers[2].ports[1], services and probes that select ports by name will use spec.template.spec.containers[2].ports[1]" logger="KubeAPIWarningLogger"

What did you expect to happen:
There to be no warning and no duplicate prometheus ports definition.

Anything else you would like to add:
The reason for the warning is the duplicate prometheus port definition in the vsphere-csi-controller Deployment located in the csi-manifests ConfigMap of the cluster-template.yaml:

- containerPort: 2112
name: prometheus
protocol: TCP

ports:
- containerPort: 2113
name: prometheus
protocol: TCP

The cluster-template-node-ipam.yaml has the same problem, I haven't checked the other templates.

Environment:

  • Cluster-api-provider-vsphere version: v1.13.0
  • Kubernetes version: (use kubectl version): v1.33.1
  • OS (e.g. from /etc/os-release): Ubuntu 24.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions