Skip to content

Commit

Permalink
Allow custom images in tests (#868)
Browse files Browse the repository at this point in the history
  • Loading branch information
lfrancke authored Oct 21, 2024
1 parent 3e0a1bb commit dc42c9b
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ metadata:
name: test-zk
spec:
image:
{% if test_scenario['values']['zookeeper-latest'].find(",") > 0 %}
custom: "{{ test_scenario['values']['zookeeper-latest'].split(',')[1] }}"
productVersion: "{{ test_scenario['values']['zookeeper-latest'].split(',')[0] }}"
{% else %}
productVersion: "{{ test_scenario['values']['zookeeper-latest'] }}"
{% endif %}
pullPolicy: IfNotPresent
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
clusterConfig:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ metadata:
name: test-zk
spec:
image:
{% if test_scenario['values']['zookeeper-latest'].find(",") > 0 %}
custom: "{{ test_scenario['values']['zookeeper-latest'].split(',')[1] }}"
productVersion: "{{ test_scenario['values']['zookeeper-latest'].split(',')[0] }}"
{% else %}
productVersion: "{{ test_scenario['values']['zookeeper-latest'] }}"
{% endif %}
pullPolicy: IfNotPresent
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
clusterConfig:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ metadata:
name: test-zk
spec:
image:
{% if test_scenario['values']['zookeeper-latest'].find(",") > 0 %}
custom: "{{ test_scenario['values']['zookeeper-latest'].split(',')[1] }}"
productVersion: "{{ test_scenario['values']['zookeeper-latest'].split(',')[0] }}"
{% else %}
productVersion: "{{ test_scenario['values']['zookeeper-latest'] }}"
{% endif %}
pullPolicy: IfNotPresent
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
clusterConfig:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ metadata:
name: test-zk
spec:
image:
{% if test_scenario['values']['zookeeper-latest'].find(",") > 0 %}
custom: "{{ test_scenario['values']['zookeeper-latest'].split(',')[1] }}"
productVersion: "{{ test_scenario['values']['zookeeper-latest'].split(',')[0] }}"
{% else %}
productVersion: "{{ test_scenario['values']['zookeeper-latest'] }}"
{% endif %}
pullPolicy: IfNotPresent
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
clusterConfig:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ metadata:
name: test-zk
spec:
image:
{% if test_scenario['values']['zookeeper'].find(",") > 0 %}
custom: "{{ test_scenario['values']['zookeeper'].split(',')[1] }}"
productVersion: "{{ test_scenario['values']['zookeeper'].split(',')[0] }}"
{% else %}
productVersion: "{{ test_scenario['values']['zookeeper'] }}"
{% endif %}
pullPolicy: IfNotPresent
clusterConfig:
tls:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ metadata:
name: test-zk
spec:
image:
{% if test_scenario['values']['zookeeper'].find(",") > 0 %}
custom: "{{ test_scenario['values']['zookeeper'].split(',')[1] }}"
productVersion: "{{ test_scenario['values']['zookeeper'].split(',')[0] }}"
{% else %}
productVersion: "{{ test_scenario['values']['zookeeper'] }}"
{% endif %}
pullPolicy: IfNotPresent
clusterConfig:
tls:
Expand Down
5 changes: 5 additions & 0 deletions tests/templates/kuttl/logging/11-install-zookeeper.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ metadata:
name: test-zk
spec:
image:
{% if test_scenario['values']['zookeeper'].find(",") > 0 %}
custom: "{{ test_scenario['values']['zookeeper'].split(',')[1] }}"
productVersion: "{{ test_scenario['values']['zookeeper'].split(',')[0] }}"
{% else %}
productVersion: "{{ test_scenario['values']['zookeeper'] }}"
{% endif %}
pullPolicy: IfNotPresent
clusterConfig:
vectorAggregatorConfigMapName: zookeeper-vector-aggregator-discovery
Expand Down
5 changes: 5 additions & 0 deletions tests/templates/kuttl/smoke/10-install-zookeeper.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ metadata:
name: test-zk
spec:
image:
{% if test_scenario['values']['zookeeper'].find(",") > 0 %}
custom: "{{ test_scenario['values']['zookeeper'].split(',')[1] }}"
productVersion: "{{ test_scenario['values']['zookeeper'].split(',')[0] }}"
{% else %}
productVersion: "{{ test_scenario['values']['zookeeper'] }}"
{% endif %}
pullPolicy: IfNotPresent
clusterConfig:
{% if test_scenario['values']['use-server-tls'] == 'true' %}
Expand Down
5 changes: 5 additions & 0 deletions tests/templates/kuttl/znode/10-install-zookeeper.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ metadata:
name: test-zk
spec:
image:
{% if test_scenario['values']['zookeeper-latest'].find(",") > 0 %}
custom: "{{ test_scenario['values']['zookeeper-latest'].split(',')[1] }}"
productVersion: "{{ test_scenario['values']['zookeeper-latest'].split(',')[0] }}"
{% else %}
productVersion: "{{ test_scenario['values']['zookeeper-latest'] }}"
{% endif %}
pullPolicy: IfNotPresent
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
clusterConfig:
Expand Down
4 changes: 4 additions & 0 deletions tests/test-definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ dimensions:
- name: zookeeper
values:
- 3.9.2
# To use a custom image, add a comma and the full name after the product version
# - 3.9.2,docker.stackable.tech/stackable/zookeeper:3.9.2-stackable0.0.0-dev
- name: zookeeper-latest
values:
- 3.9.2
# To use a custom image, add a comma and the full name after the product version
# - 3.9.2,docker.stackable.tech/stackable/zookeeper:3.9.2-stackable0.0.0-dev
- name: use-server-tls
values:
- "true"
Expand Down

0 comments on commit dc42c9b

Please sign in to comment.