apiVersion: kubelet.config.k8s.io/{{.apiVersion}}
kind: CredentialProviderConfig
providers:
  - name: ecr-credential-provider
    matchImages:{{range $val := .imagePattern}}
      - "{{$val}}"{{end}}
    defaultCacheDuration: "{{.cacheDuration}}"
    apiVersion: credentialprovider.kubelet.k8s.io/{{.apiVersion}}
    env:
      - name: AWS_PROFILE
        value: {{.profile}}
      - name: AWS_CONFIG_FILE
        value: {{.config}}
      - name: PATH
        value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/eksa-packages
      - name: HOME
        value: {{.home}}
