Miretpl commented on code in PR #77123:
URL: https://github.com/apache/airflow/pull/77123#discussion_r4743074125
##########
chart/values.schema.json:
##########
@@ -1808,7 +1812,13 @@
"default": [],
"items": {
"type": "object",
- "additionalProperties": {}
+ "additionalProperties": {},
+ "properties": {
+ "image": {
+ "description": "Image for the Airflow
Celery worker container of this set. Replaces ``workers.celery.image`` as a
whole.",
+ "$ref":
"#/definitions/celeryWorkerImage"
+ }
+ }
Review Comment:
```suggestion
"additionalProperties": {}
```
I'm working in my free moments to make the schema validation better in
general for a Helm Chart. Let's leave it unchanged for now, and I will probably
change that in the future.
##########
chart/values.schema.json:
##########
@@ -1681,6 +1681,10 @@
"default": null,
"x-docsSection": "Kubernetes"
},
+ "image": {
+ "description": "Image for the Airflow Celery
worker container. Unset fields fall back to ``images.airflow`` and then to the
``defaultAirflow*`` values, except the digest: neither
``images.airflow.digest`` nor ``defaultAirflowDigest`` is used once
``repository``, ``tag`` or ``digest`` is set here. The other containers in the
worker pod keep their usual images.",
Review Comment:
```suggestion
"description": "Image for the Airflow Celery
worker container. Unset fields fall back to ``images.airflow`` and then to the
``defaultAirflow*`` values, except the digest. The other containers in the
worker pod keep their usual images.",
```
##########
chart/values.yaml:
##########
@@ -622,6 +622,17 @@ workers:
# Max number of old Airflow Celery workers ReplicaSets to retain
revisionHistoryLimit: ~
+ # Image for the Airflow Celery worker container. Unset fields fall back to
`images.airflow` and then
+ # to the `defaultAirflow*` values, except the digest: neither
`images.airflow.digest` nor
+ # `defaultAirflowDigest` is used once `repository`, `tag` or `digest` is
set here. The other
+ # containers in the worker pod keep their usual images.
Review Comment:
```suggestion
# Image for the Airflow Celery worker container. Unset fields fall back
to `images.airflow` and then
# to the `defaultAirflow*` values, except the digest. The other
containers in the worker pod keep
# their usual images.
```
It is generally how the values are constructed, so I will that we can omit
that message.
##########
chart/docs/customizing-workers.rst:
##########
@@ -78,6 +78,29 @@ Non-empty list overrides such as ``extraVolumes`` and
``extraVolumeMounts`` repl
the inherited list, so include all additional volumes and mounts needed by each
set. An empty list retains the inherited value.
+A set can run its tasks on a different image, for example one with extra
+dependencies or GPU libraries, by setting ``image`` (``repository``, ``tag``,
+``digest`` and ``pullPolicy``). Only the ``worker`` container uses it; the
other
+containers in the pod keep their usual images. Unset fields fall back to
+``images.airflow`` and then to ``defaultAirflowRepository`` and
Review Comment:
It's not fully true for the `pullPolicy` looking at the code.
##########
chart/docs/customizing-workers.rst:
##########
@@ -78,6 +78,29 @@ Non-empty list overrides such as ``extraVolumes`` and
``extraVolumeMounts`` repl
the inherited list, so include all additional volumes and mounts needed by each
set. An empty list retains the inherited value.
+A set can run its tasks on a different image, for example one with extra
+dependencies or GPU libraries, by setting ``image`` (``repository``, ``tag``,
+``digest`` and ``pullPolicy``). Only the ``worker`` container uses it; the
other
+containers in the pod keep their usual images. Unset fields fall back to
+``images.airflow`` and then to ``defaultAirflowRepository`` and
+``defaultAirflowTag``. No digest is inherited once ``repository``, ``tag`` or
+``digest`` is set, since a digest pins one specific image. A set's ``image``
+replaces the one in ``workers.celery`` as a whole rather than being merged with
+it, ``pullPolicy`` included, so ``image: {}`` returns a set to
``images.airflow``:
Review Comment:
> so ``image: {}`` returns a set to ``images.airflow``
Not really. What is passed is the object with `repository`, `tag`, etc.,
which has `nil` values, which fall back to `images.airflow*`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]