V1PolyaxonNotifier

polyaxon.auxiliaries.notifier.V1PolyaxonNotifier(image=None, image_tag=None, image_pull_policy=None, resources=None, node_selector=None, affinity=None, tolerations=None, image_pull_secrets=None)

Polyaxon notifier is a helper job that gets scheduled to handle post-done events and send webhooks for operations annotated with hooks or notifications.

Polyaxon CE and Polyaxon Agent are deployed with default values for the notifier, however if you need to control or update one or several aspects of how the notifier is scheduled, this guide walks through the possible options.

  • Args:
    • image: str, optional.
    • image_tag: str, optional.
    • image_pull_policy: str, optional.
    • resources: V1ResourceRequirements, optional.
    • node_selector: Dict, optional
    • affinity: V1Affinity, optional
    • tolerations: List[V1Toleration], optional
    • image_pull_secrets: List[str]

YAML usage

notifier:
  image: polyaxon/polyaxon-events-handlers
  imageTag: v1.x
  imagePullPolicy: IfNotPresent
  resources: requests:
    memory: "64Mi"
    cpu: "50m"
  nodeSelector:
    foo: bar

Fields

image

The container image to use.

notifier:
  image: polyaxon/polyaxon-events-handlers

imageTag

The container image tag to use.

notifier:
  imageTag: dev

imagePullPolicy

The image pull policy to use, it must be a valid policy supported by Kubernetes.

notifier:
  imagePullPolicy: Always

resources

The resources requirements to allocate to the container.

notifier:
  resources:
    memory: "64Mi"
    cpu: "50m"

nodeSelector

From Kubernetes docs

nodeSelector is the simplest recommended form of node selection constraint. nodeSelector is a field of PodSpec. It specifies a map of key-value pairs. For the pod to be eligible to run on a node, the node must have each of the indicated key-value pairs as labels (it can have additional labels as well). The most common usage is one key-value pair.

notifier:
  nodeSelector:
    node_label: node_value

affinity

From Kubernetes docs

The affinity/anti-affinity feature, greatly expands the types of constraints you can express.

The affinity to use for scheduling the job.

notifier:
  affinity:
    podAffinity:
      preferredDuringSchedulingIgnoredDuringExecution:
        ...

tolerations

From Kubernetes docs

Tolerations are applied to pods, and allow (but do not require) the pods to schedule onto nodes with matching taints.

notifier:
  tolerations:
    - key: "key"
      operator: "Exists"
      effect: "NoSchedule"

imagePullSecrets

From Kubernetes docs

ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet.

notifier:
  imagePullSecrets: ['secret1', 'secret2']