apiVersion: batch/v1
kind: Job
metadata:
  name: splunk-adhoc-backup
spec:
  template:
    spec:
      containers:
      - name: splunk-adhoc-backup
        image: sebastus/splunk-aks-backup:v0.0.99
        env:
            - name: AZURE_TENANT_ID
              valueFrom:
                secretKeyRef:
                  name: splunk-backup-admin
                  key: azure_tenant_id            
            - name: AZURE_APP_ID
              valueFrom:
                secretKeyRef:
                  name: splunk-backup-admin
                  key: azure_app_id            
            - name: AZURE_APP_KEY
              valueFrom:
                secretKeyRef:
                  name: splunk-backup-admin
                  key: azure_app_key            
            - name: AZURE_SUBSCRIPTION_ID
              valueFrom:
                secretKeyRef:
                  name: splunk-backup-admin
                  key: azure_subscription_id            
            - name: AKS_RG
              valueFrom:
                secretKeyRef:
                  name: splunk-backup-admin
                  key: aks_rg            
            - name: AKS_ASSET_RG
              valueFrom:
                secretKeyRef:
                  name: splunk-backup-admin
                  key: aks_asset_rg            
            - name: AKS_NAME
              valueFrom:
                secretKeyRef:
                  name: splunk-backup-admin
                  key: aks_name
            - name: AI_INSTRUMENTATION_KEY
              valueFrom:
                secretKeyRef:
                  name: splunk-backup-admin
                  key: ai_instrumentation_key
      restartPolicy: Never
  backoffLimit: 0