Setting Kubernetes Job Properties Through Scripts

Setting K8s job properties through scripts

Attributes defined for an object affect how the object is processed. Script statements allow you to dynamically change those object attributes and assign new values when the task is generated. The new values are only valid for the current generation and are not permanently stored in the object.

You can define the values of any of the settings of all K8s Jobs using scripts. You do this by using :PUT_ATT commands on the Pre-Process object definition page.

For more information, see the Automic Automation product documentation:

This page includes the following:

K8s Execute Command Job Attributes

Kubernetes execute command job attributes

The attributes available for K8s Execute Command Jobs are the following:

  • connection

    Changes the value of the K8s Connection object definition

    Value: text

  • nameSpace

    Changes the value of the Namespace definition

    Value: text

  • command

    Changes the value of the Command definition

    Value: text

  • labelSelector

    Changes the value of the Label Selector definition

    Value: text

  • fieldSelector

    Changes the value of the Field Selector definition

    Value: text

K8s Run Job Attributes

Kubernetes run job attributes

The attributes available for K8s Run Jobs are the following:

  • connection

    Changes the value of the K8s Connection object definition

    Value: text

  • nameSpace

    Changes the value of the Namespace definition

    Value: text

  • jobName

    Changes the value of the Job Name definition

    Value: text

  • jobDefinitionType

    Changes the value of the Job Definition Type

    Value: text

  • jobDefinition

    Changes the value of the Job Definition

    Value: text

  • scmConnection

    Changes the value of the SCM Connection object definition

    Value: text

  • variables

    Changes the values of the Variable definitions

    Value: text

  • cleanup

    Changes the Cleanup definition

    Values: 0 (do not clean up), 1 (clean up)

K8s Scale Deployment Job Attributes

Kubernetes scale deployment job attributes

The attributes available for K8s Scale Deployment Jobs are the following:

  • connection

    Changes the value of the K8s Connection object definition

    Value: text

  • nameSpace

    Changes the value of the Namespace definition

    Value: text

  • deploymentName

    Changes the value of the Deployment Name definition

    Value: text

  • scale

    Changes the value of the Scale definition

    Value: text

See also: