You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Vedrillan (via GitHub)" <gi...@apache.org> on 2023/07/10 07:59:33 UTC

[GitHub] [airflow] Vedrillan opened a new issue, #32482: Template issue when used as sub chart

Vedrillan opened a new issue, #32482:
URL: https://github.com/apache/airflow/issues/32482

   ### Official Helm Chart version
   
   1.10.0 (latest released)
   
   ### Apache Airflow version
   
   2.6.2
   
   ### Kubernetes Version
   
   1.24.10
   
   ### Helm Chart configuration
   
   _No response_
   
   ### Docker Image customizations
   
   _No response_
   
   ### What happened
   
   I tried to deploy the airflow helm chart as a sub chart and some templating error arises.
   
   ```
   Error: template: infra-helm/charts/airflow/templates/_helpers.yaml:504:16: executing "redis.serviceAccountName" at <.Values.redis.serviceAccount.create>: nil pointer evaluating interface {}.serviceAccount
   ```
   
   When I try to deploy the helm chart directly there is no such error and everything works as expected.
   
   ### What you think should happen instead
   
   _No response_
   
   ### How to reproduce
   
   Deploy the airflow helm chart as a dependency of another chart.
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org.apache.org

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


[GitHub] [airflow] github-actions[bot] closed issue #32482: Template issue when used as sub chart

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #32482: Template issue when used as sub chart
URL: https://github.com/apache/airflow/issues/32482


-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] Vedrillan commented on issue #32482: Template issue when used as sub chart

Posted by "Vedrillan (via GitHub)" <gi...@apache.org>.
Vedrillan commented on issue #32482:
URL: https://github.com/apache/airflow/issues/32482#issuecomment-1632525732

   The issue disappear if I set these values:
   ```yaml
   oauth2-proxy:
     redis:
       serviceAccount:
         create: false
   ```
   
   This is actually maybe a bug with helm, values of subcharts should be namespaced and not mixed like that.
   
   So I don't think this has anything to do with the airflow chart, I will report this on the helm repo see what they think about this.


-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] Vedrillan commented on issue #32482: Template issue when used as sub chart

Posted by "Vedrillan (via GitHub)" <gi...@apache.org>.
Vedrillan commented on issue #32482:
URL: https://github.com/apache/airflow/issues/32482#issuecomment-1630246032

   @rzjfr sure here are all the info
   
   I am using helm v3.12.0.
   
   The main Chart.yml looks something like this:
   ```
   apiVersion: v2
   name: infra-helm
   description: infrastructure bundle for install and maintaining kubernetes clusters
   type: application
   version: "1.0.0"
   appVersion: "2023-04-06"
   dependencies:
     - condition: airflow.enabled
       name: airflow
       repository: https://airflow.apache.org
       version: 1.10.0
   ```
   
   Ofc it has more dependencies but I do not think it make much difference to have them or not.
   
   The values are spread across 3 files, 1 global, 1 for env and 1 for sensitive data, but once "merged" it should be like this:
   ```
   airflow:
     enabled: true
     ingress:
       web:
         enabled: true
         hosts:
           - name: "airflow.example.com"
             tls:
               enabled: true
               secretName: "airflow-web-tls"
         annotations:
           nginx.ingress.kubernetes.io/whitelist-source-range: 0.0.0.0/0
           nginx.ingress.kubernetes.io/service-upstream: "true"
           kubernetes.io/tls-acme: "true"
     webserver:
       defaultUser:
         role: Admin
         username: admin
         email: test@example.com
         firstName: John
         lastName: Doe
         password: "xXx"
     executor: "KubernetesExecutor"
     logs:
       persistence:
         enabled: true
     redis:
       enabled: false
   ```
   
   Then I run the upgrade with helm `helm upgrade -n clusterwide infra-helm . -f values.d/staging.yaml -f values.d/staging.secret.yaml --reset-values --atomic --debug --install --create-namespace` and finally get the error previously mentioned.


-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] Vedrillan commented on issue #32482: Template issue when used as sub chart

Posted by "Vedrillan (via GitHub)" <gi...@apache.org>.
Vedrillan commented on issue #32482:
URL: https://github.com/apache/airflow/issues/32482#issuecomment-1632092312

   Yes I tried to clean everything up and fetch again the dependencies but the issue persists.
   
   I also notice I have the same version of helm as you but it was built with a slightly higher version of go
   `version.BuildInfo{Version:"v3.12.0", GitCommit:"c9f554d75773799f72ceef38c51210f1842a1dea", GitTreeState:"clean", GoVersion:"go1.20.4"}`
   Maybe this is linked, maybe not. However It would be very surprising that a patch version creates this issue.
   
   I might have another lead to investigate, there is a redis server already deployed in the same namespace by another chart, maybe their values for redis are conflicting in some way, I'll have a look and let you know of my findings.


-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] Vedrillan commented on issue #32482: Template issue when used as sub chart

