Repository: minio/minio (language: go)

Issue:
vanilla helm chart: make-user-job crashloopbackoff
<!--- Provide a general summary of the issue in the Title above -->

Version `4.0.6` of the vanilla chart, the make user job fails with error:

```
Connecting to MinIO server: http://min-io-minio:9000
Added `myminio` successfully.                                                                                                                  cat: /config/secrets/password: No such file or directory
Stream closed EOF for data/min-io-minio-make-user-job--1-cklgb (minio-mc)
```

## Expected Behavior

The job should complete successfully.

## Current Behavior

The job fails. I have tried both adding and removing users in the `values.yaml`, no change in the behaviour.

## Steps to Reproduce (for bugs)

1. deploying minio with the following

```
dependencies:
  - name: minio
    version: 4.0.6
    repository: "https://charts.min.io/"
```

## Regression

Did not happen before 4.0.6

## Your Environment

Deploying with ArgoCD to EKS 1.22.

`values.yaml` declares couple users, policies, buckets. Everything works as expected (as it was declared before the bug was introduced).




Discussion / hints:
can you upload your value.yaml?
I want to see your configuration about:
![image](https://user-images.githubusercontent.com/37854724/181914210-40f54072-47ca-479b-8575-b7c233140f06.png)

Thanks for the answer @dormanze here's the users section:

```yaml
  users:
    - accessKey: models
      existingSecret: minio-secret-models
      existingSecretKey: password
      policy: readwritemodels

    - accessKey: console
      existingSecret: minio-secret-console
      existingSecretKey: password
      policy: consoleAdmin

    - accessKey: write-creations
      existingSecret: minio-secret-creations
      existingSecretKey: passwordwrite
      policy: writecreationspolicy

    - accessKey: read-creations
      existingSecret: minio-secret-creations
      existingSecretKey: passwordread
      policy: readonlycreationspolicy

    - accessKey: argo
      existingSecret: minio-secret-argo
      existingSecretKey: passwordrw
      policy: readwriteargo
```

I checked each individual secret, all keys are present.

Fix patch:
diff --git a/helm/minio/templates/post-install-create-user-job.yaml b/helm/minio/templates/post-install-create-user-job.yaml
index aa8b5aaf879dd..7d7f6dd9da57e 100644
--- a/helm/minio/templates/post-install-create-user-job.yaml
+++ b/helm/minio/templates/post-install-create-user-job.yaml
@@ -64,7 +64,7 @@ spec:
                 name: {{ tpl .existingSecret $global }}
                 items:
                   - key: {{ .existingSecretKey }}
-                    path: secrets/{{ tpl .accessKey $global }}
+                    path: secrets/{{ tpl .existingSecretKey $global }}
             {{- end }}
             {{- end }}
         {{- if .Values.tls.enabled }}


Test patch: