--
You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-use...@googlegroups.com.
To post to this group, send email to kubernet...@googlegroups.com.
Hi Rodrigo,Thanks for the replyFirst of all this is stable external image and I dont want to maintain my version.Secondly, the values that I would like to get are created during my deployment (ingress external host urls) and I can only map them during container initializing.What i tried in 1st option is trying to create environment variable with the value of executing the command $(eval cat <PATH>)Here is the block I am trying in statefulset- name: KAFKA_ADVERTISED_LISTENERSvalue: INSIDE://$(POD_IP):9092,OUTSIDE://$(eval cat /opt/conf/ext-url):9093
And ext-url is mounted via dynamic configMaps- name: cm-volconfigMap:name: kafka-0items:- key: kafka-ext-hostpath: ext-host
Note: I went to this direction after observing that reading from dynamic configMap is not workingvalueFrom:configMapKeyRef:key: kafka-ext-hostname: $(POD_NAME) . --> Kubernetes giving error to here
So the question is that, can I use "cat <PATH>" command to environment variable ?
I hope it is little bit clear now :) Sorry for the mess
--
- command:
- sh
- -exc
- |
export KAFKA_EXT_HOST=`cat /opt/data/shared/$HOSTNAME` && \
export KAFKA_ADVERTISED_LISTENERS=INSIDE://$(POD_IP):9092,OUTSIDE://$KAFKA_EXT_HOST:9094 && \
start-kafka.sh
Thanks again and have a good day