Skip to content

helm: clustermesh-apiserver service don't support custom labels #39488

@camrossi

Description

@camrossi

Is there an existing issue for this?

  • I have searched the existing issues

Version

equal or higher than v1.16.9 and lower than v1.17.0

What happened?

I have 2 OpenShift clusters running in Service Mesh and I am using BGP Control Plane (BGPv2) feature set to advertise my service and POD IPs.

My ClusterMesh API addresses are advertised via BGP and this is done by labeling the service. https://docs.cilium.io/en/stable/network/bgp-control-plane/bgp-control-plane-v2/#service-virtual-ips

Unfortunately the helm chart does not support adding custom labels to the clustermesh-apiserver service:

extract from cilium/templates/clustermesh-apiserver/service.yaml

{{- if (or .Values.externalWorkloads.enabled  .Values.clustermesh.useAPIServer) }}
apiVersion: v1
kind: Service
metadata:
  name: clustermesh-apiserver
  namespace: {{ .Release.Namespace }}
  labels:
    k8s-app: clustermesh-apiserver
    app.kubernetes.io/part-of: cilium
    app.kubernetes.io/name: clustermesh-apiserver
  {{- if or .Values.clustermesh.apiserver.service.annotations .Values.clustermesh.annotations }}
  annotations:
    {{- with .Values.clustermesh.annotations }}
      {{- toYaml . | nindent 4 }}
    {{- end }}
    {{- with .Values.clustermesh.apiserver.service.annotations }}
      {{- toYaml . | nindent 4 }}
    {{- end }}
  {{- end }}

I can work around this by manually lableling the service but this does not survive a helm upgrade.

I also check the helm chart for 1.17 and 1.18 and they have added this

  labels:
    k8s-app: clustermesh-apiserver
    app.kubernetes.io/part-of: cilium
    app.kubernetes.io/name: clustermesh-apiserver
    {{- with .Values.commonLabels }}
    {{- toYaml . | nindent 4 }}
    {{- end }}

but I do not think the commonLabels are adequate for this.

How can we reproduce the issue?

See above.

Cilium Version

oc exec -it cilium-2mt9w -- cilium version
Client: 1.16.8-cee.4 7081b498 2025-03-27T17:02:58+00:00 go version go1.23.7 linux/amd64
Daemon: 1.16.8-cee.4 7081b498 2025-03-27T17:02:58+00:00 go version go1.23.7 linux/amd64

Kernel Version

Linux ccm-f1c1-m1 5.14.0-427.61.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Mar 14 15:21:35 EDT 2025 x86_64 x86_64 x86_64 GNU/Linux

Kubernetes Version

oc version
Client Version: 4.17.11
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: 4.18.6
Kubernetes Version: v1.31.6

Regression

No response

Sysdump

No response

Relevant log output

Anything else?

No response

Cilium Users Document

  • Are you a user of Cilium? Please add yourself to the Users doc

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/agentCilium agent related.area/bgpImpacts the Border Gateway Protocol feature.area/clustermeshRelates to multi-cluster routing functionality in Cilium.kind/bugThis is a bug in the Cilium logic.kind/community-reportThis was reported by a user in the Cilium community, eg via Slack.kind/featureThis introduces new functionality.needs/triageThis issue requires triaging to establish severity and next steps.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions