File tree Expand file tree Collapse file tree 9 files changed +193
-3
lines changed
Expand file tree Collapse file tree 9 files changed +193
-3
lines changed Original file line number Diff line number Diff line change 1+ {% if test_scenario ['values' ]['persistence' ] == 'postgres' %}
2+ ---
3+ apiVersion: kuttl.dev/v1beta1
4+ kind: TestAssert
5+ timeout: 600
6+ ---
7+ apiVersion: apps/v1
8+ kind: StatefulSet
9+ metadata:
10+ name: postgresql
11+ status:
12+ readyReplicas: 1
13+ replicas: 1
14+ {% endif %}
Original file line number Diff line number Diff line change 1+ {% if test_scenario ['values' ]['persistence' ] == 'postgres' %}
2+ ---
3+ apiVersion: kuttl.dev/v1beta1
4+ kind: TestStep
5+ timeout: 300
6+ commands:
7+ - script: >-
8+ helm upgrade postgresql
9+ --install
10+ --version=12.5.6
11+ --namespace $NAMESPACE
12+ -f 01_helm-bitnami-postgresql-values.yaml
13+ --repo https://charts.bitnami.com/bitnami postgresql
14+ {% endif %}
Original file line number Diff line number Diff line change 1+ ---
2+ global:
3+ security:
4+ allowInsecureImages: true # needed starting with Chart version 16.3.0 if modifying images
5+
6+ image:
7+ repository: bitnamilegacy/postgresql
8+
9+ volumePermissions:
10+ enabled: false
11+ image:
12+ repository: bitnamilegacy/os-shell
13+ securityContext:
14+ runAsUser: auto
15+
16+ metrics:
17+ image:
18+ repository: bitnamilegacy/postgres-exporter
19+
20+ primary:
21+ extendedConfiguration: |
22+ password_encryption=md5
23+ podSecurityContext:
24+ {% if test_scenario ['values' ]['openshift' ] == 'true' %}
25+ enabled: false
26+ {% else %}
27+ enabled: true
28+ {% endif %}
29+ containerSecurityContext:
30+ enabled: false
31+ resources:
32+ requests:
33+ memory: "512Mi"
34+ cpu: "512m"
35+ limits:
36+ memory: "512Mi"
37+ cpu: "1"
38+
39+ auth:
40+ username: trino-lb
41+ password: trino-lb
42+ database: trino_lb
Original file line number Diff line number Diff line change 1+ {% if test_scenario ['values' ]['persistence' ] == 'redis' %}
2+ ---
3+ apiVersion: kuttl.dev/v1beta1
4+ kind: TestAssert
5+ timeout: 360
6+ ---
7+ apiVersion: apps/v1
8+ kind: StatefulSet
9+ metadata:
10+ name: redis-master
11+ status:
12+ readyReplicas: 1
13+ replicas: 1
14+ ---
15+ apiVersion: apps/v1
16+ kind: StatefulSet
17+ metadata:
18+ name: redis-replicas
19+ status:
20+ readyReplicas: 1
21+ replicas: 1
22+ {% endif %}
Original file line number Diff line number Diff line change 1+ {% if test_scenario ['values' ]['persistence' ] == 'redis' %}
2+ ---
3+ apiVersion: kuttl.dev/v1beta1
4+ kind: TestStep
5+ commands:
6+ - script: >-
7+ helm install redis
8+ --namespace $NAMESPACE
9+ --version 17.11.3
10+ -f 02_helm-bitnami-redis-values.yaml
11+ --repo https://charts.bitnami.com/bitnami redis
12+ --wait
13+ timeout: 600
14+ {% endif %}
Original file line number Diff line number Diff line change 1+ ---
2+ global:
3+ security:
4+ allowInsecureImages: true # needed starting with Chart version 20.5.0 if modifying images
5+ image:
6+ repository: bitnamilegacy/redis
7+ sentinel:
8+ image:
9+ repository: bitnamilegacy/redis-sentinel
10+ metrics:
11+ image:
12+ repository: bitnamilegacy/redis-exporter
13+ kubectl:
14+ image:
15+ repository: bitnamilegacy/kubectl
16+ sysctl:
17+ image:
18+ repository: bitnamilegacy/os-shell
19+
20+ volumePermissions:
21+ enabled: false
22+ image:
23+ repository: bitnamilegacy/os-shell
24+ containerSecurityContext:
25+ runAsUser: auto
26+
27+ master:
28+ podSecurityContext:
29+ {% if test_scenario ['values' ]['openshift' ] == 'true' %}
30+ enabled: false
31+ {% else %}
32+ enabled: true
33+ {% endif %}
34+ containerSecurityContext:
35+ enabled: false
36+ resources:
37+ requests:
38+ memory: "128Mi"
39+ cpu: "200m"
40+ limits:
41+ memory: "128Mi"
42+ cpu: "800m"
43+
44+ replica:
45+ replicaCount: 1
46+ podSecurityContext:
47+ {% if test_scenario ['values' ]['openshift' ] == 'true' %}
48+ enabled: false
49+ {% else %}
50+ enabled: true
51+ {% endif %}
52+ containerSecurityContext:
53+ enabled: false
54+ resources:
55+ requests:
56+ memory: "128Mi"
57+ cpu: "100m"
58+ limits:
59+ memory: "128Mi"
60+ cpu: "400m"
61+
62+ auth:
63+ password: redis
Original file line number Diff line number Diff line change @@ -5,7 +5,15 @@ trinoLb:
55 certPemFile: /certificates/cert.pem
66 keyPemFile: /certificates/key.pem
77 persistence:
8+ {% if test_scenario ['values' ]['persistence' ] == 'inMemory' %}
89 inMemory: {}
10+ {% elif test_scenario ['values' ]['persistence' ] == 'redis' %}
11+ redis:
12+ endpoint: redis://:redis@redis-master:6379
13+ {% elif test_scenario ['values' ]['persistence' ] == 'postgres' %}
14+ postgres:
15+ url: postgres://trino-lb:trino-lb@postgresql/trino_lb
16+ {% endif %}
917trinoClusterGroups:
1018 default:
1119 maxRunningQueries: 1
Original file line number Diff line number Diff line change @@ -5,7 +5,15 @@ trinoLb:
55 certPemFile: /certificates/cert.pem
66 keyPemFile: /certificates/key.pem
77 persistence:
8+ {% if test_scenario ['values' ]['persistence' ] == 'inMemory' %}
89 inMemory: {}
10+ {% elif test_scenario ['values' ]['persistence' ] == 'redis' %}
11+ redis:
12+ endpoint: redis://:redis@redis-master:6379
13+ {% elif test_scenario ['values' ]['persistence' ] == 'postgres' %}
14+ postgres:
15+ url: postgres://trino-lb:trino-lb@postgresql/trino_lb
16+ {% endif %}
917trinoClusterGroups:
1018 s:
1119 maxRunningQueries: 1
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ dimensions:
66 - name : trino
77 values :
88 - " 451"
9- - " 470"
9+ # - "470" # Reduce test count
1010 - " 476"
1111 # To use a custom image, add a comma and the full name after the product version
1212 # - 470,oci.stackable.tech/sdp/trino:470-stackable0.0.0-dev
@@ -21,12 +21,17 @@ dimensions:
2121 values :
2222 - " true"
2323 - " false"
24+ - name : persistence
25+ values :
26+ - inMemory
27+ - redis
28+ - postgres
2429tests :
2530 - name : smoke
2631 dimensions :
2732 - trino-lb
2833 - trino
34+ - persistence
2935
3036# TODOS
31- # 1. Test storage backend redis and postgres
32- # a. Also restart trino-lb deployment to make sure persistence is kept
37+ # 1. Restart trino-lb deployment to make sure persistence is kept
You can’t perform that action at this time.
0 commit comments