Posted by "Vedrillan (via GitHub)" <gi...@apache.org>.
Vedrillan commented on issue #32482:
URL: https://github.com/apache/airflow/issues/32482#issuecomment-1632165859

   I find out that it is actually conflicting with the oauth2-proxy chart from bitnami, which include a dependency to redis.
   
   Maybe you can reproduce by adding it as well:
   ```yaml
   dependencies:
     - name: oauth2-proxy
       repository: https://charts.bitnami.com/bitnami
       version: 3.7.1
     - name: airflow
       repository: https://airflow.apache.org
       version: 1.10.0
   ```
   
   Now the question is "why".


-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] github-actions[bot] commented on issue #32482: Template issue when used as sub chart

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #32482:
URL: https://github.com/apache/airflow/issues/32482#issuecomment-1685136604

   This issue has been closed because it has not received response from the issue author.


-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] rzjfr commented on issue #32482: Template issue when used as sub chart

Posted by "rzjfr (via GitHub)" <gi...@apache.org>.
rzjfr commented on issue #32482:
URL: https://github.com/apache/airflow/issues/32482#issuecomment-1632016938

   From what I understand before trying to fix the error, you should not get that error to begin with if you're helm version is >= 3.5.x (which is compiled with newer version of go) and there is no circumstance that results in empty values for some keys. 
   
   Maybe one last thing to try would be deleting `infra-helm/charts` folder and do a `helm dependency update infra-helm` and check if the issue exists, could you please confirm that also? With the same minimal setup in the previous step to remove possible conflict in values in induced by the upper level chart.


-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] github-actions[bot] commented on issue #32482: Template issue when used as sub chart

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #32482:
URL: https://github.com/apache/airflow/issues/32482#issuecomment-1675550720

   This issue has been automatically marked as stale because it has been open for 30 days with no response from the author. It will be closed in next 7 days if no further activity occurs from the issue author.


-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] Vedrillan commented on issue #32482: Template issue when used as sub chart

Posted by "Vedrillan (via GitHub)" <gi...@apache.org>.
Vedrillan commented on issue #32482:
URL: https://github.com/apache/airflow/issues/32482#issuecomment-1631999820

   Even without any values I still have the same issue, so I played around with the `_helpers.yaml` file and found out, following similar issues on the web, that this change fixes the issue:
   
   ```diff
    {{/* Create the name of the redis service account to use */}}
    {{- define "redis.serviceAccountName" -}}
   -  {{- if .Values.redis.serviceAccount.create }}
   +  {{- if (.Values.redis).serviceAccount.create }}
        {{- default (printf "%s-redis" (include "airflow.fullname" .)) .Values.redis.serviceAccount.name }}
      {{- else }}
   -    {{- default "default" .Values.redis.serviceAccount.name }}
   +    {{- default "default" (.Values.redis).serviceAccount.name }}
      {{- end }}
    {{- end }}
   
   ```
   
   I still don't understand why this is happening only on the `redis` part but this seems to be a not so rare issue and not that well understood either x)


-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] rzjfr commented on issue #32482: Template issue when used as sub chart

Posted by "rzjfr (via GitHub)" <gi...@apache.org>.
rzjfr commented on issue #32482:
URL: https://github.com/apache/airflow/issues/32482#issuecomment-1628917469

   @Vedrillan I've seen these type of issues on other helm charts in the past, would you please share output of `helm version`,
   If it's >= 3.5.x then also the full command you are running to do the helm install/template and also  stanza of `dependencies` in your `infra-helm/Chart.yaml` and `airflow` in `infra-helm/values.yaml` if they exist?
   
   I can try to reproduce the issue.


-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] rzjfr commented on issue #32482: Template issue when used as sub chart

Posted by "rzjfr (via GitHub)" <gi...@apache.org>.
rzjfr commented on issue #32482:
URL: https://github.com/apache/airflow/issues/32482#issuecomment-1632194524

   Now it makes more sense to me at least. The issue should be resolved if the both keys are set, with something like:
   
   ```
   airflow:
     redis:
       enabled: true
   oauth2-proxy:
     redis:
       enabled: false
   ```
   
   I might have another look to see if I can propose something. Unfortunately https://github.com/apache/airflow/issues/32482#issuecomment-1631999820 might lead to unexpected outcomes.


-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] rzjfr commented on issue #32482: Template issue when used as sub chart

Posted by "rzjfr (via GitHub)" <gi...@apache.org>.
rzjfr commented on issue #32482:
URL: https://github.com/apache/airflow/issues/32482#issuecomment-1630377418

   @Vedrillan I tried with `version.BuildInfo{Version:"v3.12.0", GitCommit:"c9f554d75773799f72ceef38c51210f1842a1dea", GitTreeState:"clean", GoVersion:"go1.20.3"}` and exact same setup and command still couldn't reproduce the issue.
   
   From what I understand from the error, somehow portion of the final values tree populated to be empty, Would you please try to strip the values file to only and the setup to a minimal one and check if helm template for example still gives the same error?


-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] boring-cyborg[bot] commented on issue #32482: Template issue when used as sub chart

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #32482:
URL: https://github.com/apache/airflow/issues/32482#issuecomment-1628434556

   Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
   


-- 
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: commits-unsubscribe@airflow.apache.org

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