Files structure (minimized)
---------------------------

There is a *charts* folder containing multiple charts.

```
charts/
  foo-chart/
    templates/
       deployment.yml
       secrets.yml
  bar-chart/
    templates/
      configmaps/
        script.yml

```

### secrets.yml

Defines a token:

```
apiVersion: v1
kind: Secret
metadata:
  name: {{ .Release.Name }}-secret
  labels:
    app: {{ include "metrics.name" . }}
    chart: {{ include "metrics.chart" . }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
type: Opaque
data:
  # NOTE: Service token has to fit the NIST requirement
  serviceToken: {{ randAscii 40 | b64enc }}

```

### deployment.yml

Runs a command which uses an environmental variable which uses a secret:

```
containers:
  command:
  - fancy-binary
  - -token
  - $(AUTH_TOKEN)
  env:
  - name: AUTH_TOKEN
  valueFrom:
    secretKeyRef:
    name: {{ .Release.Name }}-secret
    key: serviceToken

```

### script.yml

Is supposed to run bash command (Django admin-command) and use environmental variable as well:

```
# Create a Service Token
django-admin service_token_add $(AUTH_TOKEN)

```

---

Issues
------

1. Is the `AUTH_TOKEN` going to be visible in *script.yml*?
2. Does the `env` `valueFrom` auto-set the value of `AUTH_TOKEN` (is deployment going to work)?