Changeset View
Changeset View
Standalone View
Standalone View
python_modules/libraries/dagster-k8s/dagster_k8s/job.py
Show First 20 Lines • Show All 433 Lines • ▼ Show 20 Lines | job_container = kubernetes.client.V1Container( | ||||
name=job_name, | name=job_name, | ||||
image=job_config.job_image, | image=job_config.job_image, | ||||
command=command, | command=command, | ||||
args=args, | args=args, | ||||
image_pull_policy=job_config.image_pull_policy, | image_pull_policy=job_config.image_pull_policy, | ||||
env=[ | env=[ | ||||
kubernetes.client.V1EnvVar(name="DAGSTER_HOME", value=job_config.dagster_home), | kubernetes.client.V1EnvVar(name="DAGSTER_HOME", value=job_config.dagster_home), | ||||
kubernetes.client.V1EnvVar( | kubernetes.client.V1EnvVar( | ||||
name="DAGSTER_K8S_INSTANCE_CONFIG_MAP", value=job_config.instance_config_map | |||||
johann: Why does this need to be added now? | |||||
Done Inline ActionsSince we add these two environment variables to the configmap, we need a way to expose them for use rexledesma: Since we add these two environment variables to the configmap, we need a way to expose them for… | |||||
), | |||||
kubernetes.client.V1EnvVar( | |||||
name="DAGSTER_K8S_PG_PASSWORD_SECRET", value=job_config.postgres_password_secret | |||||
Not Done Inline ActionsIs DAGSTER_K8S_PG_PASSWORD_SECRET the same as DAGSTER_PG_PASSWORD_ENV_VAR below? catherinewu: Is `DAGSTER_K8S_PG_PASSWORD_SECRET` the same as `DAGSTER_PG_PASSWORD_ENV_VAR` below? | |||||
Done Inline ActionsYeah - it seems like those two env variables are floating around with the same value. Is there a different between which to use? rexledesma: Yeah - it seems like those two env variables are floating around with the same value. Is there… | |||||
Not Done Inline ActionsI think DAGSTER_K8S_PG_PASSWORD_SECRET is the name of the secret, DAGSTER_PG_PASSWORD_SECRET_KEY is the key of the secret, and DAGSTER_PG_PASSWORD_ENV_VAR is the value of the secret. is DAGSTER_K8S_PG_PASSWORD_SECRET not set in the k8s jobs? i would expect it to be set already catherinewu: I think DAGSTER_K8S_PG_PASSWORD_SECRET is the name of the secret… | |||||
), | |||||
kubernetes.client.V1EnvVar( | |||||
name=DAGSTER_PG_PASSWORD_ENV_VAR, | name=DAGSTER_PG_PASSWORD_ENV_VAR, | ||||
value_from=kubernetes.client.V1EnvVarSource( | value_from=kubernetes.client.V1EnvVarSource( | ||||
secret_key_ref=kubernetes.client.V1SecretKeySelector( | secret_key_ref=kubernetes.client.V1SecretKeySelector( | ||||
name=job_config.postgres_password_secret, key=DAGSTER_PG_PASSWORD_SECRET_KEY | name=job_config.postgres_password_secret, key=DAGSTER_PG_PASSWORD_SECRET_KEY | ||||
) | ) | ||||
), | ), | ||||
), | ), | ||||
] | ] | ||||
▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines |
Why does this need to be added now?