-
Notifications
You must be signed in to change notification settings - Fork 303
Description
/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:
cluster-api-provider-vsphere/templates/cluster-template.yaml
Lines 815 to 817 in 7cc3899
| - containerPort: 2112 | |
| name: prometheus | |
| protocol: TCP |
cluster-api-provider-vsphere/templates/cluster-template.yaml
Lines 861 to 864 in 7cc3899
| 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