Managing License Service metadata

You can add labels and annotations to the ibm-licensing-operator resources automatically with the spec.labels and spec.annotations parameters.

Labels and annotations

4.2.5 Adding annotations is available from License Service version 4.2.5.

To add labels or annotations to the ibm-licensing-operator resources, such as pods, add the spec.labels or spec.annotations parameters with the key and value pairs in the custom resource YAML file.

Table 1. Description of the spec.labels and spec.annotations parameters
Parameter Type Description
spec.labels object The spec.labels parameter is used to add labels to the ibm-licensing-operator resources automatically.
4.2.5 spec.annotations object The spec.annotations parameter is used to add annotations to the ibm-licensing-operator resources automatically.

The following is an excerpt of an example custom resource with spec.labels and spec.annotations parameters provided:

spec:
  labels:
    appName: LicenseService
  annotations:
    companyName: IBM

Note: You can only add or update labels and annotations via the spec.labels and spec.annotations parameters. The existing values are not automatically removed from the operator-managed resources when you remove them from the parameters.