Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .vib/airflow/cypress/cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
module.exports = {
viewportWidth: 1920,
viewportHeight: 1080,
chromeWebSecurity: false,
pageLoadTimeout: 240000,
defaultCommandTimeout: 80000,
env: {
username: 'user',
password: 'ComplicatedPassword123!4',
baseUrl: 'http://vmware-airflow.my',
},
e2e: {
setupNodeEvents(on, config) {},
baseUrl: 'http://localhost',
},
hosts: {
'vmware-airflow.my': '{{ TARGET_IP }}',
},
}
22 changes: 13 additions & 9 deletions .vib/airflow/cypress/cypress/e2e/airflow.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,22 @@ import { random } from '../support/utils';
it('allows triggering execution of a sample DAG', () => {
cy.login();
cy.fixture('DAGs').then((dags) => {
cy.visit(`dags/${dags.triggered.id}/grid`);
cy.get('[aria-label="Trigger DAG"]').click({force: true});
cy.visit(`/dags/${dags.triggered.id}`);
cy.get('[aria-label="Trigger Dag"]').click({force: true});
// Trigger button text is prefixed by a white space
cy.get('button').contains(' Trigger').click({force: true});

// Verify the DAG appears in the list of active jobs
cy.visit('home?status=active');
cy.get(`[href='/dags/${dags.triggered.id}/grid']`);
// Verify the DAG was scheduled
cy.wait(3000);
cy.visit('/dags');
cy.get(`[href='/dags/${dags.triggered.id}']`);
cy.get('div').contains(new Date().toISOString().split('T')[0]);
});
});

it('allows to create a user', () => {
cy.login();
cy.visit('users/add');
cy.visit('/auth/users/add');
cy.fixture('users').then((users) => {
cy.get('#first_name').type(users.newUser.firstName);
cy.get('#last_name').type(users.newUser.lastName);
Expand All @@ -30,8 +34,8 @@ it('allows to create a user', () => {
cy.get('#password').type(users.newUser.password);
cy.get('#conf_password').type(users.newUser.password);
cy.contains('Save').click();

// Verify the user was created successfully
cy.contains('div', 'Added Row');
});
// Verify the user was created successfully
cy.visit('/auth/users/add');
cy.contains('div', 'Added Row');
});
23 changes: 16 additions & 7 deletions .vib/airflow/cypress/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,22 @@ for (const command of ['click']) {
});
}

// Due to a bug when using "hosts" in Cypress, we cannot set a "baseUrl" in the
// cypress.json file. Workaround this by modifying the "visit" command to preprend
// the base URL.
//
// Further details: https://github.com/cypress-io/cypress/issues/20647
Cypress.Commands.overwrite('visit', (originalFn, url, options) => {
// Only replace relative URLs
const targetUrl = url.includes('://') ? url : `${Cypress.env('baseUrl')}${url}`;
return originalFn(targetUrl, options);
});


