Robin Fehr
09/14/2023, 1:39 PM&& chgrp -R 0 /opt/flink \
&& chmod -R g=u /opt/flink
we now still see these issue appearing though from the `docker-entrypoint.sh`:
sed: couldn't open temporary file /opt/flink/conf/sed7zLHN3: Read-only file system
sed: couldn't open temporary file /opt/flink/conf/sedasVKRI: Read-only file system
/docker-entrypoint.sh: line 73: /opt/flink/conf/flink-conf.yaml: Permission denied
/docker-entrypoint.sh: line 89: /opt/flink/conf/flink-conf.yaml.tmp: Read-only file system
which basically comes from this section in the docker-entrypoint.sh
set_config_option() {
local option=$1
local value=$2
# escape periods for usage in regular expressions
local escaped_option=$(echo ${option} | sed -e "s/\./\\\./g")
# either override an existing entry, or append a new one
if grep -E "^${escaped_option}:.*" "${CONF_FILE}" > /dev/null; then
sed -i -e "s/${escaped_option}:.*/$option: $value/g" "${CONF_FILE}"
else
echo "${option}: ${value}" >> "${CONF_FILE}"
fi
}
prepare_configuration() {
set_config_option jobmanager.rpc.address ${JOB_MANAGER_RPC_ADDRESS}
set_config_option blob.server.port 6124
set_config_option query.server.port 6125
if [ -n "${TASK_MANAGER_NUMBER_OF_TASK_SLOTS}" ]; then
set_config_option taskmanager.numberOfTaskSlots ${TASK_MANAGER_NUMBER_OF_TASK_SLOTS}
fi
if [ -n "${FLINK_PROPERTIES}" ]; then
echo "${FLINK_PROPERTIES}" >> "${CONF_FILE}"
fi
envsubst < "${CONF_FILE}" > "${CONF_FILE}.tmp" && mv "${CONF_FILE}.tmp" "${CONF_FILE}"
}
where it tries to override some values such as the numberOfTasksSlots if the ENV var is provided.
the operator though - from what I've seen only works via the flink-conf.yaml
and not via the ENV vars.
what would be the suggestions to get this fixed? can we somehow correct the access rights? or should we simply override the docker-entrypoint.sh
in our base image and let it ignore the ENV vars completely? or is there an even better approach we're not seeing yet...
do we maybe use the wrong flink image which is not compatible with the operator? i'd assume that they must be compatible since the docker-entrypoint.sh
would always try to overwrite flink-conf.yaml but the configMap isn't mutable...Robin Fehr
09/17/2023, 6:14 PM