Hi Team,
I am trying to run a cron job with my ES operator/Application deployment, I am able to configure curator with the ES cluster and checked the connectivity everything is working fine, now as the elastic password is dynamic and changes everytime we deploy the cluster, i want the password to be parameterized, harcoding password works!! but thats not an ideal scenario.
below is the config:
client:
hosts:
- elasticsearch-config-es-http
port: 9200
url_prefix:
use_ssl: True
certificate: /etc/certificate/ca.crt
client_cert:
client_key:
ssl_no_validate: False
http_auth: "elastic:${SECRET_ES_PASSWORD}" --> Hardcoding this variable works.
the cron-job.yaml:
mounting secret as an env variable
env:
- name: SECRET_ES_PASSWORD
valueFrom:
secretKeyRef:
key: elastic
name: elasticsearch-config-es-elastic-user
mounting the secret
volume mount:
- mountPath: /etc/certificate/secret
name: login
volume:
- name: login
secret:
secretName: elasticsearch-config-es-elastic-user
Thanks in advance