# Source: kube-prometheus-stack/templates/prometheus-operator/admission-webhooks/job-patch/job-patchWebhook.yaml
apiVersion: batch/v1
kind: Job
metadata:
  name: monitoring-kube-prometheus-admission-patch
  namespace: monitoring
  annotations:
    "helm.sh/hook": post-install,post-upgrade
    "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
    meta.helm.sh/release-name: 'monitoring'
  labels:
    app: kube-prometheus-stack-admission-patch
    chart: kube-prometheus-stack-10.3.3
    release: "monitoring"
    heritage: "Helm"
    gitops.jenkins-x.io/pipeline: 'namespaces'
spec:
  template:
    metadata:
      name: monitoring-kube-prometheus-admission-patch
      labels:
        app: kube-prometheus-stack-admission-patch
        chart: kube-prometheus-stack-10.3.3
        release: "monitoring"
        heritage: "Helm"
    spec:
      containers:
        - name: patch
          image: jettech/kube-webhook-certgen:v1.2.1
          imagePullPolicy: IfNotPresent
          args:
            - patch
            - --webhook-name=monitoring-kube-prometheus-admission
            - --namespace=monitoring
            - --secret-name=monitoring-kube-prometheus-admission
            - --patch-failure-policy=Fail
          resources: {}
      restartPolicy: OnFailure
      serviceAccountName: monitoring-kube-prometheus-admission
      securityContext:
        runAsGroup: 2000
        runAsNonRoot: true
        runAsUser: 2000