Cypress.Commands.add(
'login',
(username = Cypress.env('username'), password = Cypress.env('password')) => {
cy.visit('/login');
cy.visit('/');
// Wait for DOM content to load
cy.wait(5000);
cy.get('form[name="login"]').should('exist').and('be.visible'); // Needed to ensure stability of the test
Expand All @@ -31,9 +43,6 @@ Cypress.Commands.add(
);

Cypress.on('uncaught:exception', (err, runnable) => {
if (
err.message.includes('Cannot set properties of undefined')
) {
return false;
}
});
// Skip all exceptions
return false;
});
6 changes: 6 additions & 0 deletions .vib/airflow/runtime-parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ scheduler:
periodSeconds: 30
timeoutSeconds: 20
web:
baseUrl: 'http://vmware-airflow.my'
extraConfiguration: |
# Theme CONFIG
APP_THEME = "amelia.css"
Expand All @@ -39,6 +40,11 @@ web:
fsGroup: 1002
containerSecurityContext:
runAsUser: 1002
# Give some extra time for the service to start
startupProbe:
enabled: true
failureThreshold: 30
periodSeconds: 10
worker:
podSecurityContext:
fsGroup: 1002
Expand Down
3 changes: 2 additions & 1 deletion .vib/airflow/vib-verify.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@
"resources": {
"path": "/.vib/airflow/cypress"
},
"endpoint": "lb-airflow-http",
"endpoint": "lb-airflow-web-http",
"app_protocol": "HTTP",
"port": 80,
"env": {
"username": "user",
"password": "ComplicatedPassword123!4"
Expand Down
8 changes: 6 additions & 2 deletions bitnami/airflow/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Changelog

## 22.7.3 (2025-04-21)
## 23.0.0 (2025-04-29)

* [bitnami/airflow] Release 22.7.3 ([#33087](https://github.com/bitnami/charts/pull/33087))
* [bitnami/airflow] Release 23.0.0 ([#33141](https://github.com/bitnami/charts/pull/33141))

## <small>22.7.3 (2025-04-21)</small>

* [bitnami/airflow] Release 22.7.3 (#33087) ([c62ad9b](https://github.com/bitnami/charts/commit/c62ad9b97dad33d09d2888d21066d9d25cafeed5)), closes [#33087](https://github.com/bitnami/charts/issues/33087)

## <small>22.7.2 (2025-03-25)</small>

Expand Down
6 changes: 3 additions & 3 deletions bitnami/airflow/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
dependencies:
- name: redis
repository: oci://registry-1.docker.io/bitnamicharts
version: 20.12.1
version: 20.13.1
- name: postgresql
repository: oci://registry-1.docker.io/bitnamicharts
version: 16.6.3
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
version: 2.30.0
digest: sha256:8cd79ef253d7a517de839fd46e82e8b482a5c790cd4adc0b901f5fd878f42a02
generated: "2025-04-21T01:13:19.809190595Z"
digest: sha256:9da8ff790e57d014ce6015b9dddb7de1dfddf14e592cdd148dd07fb760b1340b
generated: "2025-04-23T14:37:53.595077325Z"
6 changes: 3 additions & 3 deletions bitnami/airflow/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ annotations:
licenses: Apache-2.0
images: |
- name: airflow
image: docker.io/bitnami/airflow:2.10.5-debian-12-r11
image: docker.io/bitnami/airflow:3.0.0-debian-12-r2
- name: statsd-exporter
image: docker.io/bitnami/statsd-exporter:0.28.0-debian-12-r15
apiVersion: v2
appVersion: 2.10.5
appVersion: 3.0.0
dependencies:
- condition: redis.enabled
name: redis
Expand Down Expand Up @@ -40,4 +40,4 @@ maintainers:
name: airflow
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/airflow
version: 22.7.3
version: 23.0.0
29 changes: 25 additions & 4 deletions bitnami/airflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Bitnami charts configure credentials at first boot. Any further change in the se
- Update the password secret with the new values (replace the SECRET_NAME, PASSWORD, FERNET_KEY and SECRET_KEY placeholders)

```shell
kubectl create secret generic SECRET_NAME --from-literal=airflow-password=PASSWORD --from-literal=airflow-fernet-key=FERNET_KEY --from-literal=airflow-secret-key=SECRET_KEY --dry-run -o yaml | kubectl apply -f -
kubectl create secret generic SECRET_NAME --from-literal=airflow-password=PASSWORD --from-literal=airflow-fernet-key=FERNET_KEY --from-literal=airflow-secret-key=SECRET_KEY --from-literal=airflow-jwt-secret-key=JWT_SECRET_KEY --dry-run -o yaml | kubectl apply -f -
```

### Airflow configuration file
Expand Down Expand Up @@ -410,6 +410,7 @@ The Bitnami Airflow chart relies on the PostgreSQL chart persistence. This means
| `auth.password` | Password to access web UI | `""` |
| `auth.fernetKey` | Fernet key to secure connections | `""` |
| `auth.secretKey` | Secret key to run your flask app | `""` |
| `auth.jwtSecretKey` | JWT secret key to run your flask app | `""` |
| `auth.existingSecret` | Name of an existing secret to use for Airflow credentials | `""` |
| `executor` | Airflow executor. Allowed values: `SequentialExecutor`, `LocalExecutor`, `CeleryExecutor`, `KubernetesExecutor`, `CeleryKubernetesExecutor` and `LocalKubernetesExecutor` | `CeleryExecutor` |
| `loadExamples` | Switch to load some Airflow examples | `false` |
Expand Down Expand Up @@ -712,7 +713,7 @@ The Bitnami Airflow chart relies on the PostgreSQL chart persistence. This means

| Name | Description | Value |
| ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
| `dagProcessor.enabled` | Run Airflow Dag Processor Manager as a standalone component | `false` |
| `dagProcessor.enabled` | Run Airflow Dag Processor Manager as a standalone component | `true` |
| `dagProcessor.replicaCount` | Number of Airflow Dag Processor replicas | `1` |
| `dagProcessor.command` | Override default Airflow Dag Processor cmd | `[]` |
| `dagProcessor.args` | Override default Airflow Dag Processor args | `[]` |
Expand Down Expand Up @@ -806,7 +807,7 @@ The Bitnami Airflow chart relies on the PostgreSQL chart persistence. This means

| Name | Description | Value |
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- |
| `triggerer.enabled` | Run Airflow Triggerer as a standalone component | `false` |
| `triggerer.enabled` | Run Airflow Triggerer as a standalone component | `true` |
| `triggerer.defaultCapacity` | How many triggers a single Triggerer can run at once | `1000` |
| `triggerer.replicaCount` | Number of Airflow Triggerer replicas | `1` |
| `triggerer.command` | Override default Airflow Triggerer cmd | `[]` |
Expand Down Expand Up @@ -1287,6 +1288,26 @@ Find more information about how to deal with common errors related to Bitnami's

## Upgrading

### To 23.0.0

This major release adds support for Airflow `3.x.y` series. Additionally, previous Airflow `2.x.y` series can be deployed by setting the corresponding image parameters. The chart logic will detect which image version you are using, and it will generate the required Airflow configuration and Kubernetes objects.

We recommend following the next procedure in order to upgrade from `22.x.y` chart version to the `23.x.y` series, and also upgrade to Airflow `3.y.z` series:

- Upgrade your release (maintaining Airflow `2.x.y` series):

```console
helm upgrade airflow oci://REGISTRY_NAME/REPOSITORY_NAME/airflow --set image.tag=2
```

- Follow the recommended steps for the database backup and the DAGs files verification available at the [official "upgrading to Airflow 3" guide](https://airflow.apache.org/docs/apache-airflow/stable/installation/upgrading_to_airflow3.html).

- Upgrade your release now using the default Airflow `3.x.y` series:

```console
helm upgrade airflow oci://REGISTRY_NAME/REPOSITORY_NAME/airflow
```

### To 22.4.0

This version introduces image verification for security purposes. To disable it, set `global.security.allowInsecureImages` to `true`. More details at [GitHub issue](https://github.com/bitnami/charts/issues/30850).
Expand Down Expand Up @@ -1526,4 +1547,4 @@ Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
44 changes: 44 additions & 0 deletions bitnami/airflow/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,10 @@ Add environment variables to configure airflow common values
value: "cat /opt/bitnami/airflow/secrets/airflow-fernet-key"
- name: AIRFLOW__WEBSERVER__SECRET_KEY_CMD
value: "cat /opt/bitnami/airflow/secrets/airflow-secret-key"
{{- if (include "airflow.isImageMajorVersion3" .) }}
- name: AIRFLOW__API_AUTH__JWT_SECRET_CMD
value: "cat /opt/bitnami/airflow/secrets/airflow-jwt-secret-key"
{{- end }}
{{- else }}
- name: AIRFLOW__CORE__FERNET_KEY
valueFrom:
Expand All @@ -363,6 +367,13 @@ Add environment variables to configure airflow common values
secretKeyRef:
name: {{ include "airflow.secretName" . }}
key: airflow-secret-key
{{- if (include "airflow.isImageMajorVersion3" .) }}
- name: AIRFLOW__API_AUTH__JWT_SECRET_CMD
valueFrom:
secretKeyRef:
name: {{ include "airflow.secretName" . }}
key: airflow-jwt-secret-key
{{- end -}}
{{- end -}}
{{- end -}}

Expand Down Expand Up @@ -516,3 +527,36 @@ Ref: https://github.com/bitnami/charts/pull/6096#issuecomment-856499047
{{- define "airflow.worker.executor" -}}
{{- print (ternary "CeleryExecutor" .Values.executor (eq .Values.executor "CeleryKubernetesExecutor")) -}}
{{- end -}}

{{/*
Validates a semver constraint
*/}}
{{- define "airflow.semverCondition" -}}
{{- $constraint := .constraint -}}
{{- $imageVersion := (.imageVersion | toString) -}}

{{/* tag 'latest' is an special case, where we fall to .Chart.AppVersion value */}}
{{- if eq "latest" $imageVersion -}}
{{- $imageVersion = .context.Chart.AppVersion -}}
{{- else -}}
{{- $imageVersion = (index (splitList "-" $imageVersion) 0 ) -}}
{{- end -}}

{{- if semverCompare $constraint $imageVersion -}}
true
{{- end -}}
{{- end -}}

{{/*
Validates the image tag version is equal or higher than 3.0.0
*/}}
{{- define "airflow.isImageMajorVersion3" -}}
{{- include "airflow.semverCondition" (dict "constraint" "^3" "imageVersion" .Values.image.tag "context" $) -}}
{{- end -}}

{{/*
Validates the image tag version is equal or higher than 2.0.0
*/}}
{{- define "airflow.isImageMajorVersion2" -}}
{{- include "airflow.semverCondition" (dict "constraint" "^2" "imageVersion" .Values.image.tag "context" $) -}}
{{- end -}}
Loading
Loading