# Source: kube-prometheus-stack/templates/prometheus-operator/admission-webhooks/job-patch/job-createSecret.yaml
apiVersion: batch/v1
kind: Job
metadata:
  name: monitoring-kube-prometheus-admission-create
  namespace: monitoring
  annotations:
    "helm.sh/hook": pre-install,pre-upgrade
    "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
    meta.helm.sh/release-name: 'monitoring'
  labels:
    app: kube-prometheus-stack-admission-create
    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-create
      labels:
        app: kube-prometheus-stack-admission-create
        chart: kube-prometheus-stack-10.3.3
        release: "monitoring"
        heritage: "Helm"
    spec:
      containers:
        - name: create
          image: jettech/kube-webhook-certgen:v1.2.1
          imagePullPolicy: IfNotPresent
          args:
            - create
            - --host=monitoring-kube-prometheus-operator,monitoring-kube-prometheus-operator.monitoring.svc
            - --namespace=monitoring
            - --secret-name=monitoring-kube-prometheus-admission
          resources: {}
      restartPolicy: OnFailure
      serviceAccountName: monitoring-kube-prometheus-admission
      securityContext:
        runAsGroup: 2000
        runAsNonRoot: true
        runAsUser: 2000
