Skip to content

Commit

Permalink
replace dependencies with openshift-relevant scripts (#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
adwk67 authored Nov 8, 2024
1 parent 774f62b commit b694188
Show file tree
Hide file tree
Showing 8 changed files with 137 additions and 41 deletions.
20 changes: 0 additions & 20 deletions tests/templates/kuttl/overrides/00-assert.yaml.j2

This file was deleted.

21 changes: 0 additions & 21 deletions tests/templates/kuttl/overrides/00-install-dbs.yaml.j2

This file was deleted.

14 changes: 14 additions & 0 deletions tests/templates/kuttl/overrides/05-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
apiVersion: kuttl.dev/v1beta1
kind: TestAssert
metadata:
name: test-airflow-postgresql
timeout: 480
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: airflow-postgresql
status:
readyReplicas: 1
replicas: 1
12 changes: 12 additions & 0 deletions tests/templates/kuttl/overrides/05-install-postgresql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- script: >-
helm install airflow-postgresql
--namespace $NAMESPACE
--version 12.5.6
-f helm-bitnami-postgresql-values.yaml
--repo https://charts.bitnami.com/bitnami postgresql
--wait
timeout: 600
24 changes: 24 additions & 0 deletions tests/templates/kuttl/overrides/07-assert.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{% if test_scenario['values']['executor'] == 'celery' %}
---
apiVersion: kuttl.dev/v1beta1
kind: TestAssert
metadata:
name: test-airflow-redis
timeout: 360
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: airflow-redis-master
status:
readyReplicas: 1
replicas: 1
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: airflow-redis-replicas
status:
readyReplicas: 1
replicas: 1
{% endif %}
14 changes: 14 additions & 0 deletions tests/templates/kuttl/overrides/07-install-redis.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{% if test_scenario['values']['executor'] == 'celery' %}
---
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- script: >-
helm install airflow-redis
--namespace $NAMESPACE
--version 17.11.3
-f helm-bitnami-redis-values.yaml
--repo https://charts.bitnami.com/bitnami redis
--wait
timeout: 600
{% endif %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
volumePermissions:
enabled: false
securityContext:
runAsUser: auto

primary:
podSecurityContext:
{% if test_scenario['values']['openshift'] == 'true' %}
enabled: false
{% else %}
enabled: true
{% endif %}
containerSecurityContext:
enabled: false
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "128Mi"
cpu: "400m"
shmVolume:
chmod:
enabled: false

auth:
username: airflow
password: airflow
database: airflow
43 changes: 43 additions & 0 deletions tests/templates/kuttl/overrides/helm-bitnami-redis-values.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
volumePermissions:
enabled: false
containerSecurityContext:
runAsUser: auto

master:
podSecurityContext:
{% if test_scenario['values']['openshift'] == 'true' %}
enabled: false
{% else %}
enabled: true
{% endif %}
containerSecurityContext:
enabled: false
resources:
requests:
memory: "128Mi"
cpu: "200m"
limits:
memory: "128Mi"
cpu: "800m"

replica:
replicaCount: 1
podSecurityContext:
{% if test_scenario['values']['openshift'] == 'true' %}
enabled: false
{% else %}
enabled: true
{% endif %}
containerSecurityContext:
enabled: false
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "128Mi"
cpu: "400m"

auth:
password: redis

0 comments on commit b694188

Please sign in to comment.