Skip to content

Commit 139d41a

Browse files
authored
Merge pull request #222 from bcgov/chore/more-tuning
Chore/more tuning
2 parents e940a06 + 68cb46d commit 139d41a

File tree

5 files changed

+45
-12
lines changed

5 files changed

+45
-12
lines changed

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
context: .
5353
dockerfile_path: Dockerfile
5454
github_token: ${{ secrets.GITHUB_TOKEN }}
55-
chart_version: 3.0.0
55+
chart_version: 3.1.0
5656
is_chart_release: true
5757
cas-airflow-dag-trigger-build:
5858
needs: [release]

docs/deployment-troubleshooting.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Airflow upgrade deployment troubleshooting
2+
3+
If DAG tasks are failing for no apparent reason or are giving 401/403 or authentication errors, it may be due to the `cas-airflow-admin` user not updating correctly. You can attempt to fix this by cycling the Airflow pods, or by deleting the `cas-airflow-admin` user and recreating it.
4+
5+
## Cycling the Airflow pods
6+
7+
To cycle the Airflow pods, you can use the following command (replace `airflow-dev` with the namespace you are using):
8+
9+
```bash
10+
oc -n airflow-dev rollout restart deployment cas-airflow-api-server
11+
oc -n airflow-dev rollout restart deployment cas-airflow-dag-processor
12+
oc -n airflow-dev rollout restart deployment cas-airflow-scheduler
13+
```
14+
15+
This will restart the Airflow pods, which may resolve the issue. If not, delete and recreate the `cas-airflow-admin` user as below.
16+
17+
## Recreating the `cas-airflow-admin` user
18+
19+
### Delete the `cas-airflow-admin` user
20+
21+
To delete the `cas-airflow-admin` user, connect to the terminal of one of the airflow pods' (ie. `cas-airflow-api-server-yyyyy-zzzzz`) and run the following command:
22+
23+
```bash
24+
airflow users delete --username "cas-airflow-admin"
25+
```
26+
27+
### Create a new `cas-airflow-admin` user
28+
29+
To recreate the `cas-airflow-admin` user, you can use the following command:
30+
31+
```bash
32+
airflow users create --username "cas-airflow-admin" --firstname admin --lastname user --role Admin --email admin@example.com
33+
```
34+
35+
After this you will be prompted to enter a password for the `cas-airflow-admin` user. Use the password set in the `airflow-default-user-password` secret.

helm/cas-airflow-postgres-cluster/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ postgresCluster:
1313
requests:
1414
cpu: 100m
1515
memory: 256Mi
16+
storageSize: 5Gi
1617

1718
# The "users" value(s) is passed to the crunch postgres operator to create the database.
1819
# See http://access.crunchydata.com/documentation/postgres-operator/latest/tutorials/basic-setup/user-management

helm/cas-airflow/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: cas-airflow
33
type: application
4-
version: 3.0.0 # Changing this requires updating the image tag in .github/workflows/release.yaml
4+
version: 3.1.0 # Changing this requires updating the image tag in .github/workflows/release.yaml
55
appVersion: 3.1.2 # The airflow version
66
description: Helm chart to deploy cas' flavour of airflow, compatible with OpenShift 4. This chart uses the vanilla airflow chart and adds cas' own templates and values.
77
icon: https://www.astronomer.io/static/airflowNewA.png

helm/cas-airflow/values.yaml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,7 @@ airflow:
115115
resources:
116116
requests:
117117
cpu: 50m
118-
memory: 700Mi
119-
limits:
120-
cpu: 500m
121-
memory: 2Gi
118+
memory: 400Mi
122119
defaultUser:
123120
enabled: true
124121
role: Admin
@@ -146,9 +143,9 @@ airflow:
146143
# Airflow scheduler settings
147144
scheduler:
148145
resources:
149-
limits:
150-
cpu: 500m
151-
memory: 1.3Gi
146+
requests:
147+
cpu: 50m
148+
memory: 600Mi
152149
extraVolumes:
153150
- name: cas-airflow-dynamic-dags
154151
persistentVolumeClaim:
@@ -163,9 +160,9 @@ airflow:
163160
# Airflow dag processor settings
164161
dagProcessor:
165162
resources:
166-
limits:
167-
cpu: 500m
168-
memory: 1Gi
163+
requests:
164+
cpu: 50m
165+
memory: 800Mi
169166
extraVolumes:
170167
- name: cas-airflow-dynamic-dags
171168
persistentVolumeClaim:

0 commit comments

Comments
 (0)