Label CRD¶
A Label custom resource manages Harbor labels via /api/v2.0/labels.
Labels can be global or project-scoped.
Quick Start¶
apiVersion: harbor.harbor-operator.io/v1alpha1
kind: Label
metadata:
name: team-blue
spec:
harborConnectionRef:
name: my-harbor
kind: HarborConnection
color: "#3366ff"
scope: g
Key Fields¶
-
spec.scope (string, optional)
gfor global labels orpfor project labels. When omitted, it defaults topifprojectRefis set andgotherwise. -
spec.projectRef (object, optional) Required when using
scope: p. -
metadata.name (string, required) The Harbor label name managed by this CR.
-
spec.creationPolicy (string, optional) Controls whether the label is created, adopted, or either. When omitted, uses the operator's default creation policy (
Createunless configured otherwise).
Common Fields¶
Label embeds HarborSpecBase. See Common Spec Fields
for the shared connection, deletion, and reconciliation controls, or jump to the
generated HarborSpecBase reference.
Behavior¶
-
Create / Update Creates or updates the label in Harbor.
-
Delete Deletes the label in Harbor when the CR is deleted.