[bitnami/airflow-scheduler] Release 2.5.1-debian-11-r9 (#23954)

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
This commit is contained in:
Bitnami Bot
2023-02-14 17:14:53 +01:00
committed by GitHub
parent 533ad02ba6
commit 4472ec13c8
4 changed files with 27 additions and 1 deletions

View File

@@ -5,7 +5,7 @@ ARG TARGETARCH
LABEL org.opencontainers.image.authors="https://bitnami.com/contact" \
org.opencontainers.image.description="Application packaged by Bitnami" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.ref.name="2.5.1-debian-11-r8" \
org.opencontainers.image.ref.name="2.5.1-debian-11-r9" \
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/airflow-scheduler" \
org.opencontainers.image.title="airflow-scheduler" \
org.opencontainers.image.vendor="VMware, Inc." \

View File

@@ -23,6 +23,7 @@ export BITNAMI_DEBUG="${BITNAMI_DEBUG:-false}"
# variable will be overridden with the value specified in that file
airflow_scheduler_env_vars=(
AIRFLOW_EXECUTOR
AIRFLOW_RAW_FERNET_KEY
AIRFLOW_FERNET_KEY
AIRFLOW_SECRET_KEY
AIRFLOW_WEBSERVER_HOST
@@ -73,6 +74,7 @@ export AIRFLOW_DAEMON_GROUP="airflow"
# Airflow configuration
export AIRFLOW_EXECUTOR="${AIRFLOW_EXECUTOR:-SequentialExecutor}"
export AIRFLOW_RAW_FERNET_KEY="${AIRFLOW_RAW_FERNET_KEY:-}"
export AIRFLOW_FERNET_KEY="${AIRFLOW_FERNET_KEY:-}"
export AIRFLOW_SECRET_KEY="${AIRFLOW_SECRET_KEY:-}"
export AIRFLOW_WEBSERVER_HOST="${AIRFLOW_WEBSERVER_HOST:-127.0.0.1}"

View File

@@ -79,6 +79,18 @@ airflow_validate() {
[[ -z "$AIRFLOW_POOL_SIZE" ]] && print_validation_error "Provided AIRFLOW_POOL_NAME but missing AIRFLOW_POOL_SIZE"
fi
# Check cryptography parameters
if [[ -n "$AIRFLOW_RAW_FERNET_KEY" && -z "$AIRFLOW_FERNET_KEY" ]]; then
local fernet_char_count
fernet_char_count="$(echo -n "$AIRFLOW_RAW_FERNET_KEY")"
if [[ "$fernet_char_count" -lt 32 ]]; then
print_validation_error "AIRFLOW_RAW_FERNET_KEY must have at least 32 characters"
elif [[ "$fernet_char_count" -gt 32 ]]; then
warn "AIRFLOW_RAW_FERNET_KEY has more than 32 characters, the rest will be ignored"
fi
AIRFLOW_FERNET_KEY="$(echo -n "${AIRFLOW_RAW_FERNET_KEY:0:32}" | base64)"
fi
return "$error_code"
}

View File

@@ -32,6 +32,18 @@ airflow_scheduler_validate() {
# Check postgresql host
[[ -z "$AIRFLOW_DATABASE_HOST" ]] && print_validation_error "Missing AIRFLOW_DATABASE_HOST"
# Check cryptography parameters
if [[ -n "$AIRFLOW_RAW_FERNET_KEY" && -z "$AIRFLOW_FERNET_KEY" ]]; then
local fernet_char_count
fernet_char_count="$(echo -n "$AIRFLOW_RAW_FERNET_KEY")"
if [[ "$fernet_char_count" -lt 32 ]]; then
print_validation_error "AIRFLOW_RAW_FERNET_KEY must have at least 32 characters"
elif [[ "$fernet_char_count" -gt 32 ]]; then
warn "AIRFLOW_RAW_FERNET_KEY has more than 32 characters, the rest will be ignored"
fi
AIRFLOW_FERNET_KEY="$(echo -n "${AIRFLOW_RAW_FERNET_KEY:0:32}" | base64)"
fi
# Avoid to fail because of the above check
true
}