Last modified November 27, 2024

Kubernetes resource labels reference

Notice: Labels on Kubernetes resources are set by many different parties, and for various reasons. In this overview we explain our reasons for using a relevant set of labels, and which values or value format is expected. If you are missing information, please consult upstream documentation from Kubernetes etc., or ask a Giant Swarm contact for more information.

As an additional source, our Go library k8smetadata contains a list of labels and annotations that we use in our Go code.

Common Kubernetes labels are explained on the upstream documentation page Well-Known Labels, Annotations and Taints.

app.giantswarm.io/kind

Set on ConfigMap and Secret resources in management clusters for Grafana, to indicate how to use the according resource.

app-operator.giantswarm.io/version

Labels in the form OPERATOR_NAME.giantswarm.io/version are used to specify the operator that should reconcile the resource, including the specific version.

If the operator name is app-operator, the label is app-operator.giantswarm.io/version. The value of the label is a Semantic Versioning (SemVer) version number. The special value 0.0.0 means that the resource is handled by the “unique” operator, which is an instance of the operator deployed to the giantswarm namespace of the cluster.

More information: Source

app-operator.giantswarm.io/watching

The label of the format OPERATOR_NAME.giantswarm.io/watching is used on ConfigMap and Secret resources to enable the operator to watch the resource. The operator name is the name of the operator that should watch the resource. If the operator name is app-operator, the label is app-operator.giantswarm.io/watching. The value of the label must be true.

More information: Source

application.giantswarm.io/branch

Name of the branch of the source repository providing the app/chart the resource is part of. In production applications built from the default branch, the value is expected to be HEAD.

application.giantswarm.io/catalog

Used on AppCatalogEntry resources, to indicate which catalog it’s associated with. The value is the name of the Catalog resource.

application.giantswarm.io/commit

The commit SHA representing the state of the source repository providing the app/chart the resource is part of. The value is expected to be 40 characters long.

application.giantswarm.io/catalog-type

Used on Catalog resources and on AppCatalogEntry resources to indicate the type of source for this catalog or app. Value is either stable, test, or community.

More information: Source

application.giantswarm.io/catalog-visibility

Used on Catalog resources to indicate the target audience of the catalog. Value is public (deployed to default namespace) or internal (deployed to giantswarm namespace).

More information: Source

application.giantswarm.io/team

Name of the Giant Swarm team responsible for the application.

chart-operator.giantswarm.io/version

Labels in the form OPERATOR_NAME.giantswarm.io/version are used to specify the operator that should reconcile the resource, including the specific version.

If the operator name is chart-operator, the label is chart-operator.giantswarm.io/version. The value of the label is a SemVer version number. The special value 0.0.0 means that the resource is handled by the “unique” operator, which is an instance of the operator deployed to the giantswarm namespace of the cluster.

More information: Source

cluster-apps-operator.giantswarm.io/watching

The label of the format OPERATOR_NAME.giantswarm.io/watching is used on resources to enable the operator to watch the resource. The operator name is the name of the operator that should watch the resource. If the operator name is cluster-apps-operator, the label is cluster-apps-operator.giantswarm.io/watching. The value of the label must be true.

More information: Source

giantswarm.io/aws-ebs-limit

This label is set on EBS CSI driver pods (on AWS) by aws-ebs-csi-volume-limiter. It informs about the maximum number of EBS volumes that can be attached to the respective node.

giantswarm.io/cluster

Used on a variety of resources to associate the resource with a specific cluster. The value is the name of the cluster.

giantswarm.io/logging

With this label on the Cluster resource, logging via Loki can be disabled. The default value true means that logging is enabled. Setting it to false disables logging for the entire cluster.

giantswarm.io/machine-pool

Associates the resource or the node with a node pool, using the name of the node pool as the value.

giantswarm.io/managed-by

Defines which operator is in charge of the resource. Common examples:

  • rbac-operator on RBAC resources indicates that the operator created these and will reconcile/delete them.
  • flux on an app resource indicates that Flux reconciles the application.
  • A bundle name on an App resource indicates that a bundle has installed the App.

giantswarm.io/monitoring

This label set on the Cluster resource with the value false can be used to disable the gathering of Prometheus metrics for the entire cluster, and id prevents deployment of Prometheus for this cluster.

On other resources, the label serves as a discovery mechanism for metrics scraping. We’re replacing this mechanism by service monitors.

giantswarm.io/organization

An organization is a key concept in the Giant Swarm platform, used to isolate tenants. This label is used on a variety of resources to associate them with one organization. The value is the name of the organization.

giantswarm.io/prevent-deletion

Can be set on certain resource types to prevent deletion. See Prevent accidental deletion of resources.

giantswarm.io/service-type

Description pending

giantswarm.io/service-priority

Used on cluster-related resources to indicate the service priority, which means the relative importance in general, of the cluster.

policy.giantswarm.io/resource-kind

Description pending

policy.giantswarm.io/resource-name

Description pending

policy.giantswarm.io/resource-namespace

Description pending

ui.giantswarm.io/display

Affects whether or not a resource is intended for display in a user interface like the Giant Swarm web UI. For example, it can be used to hide irrelevant RBAC system roles from users. The value can either be "true" (to display a resource) or "false" (for hiding it). The default behavior depends on the context.

More information: Source

This part of our documentation refers to our vintage product. The content may be not valid anymore for our current product. Please check our new documentation hub for the latest state of our docs.