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.
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.
protocolMapperAgentDefaults.labels
Labels applied to all Kubernetes resources of all agents.
protocolMapperAgentDefaults.annotations
Annotations applied to all Kubernetes resources of all agents.
protocolMapperAgentDefaults.podLabels
Labels applied to all agent Pods only.
protocolMapperAgentDefaults.podAnnotations
Annotations applied to all agent Pods only.
protocolMapperAgentDefaults.service.labels
Labels applied to all agent Services only.
protocolMapperAgentDefaults.service.annotations
Annotations applied to all agent Services only.
protocolMapperAgents[*].labels
Labels applied to all Kubernetes resources of a specific agent.
protocolMapperAgents[*].annotations
Annotations applied to all Kubernetes resources of a specific agent.
protocolMapperAgents[*].podLabels
Labels applied to a specific agent's Pods only.
protocolMapperAgents[*].podAnnotations
Annotations applied to a specific agent's Pods only.
protocolMapperAgents[*].service.labels
Labels applied to a specific agent's Service only.
protocolMapperAgents[*].service.annotations
Annotations applied to a specific agent'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
Use this tab if you deploy the connectware-agent Helm chart on its own. If you deploy it as a subchart of the connectware Helm chart, see the connectware-agent Helm Chart (As Subchart) tab instead.
Configuring Default Labels and Annotations for All Agents
To apply labels and annotations to all agent resources at once, set the values under protocolMapperAgentDefaults.
Example: Shared defaults for all agents
Configuring Labels and Annotations Per Agent
Individual agents can be given labels and annotations in addition to the defaults by setting the values under their own entry in protocolMapperAgents[]. Per-agent values are merged with the defaults: both are applied to the Kubernetes objects.
Example: Adding a per-agent label in addition to shared defaults
In this example, all agents receive the team: shopfloor label and the cost-center annotation. The bending-unit agent additionally receives line: bending, and welding-unit receives line: welding.
Use this tab if you deploy the connectware-agent Helm chart as a subchart of the connectware Helm chart. If you deploy it on its own, see the connectware-agent Helm Chart (Standalone) tab instead.
When deployed as a subchart, all connectware-agent values must be nested under the connectwareAgent section. Agents also inherit global.commonLabels from the parent chart.
Configuring Default Labels and Annotations for All Agents
Example: Deploying agents as part of the connectware Helm chart with shared labels
In this example, all agents receive the environment: production label from global.commonLabels. Additionally, all agents receive the team: shopfloor label and cost-center: 12345 annotation from protocolMapperAgentDefaults.
Configuring Labels and Annotations Per Agent
You can combine agent-level defaults with per-agent label overrides. Set shared values under protocolMapperAgentDefaults, then add agent-specific values in each protocolMapperAgents[] entry.
Example: Shared defaults with per-agent label overrides
In this example, all agents receive the environment: production label from global.commonLabels. Additionally, all agents receive the team: shopfloor label and cost-center: 12345 annotation from protocolMapperAgentDefaults. The bending-robots agent additionally receives line: bending, and welding-robots receives line: welding.
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?

