apiVersion: batch/v1
kind: Job
metadata:
  annotations:
    a8r.io/repository: ssh://git@git.tr1ceracop.de:222/gitea_admin/k8s-and-chill.git
    helm.sh/hook: pre-install,pre-upgrade
    helm.sh/hook-delete-policy: before-hook-creation
  labels:
    app.kubernetes.io/component: redis-secret-init
    app.kubernetes.io/instance: argo-cd
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: argocd-redis-secret-init
    app.kubernetes.io/part-of: argocd
    app.kubernetes.io/version: v2.14.10
    helm.sh/chart: argo-cd-7.8.26
  name: argo-cd-argocd-redis-secret-init
  namespace: argocd
spec:
  template:
    metadata:
      labels:
        app.kubernetes.io/component: redis-secret-init
        app.kubernetes.io/instance: argo-cd
        app.kubernetes.io/managed-by: Helm
        app.kubernetes.io/name: argocd-redis-secret-init
        app.kubernetes.io/part-of: argocd
        app.kubernetes.io/version: v2.14.10
        helm.sh/chart: argo-cd-7.8.26
    spec:
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - podAffinityTerm:
                labelSelector:
                  matchLabels:
                    app.kubernetes.io/name: argocd-redis-secret-init
                topologyKey: kubernetes.io/hostname
              weight: 100
      containers:
        - command:
            - argocd
            - admin
            - redis-initial-password
          image: quay.io/argoproj/argocd:v2.14.10
          imagePullPolicy: IfNotPresent
          name: secret-init
          resources: {}
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
                - ALL
            readOnlyRootFilesystem: true
            runAsNonRoot: true
            seccompProfile:
              type: RuntimeDefault
      nodeSelector:
        kubernetes.io/os: linux
      restartPolicy: OnFailure
      serviceAccountName: argo-cd-argocd-redis-secret-init
  ttlSecondsAfterFinished: 60
