---
# Source: kube-prometheus-stack/templates/prometheus-operator/admission-webhooks/job-patch/job-createSecret.yaml
apiVersion: batch/v1
kind: Job
metadata:
  name:  prometheus-stack-kube-prom-admission-create
  namespace: monitoring-system
  annotations:
    "helm.sh/hook": pre-install,pre-upgrade
    "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
  labels:
    app: kube-prometheus-stack-admission-create    
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/instance: prometheus-stack
    app.kubernetes.io/version: "16.0.1"
    app.kubernetes.io/part-of: kube-prometheus-stack
    chart: kube-prometheus-stack-16.0.1
    release: "prometheus-stack"
    heritage: "Helm"
spec:
  template:
    metadata:
      name:  prometheus-stack-kube-prom-admission-create
      labels:
        app: kube-prometheus-stack-admission-create        
        app.kubernetes.io/managed-by: Helm
        app.kubernetes.io/instance: prometheus-stack
        app.kubernetes.io/version: "16.0.1"
        app.kubernetes.io/part-of: kube-prometheus-stack
        chart: kube-prometheus-stack-16.0.1
        release: "prometheus-stack"
        heritage: "Helm"
    spec:
      containers:
        - name: create
          image: jettech/kube-webhook-certgen:v1.5.0
          imagePullPolicy: IfNotPresent
          args:
            - create
            - --host=prometheus-stack-kube-prom-operator,prometheus-stack-kube-prom-operator.monitoring-system.svc
            - --namespace=monitoring-system
            - --secret-name=prometheus-stack-kube-prom-admission
          resources:
            {}
      restartPolicy: OnFailure
      serviceAccountName: prometheus-stack-kube-prom-admission
      securityContext:
        runAsGroup: 2000
        runAsNonRoot: true
        runAsUser: 2000
