apiVersion: mutations.gatekeeper.sh/v1alpha1
kind: AssignImage
metadata:
  name: assign-container-image-iax-post
spec:
  applyTo:
  - groups: [ "batch" ]
    kinds: [ "Job" ]
    versions: [ "v1" ]
  location: "spec.template.spec.initContainers[name:*].image"
  parameters:
    assignDomain: "proxy.itrsgroup.com"
    assignPath: "proxy/itrs-analytics/docker.itrsgroup.com/chainguard/kubectl"
    assignTag: ":1.33.4-r4-dev"
  match:
    source: "All"
    scope: Namespaced
    kinds:
    - apiGroups: [ "batch" ]
      kinds: [ "Job" ]
    name: "iax-post-*"
---
apiVersion: mutations.gatekeeper.sh/v1alpha1
kind: AssignImage
metadata:
  name: assign-container-image-update-metadata
spec:
  applyTo:
  - groups: [ "batch" ]
    kinds: [ "Job" ]
    versions: [ "v1" ]
  location: "spec.template.spec.containers[name:*].image"
  parameters:
    assignDomain: "proxy.itrsgroup.com"
    assignPath: "proxy/itrs-analytics/docker.itrsgroup.com/chainguard/kubectl"
    assignTag: ":1.33.4-r4-dev"
  match:
    source: "All"
    scope: Namespaced
    kinds:
    - apiGroups: [ "batch" ]
      kinds: [ "Job" ]
    name: "update-installation-metadata-job"
---
apiVersion: mutations.gatekeeper.sh/v1alpha1
kind: AssignImage
metadata:
  name: assign-container-image-linkerd-proxy
spec:
  applyTo:
  - groups: [ "batch" ]
    kinds: [ "Job" ]
    versions: [ "v1" ]
  location: "spec.template.spec.containers[name:*].image"
  parameters:
    assignPath: "bitnamilegacy/kubectl"
  match:
    source: "All"
    scope: Namespaced
    kinds:
    - apiGroups: [ "batch" ]
      kinds: [ "Job" ]
    name: "linkerd-control-plane-remove-platformd-proxy"
---
apiVersion: mutations.gatekeeper.sh/v1alpha1
kind: AssignImage
metadata:
  name: modify-validate-preflight-sa-pod-image
spec:
  applyTo:
  - groups: [ "" ]
    kinds: [ "Pod" ]
    versions: [ "v1" ]
  location: "spec.containers[name:*].image"
  parameters:
    assignDomain: "proxy.itrsgroup.com"
    assignPath: "proxy/itrs-analytics/docker.itrsgroup.com/chainguard/kubectl"
    assignTag: ":1.33.4-r4-dev"
  match:
    source: "All"
    scope: Namespaced
    kinds:
    - apiGroups: [ "" ]
      kinds: [ "Pod" ]
    name: "validate-custom-preflight-sa"
