Created
April 13, 2023 14:18
-
-
Save so-jelly/46902855ccfd7d406a8bea9343cf49f6 to your computer and use it in GitHub Desktop.
es-zone
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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