Skip to content

Instantly share code, notes, and snippets.

@so-jelly
Created April 13, 2023 14:18
Show Gist options
  • Save so-jelly/46902855ccfd7d406a8bea9343cf49f6 to your computer and use it in GitHub Desktop.
Save so-jelly/46902855ccfd7d406a8bea9343cf49f6 to your computer and use it in GitHub Desktop.
es-zone
apiVersion: v1
kind: Pod
metadata:
name: myapp
labels:
name: myapp
spec:
containers:
- name: myapp
image: &elasticsearch_image docker.io/bitnami/elasticsearch:8.3.3-debian-11-r5
resources: {}
command:
- cat
args:
- /opt/bitnami/scripts/elasticsearch-env.sh
volumeMounts:
- name: elasticsearch-env
mountPath: /opt/bitnami/scripts/elasticsearch-env.sh
subPath: elasticsearch-env.sh
initContainers:
- name: add-zone
image: *elasticsearch_image
command:
- /bin/sh
args:
- -xc
- |
cp /opt/bitnami/scripts/elasticsearch-env.sh /tmp/elasticsearch-env/
echo "TODO: get zone from metadata"
echo "export ZONE=foo" >> /tmp/elasticsearch-env/elasticsearch-env.sh
volumeMounts:
- name: elasticsearch-env
mountPath: /tmp/elasticsearch-env
volumes:
- name: elasticsearch-env
emptyDir: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment