airflow-helm / charts

The User-Community Airflow Helm Chart is the standard way to deploy Apache Airflow on Kubernetes with Helm. Originally created in 2017, it has since helped thousands of companies create production-ready deployments of Airflow on Kubernetes.
https://github.com/airflow-helm/charts/tree/main/charts/airflow
Apache License 2.0
665 stars 476 forks source link

Operation cannot be fulfilled on persistentvolumeclaims "airflow-logs" #880

Closed hueiyuan closed 2 months ago

hueiyuan commented 2 months ago

Checks

Chart Version

8.9.0

Kubernetes Version

Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.15", GitCommit:"1d79bc3bcccfba7466c44cc2055d6e7442e140ea", GitTreeState:"clean", BuildDate:"2022-09-21T12:18:10Z", GoVersion:"go1.16.15", Compiler:"gc", Platform:"darwin/arm64"}
Server Version: version.Info{Major:"1", Minor:"29+", GitVersion:"v1.29.6-eks-db838b0", GitCommit:"c978c80de3b482f1f425d408772311592917aa4e", GitTreeState:"clean", BuildDate:"2024-06-27T19:09:52Z", GoVersion:"go1.21.11", Compiler:"gc", Platform:"linux/amd64"}

Helm Version

version.BuildInfo{Version:"v3.13.3", GitCommit:"c8b948945e52abba22ff885446a1486cb5fd3474", GitTreeState:"clean", GoVersion:"go1.21.5"}

Description

When I try to enable log persistence, and I always get this error message:

running PreBind plugin "VolumeBinding": Operation cannot be fulfilled on persistentvolumeclaims "airflow-logs": the object has been modified; please apply your changes to the latest version and try again

My helm is deployed to AWS EKS, and also check stoageClass is existed Does anyone know how to solve it?

Relevant Logs

running PreBind plugin "VolumeBinding": Operation cannot be fulfilled on persistentvolumeclaims "airflow-logs": the object has been modified; please apply your changes to the latest version and try again

Custom Helm Values

airflow:
logs:
  ## the airflow logs folder
  ##
  path: /opt/airflow/logs

  # configs for the logs PVC
  #
  persistence:
    ## if a persistent volume is mounted at `logs.path`
    ##
    enabled: true

    ## the name of an existing PVC to use
    ##
    # existingClaim: ""

    ## sub-path under `logs.persistence.existingClaim` to use
    ##
    # subPath: ""

    ## the name of the StorageClass used by the PVC
    ## - if set to "", then `PersistentVolumeClaim/spec.storageClassName` is omitted
    ## - if set to "-", then `PersistentVolumeClaim/spec.storageClassName` is set to ""
    ##
    storageClass: "gp3-encrypted"

    ## the access mode of the PVC
    ## - [WARNING] must be "ReadWriteMany" or airflow pods will fail to start
    ##
    accessMode: ReadWriteMany

    ## the size of PVC to request
    ##
    size: 50Gi
hueiyuan commented 2 months ago

The root cause that our storageClass is based on AWS EBS so that can not support ReadWriteMany accessMode. The solution is creating AWS EFS based storageClass and set it to airflow helm values.yaml, that's work.