You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/11/25 22:41:22 UTC

[GitHub] [airflow] ecerulm opened a new pull request #12634: Allow customization of probes path and host

ecerulm opened a new pull request #12634:
URL: https://github.com/apache/airflow/pull/12634


   Closes #12632
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ecerulm commented on pull request #12634: Allow customization of probes path and host

Posted by GitBox <gi...@apache.org>.
ecerulm commented on pull request #12634:
URL: https://github.com/apache/airflow/pull/12634#issuecomment-734710314


   I've been thinking about the whole ingress situation. Even after this and #12619 are merged, in order to get a working airflow ingress with a custom hostname and path  in AWS EKS the following will be required 
   
   * ingress.web.annotations #12607 
   * ingress.web.host: `www.example.com`
   * ingress.web.path: `/airflow/*`
   * config.web.server.base_url: `https://www.example.com/airflow`
   * webserver.livenessProbe.path: `/airflow/health`
   * webserver.livenessProbe.host: `www.example.com`
   * webserver.readinessProbe.path: `/airflow/health`
   * webserver.readinessProbe.host: `www.example.com`
   
   So there is lot of repetition and matching required, the hostname appears in `base_url`, `ingress.web.host` and `webserver.*.host`. 
   The path prefix `/airflow`  appear in `ingress.web.path` and `webserver.*.path`. 
   
   I'm thinking to create yet another PR after the others are merged that takes `ingress.web.host` and `ingress.web.path` and fills values for `config.web.server.base_url` and `webserver.*.{path,host}`if they are not explicitly provided. Is that something that you would be interested on having?
    


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on a change in pull request #12634: Allow customization of probes path and host

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #12634:
URL: https://github.com/apache/airflow/pull/12634#discussion_r552237800



##########
File path: chart/README.md
##########
@@ -208,10 +208,14 @@ The following tables lists the configurable parameters of the Airflow chart and
 | `scheduler.serviceAccountAnnotations`                 | Annotations to add to scheduler kubernetes service account                                                   | `{}`                                            |
 | `scheduler.extraVolumes`                              | Mount additional volumes into scheduler                                                                      | `[]`                                            |
 | `scheduler.extraVolumeMounts`                         | Mount additional volumes into scheduler                                                                      | `[]`                                            |
+| `webserver.livenessProbe.path`                        | Webserver LivenessProbe path (need to match your webserver base_url)                                         | `/health`                                              |
+| `webserver.livenessProbe.host`                        | Webserver LivenessProbe host header (need to match your webserver base_url)                                  | `~`                                              |
 | `webserver.livenessProbe.initialDelaySeconds`         | Webserver LivenessProbe initial delay                                                                        | `15`                                              |
 | `webserver.livenessProbe.timeoutSeconds`              | Webserver LivenessProbe timeout seconds                                                                      | `30`                                              |
 | `webserver.livenessProbe.failureThreshold`            | Webserver LivenessProbe failure threshold                                                                    | `20`                                              |
 | `webserver.livenessProbe.periodSeconds`               | Webserver LivenessProbe period seconds                                                                       | `5`                                               |
+| `webserver.readinessProbe.path`                       | Webserver ReadinessProbe path (need to match your webserver base_url)                                         | `/health`                                              |
+| `webserver.readinessProbe.host`                       | Webserver ReadinessProbe host header (need to match your webserver base_url)                                  | `~`                                              |

Review comment:
       Do we ever need different values here -- they are controlled by the same airflow.cfg so these two values should always be the same, right?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ecerulm commented on a change in pull request #12634: Allow customization of probes path and host

Posted by GitBox <gi...@apache.org>.
ecerulm commented on a change in pull request #12634:
URL: https://github.com/apache/airflow/pull/12634#discussion_r553331228



##########
File path: chart/README.md
##########
@@ -208,10 +208,14 @@ The following tables lists the configurable parameters of the Airflow chart and
 | `scheduler.serviceAccountAnnotations`                 | Annotations to add to scheduler kubernetes service account                                                   | `{}`                                            |
 | `scheduler.extraVolumes`                              | Mount additional volumes into scheduler                                                                      | `[]`                                            |
 | `scheduler.extraVolumeMounts`                         | Mount additional volumes into scheduler                                                                      | `[]`                                            |
+| `webserver.livenessProbe.path`                        | Webserver LivenessProbe path (need to match your webserver base_url)                                         | `/health`                                              |
+| `webserver.livenessProbe.host`                        | Webserver LivenessProbe host header (need to match your webserver base_url)                                  | `~`                                              |
 | `webserver.livenessProbe.initialDelaySeconds`         | Webserver LivenessProbe initial delay                                                                        | `15`                                              |
 | `webserver.livenessProbe.timeoutSeconds`              | Webserver LivenessProbe timeout seconds                                                                      | `30`                                              |
 | `webserver.livenessProbe.failureThreshold`            | Webserver LivenessProbe failure threshold                                                                    | `20`                                              |
 | `webserver.livenessProbe.periodSeconds`               | Webserver LivenessProbe period seconds                                                                       | `5`                                               |
+| `webserver.readinessProbe.path`                       | Webserver ReadinessProbe path (need to match your webserver base_url)                                         | `/health`                                              |
+| `webserver.readinessProbe.host`                       | Webserver ReadinessProbe host header (need to match your webserver base_url)                                  | `~`                                              |

Review comment:
       Yes, the values will be the same, and they need to be "in sync" also with `.webserver.base_url` in `airflow.cfg`. So now I changed so that it extract the host and path from the `webserver.base_url` if provided.
   




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ecerulm commented on pull request #12634: Allow customization of probes path and host

Posted by GitBox <gi...@apache.org>.
ecerulm commented on pull request #12634:
URL: https://github.com/apache/airflow/pull/12634#issuecomment-734250669


   @mik-laj since you are reviewing #12619 , I guess it make sense if you review #12630 and #12634 as all of them are about getting ingresses to work properly.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #12634: Allow customization of probes path and host

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #12634:
URL: https://github.com/apache/airflow/pull/12634#issuecomment-756800176


   The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest master or amend the last commit of the PR, and push it with --force-with-lease.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk merged pull request #12634: Allow customization of probes path and host

Posted by GitBox <gi...@apache.org>.
potiuk merged pull request #12634:
URL: https://github.com/apache/airflow/pull/12634


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #12634: Allow customization of probes path and host

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #12634:
URL: https://github.com/apache/airflow/pull/12634#issuecomment-756800176


   The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest master or amend the last commit of the PR, and push it with --force-with-lease.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ecerulm commented on pull request #12634: Allow customization of probes path and host

Posted by GitBox <gi...@apache.org>.
ecerulm commented on pull request #12634:
URL: https://github.com/apache/airflow/pull/12634#issuecomment-754752554


   @ashb , since you are reviewing #12630 maybe you should also take a look to this one, since both are related ultimately to the helm chart ingresses


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ecerulm commented on pull request #12634: Allow customization of probes path and host

Posted by GitBox <gi...@apache.org>.
ecerulm commented on pull request #12634:
URL: https://github.com/apache/airflow/pull/12634#issuecomment-756192360


   No problem, changed the `self.assert*` into `assert xxx`


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org