For the complete documentation index, see llms.txt. This page is also available as Markdown.

Adding Labels and Annotations

Configure custom Kubernetes labels and annotations on Connectware and Connectware agent resources using global and per-component Helm values.

Labels and annotations let you attach metadata to Kubernetes objects managed by the Connectware Helm charts. Use labels to select and organize resources. Use annotations to carry non-identifying metadata for external tooling such as monitoring systems, cost management platforms, and policy engines.

When to Use Labels and Annotations

Use labels and annotations when you need to:

  • Apply organizational tagging policies, such as team ownership, environment, or cost center, across Connectware resources.

  • Integrate with external tools that select resources by label, such as Prometheus, Datadog, or Kubernetes network policies.

  • Add annotations required by cloud provider load balancers or ingress controllers on Service resources.

Configuration Values

The following Helm values control labels and annotations for each chart.

Value
Description

global.commonLabels

Labels applied to all Kubernetes resources created by this Helm chart.

${COMPONENT_NAME}.labels

Labels applied to the component's resources such as Deployment, StatefulSet, Pods, and Services.

${COMPONENT_NAME}.annotations

Annotations applied to the component's resources such as Deployment, StatefulSet, Pods, and Services.

${COMPONENT_NAME}.podLabels

Labels applied to the component's Pods only.

${COMPONENT_NAME}.podAnnotations

Annotations applied to the component's Pods only.

${COMPONENT_NAME}.service.labels

Labels applied to the component's Service only.

${COMPONENT_NAME}.service.annotations

Annotations applied to the component's Service only.

How values are merged

Labels and annotations are merged, not overridden. If you supply both global.commonLabels and ${COMPONENT_NAME}.labels, the resulting labels and annotations on the Kubernetes object are the union of both sets.

Configuring Labels and Annotations

The following tabs show how to configure labels and annotations. Pick the tab that matches your deployment.

Applying Labels to All Connectware Resources

To apply labels to every Kubernetes resource managed by the connectware Helm chart, use global.commonLabels.

Example: Applying common labels to all resources

All Deployments, StatefulSets, Pods, Services, ConfigMaps, Secrets, and other objects created by the Helm chart receive these labels.

Configuring Labels and Annotations Per Component

Individual components can be given labels and annotations independently by setting the values under their own configuration section. Use podLabels, podAnnotations, service.labels, and service.annotations to target a specific resource type within a component.

All Connectware components support these values.

Example: Adding labels and annotations to a specific component

In this example, the broker StatefulSet, its Pods, and its Services all receive the team: platform label and the cost-center annotation. The broker-pod-label label is added to Pods only, and the broker-service-label label is added to the Service only.

Combining Global Common Labels with Per-Component Values

You can use global.commonLabels and component-level values together. Both sets of labels and annotations are added to the relevant Kubernetes objects — neither overrides the other.

Example: Global common labels combined with per-component labels and annotations

Applying Configuration Changes

After editing your values.yaml file, apply the changes by running the helm upgrade command. For details, see Applying Helm Configuration Changes.

Last updated

Was this helpful?