yr.InvokeOptions.pod_labels

yr.InvokeOptions.pod_labels#

InvokeOptions.pod_labels: Dict[str, str]#

Pod labels only used in Kubernetes environment. When creating a function instance, pod_labels can accept key-value pairs from the user and pass them to the function system.

  • After the ActorPattern function instance specialization is completed (Running), the Scaler applies the incoming labels to the POD.

  • When an ActorPattern function instance fails or is deleted, the Scaler sets the corresponding label of the POD to empty (Remove it);

  • Constraints:
    • The number of labels that can be stored in pod_labels cannot exceed 5.

    • Constraints on the key and value in pod_labels:
      • key:Supports uppercase and lowercase letters, numbers, and hyphens, and allows a length of 1-63.

        Does not start or end with a hyphen. Empty strings are not allowed.

      • value:Supports uppercase and lowercase letters, numbers, and hyphens, with a length of 1-63.

        Does not start or end with a hyphen. Allows empty strings.

  • Raises:

    When the pod_labels passed by the user does not meet the constraints, the corresponding exception and error message will be thrown.