Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it easier to use a custom image in tests #550

Merged
merged 2 commits into from
Sep 11, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ metadata:
name: hdfs
spec:
image:
{% if test_scenario['values']['hadoop-latest'].find(",") > 0 %}
custom: "{{ test_scenario['values']['hadoop-latest'].split(',')[1] }}"
productVersion: "{{ test_scenario['values']['hadoop-latest'].split(',')[0] }}"
{% else %}
productVersion: "{{ test_scenario['values']['hadoop-latest'] }}"
{% endif %}
pullPolicy: IfNotPresent
clusterConfig:
dfsReplication: 1
Expand Down
5 changes: 5 additions & 0 deletions tests/templates/kuttl/cluster-operation/30-stop-hdfs.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ metadata:
name: hdfs
spec:
image:
{% if test_scenario['values']['hadoop-latest'].find(",") > 0 %}
custom: "{{ test_scenario['values']['hadoop-latest'].split(',')[1] }}"
productVersion: "{{ test_scenario['values']['hadoop-latest'].split(',')[0] }}"
{% else %}
productVersion: "{{ test_scenario['values']['hadoop-latest'] }}"
{% endif %}
pullPolicy: IfNotPresent
clusterConfig:
dfsReplication: 1
Expand Down
5 changes: 5 additions & 0 deletions tests/templates/kuttl/cluster-operation/40-pause-hdfs.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ metadata:
name: hdfs
spec:
image:
{% if test_scenario['values']['hadoop-latest'].find(",") > 0 %}
custom: "{{ test_scenario['values']['hadoop-latest'].split(',')[1] }}"
productVersion: "{{ test_scenario['values']['hadoop-latest'].split(',')[0] }}"
{% else %}
productVersion: "{{ test_scenario['values']['hadoop-latest'] }}"
{% endif %}
pullPolicy: IfNotPresent
clusterConfig:
dfsReplication: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ metadata:
name: hdfs
spec:
image:
{% if test_scenario['values']['hadoop-latest'].find(",") > 0 %}
custom: "{{ test_scenario['values']['hadoop-latest'].split(',')[1] }}"
productVersion: "{{ test_scenario['values']['hadoop-latest'].split(',')[0] }}"
{% else %}
productVersion: "{{ test_scenario['values']['hadoop-latest'] }}"
{% endif %}
pullPolicy: IfNotPresent
clusterConfig:
dfsReplication: 1
Expand Down
5 changes: 5 additions & 0 deletions tests/templates/kuttl/external-access/30-install-hdfs.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ metadata:
name: hdfs
spec:
image:
{% if test_scenario['values']['hadoop-latest'].find(",") > 0 %}
custom: "{{ test_scenario['values']['hadoop-latest'].split(',')[1] }}"
productVersion: "{{ test_scenario['values']['hadoop-latest'].split(',')[0] }}"
{% else %}
productVersion: "{{ test_scenario['values']['hadoop-latest'] }}"
{% endif %}
pullPolicy: IfNotPresent
clusterConfig:
zookeeperConfigMapName: hdfs-zk
Expand Down
5 changes: 5 additions & 0 deletions tests/templates/kuttl/kerberos/20-install-hdfs.txt.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ metadata:
name: hdfs
spec:
image:
{% if test_scenario['values']['hadoop-latest'].find(",") > 0 %}
custom: "{{ test_scenario['values']['hadoop-latest'].split(',')[1] }}"
productVersion: "{{ test_scenario['values']['hadoop-latest'].split(',')[0] }}"
{% else %}
productVersion: "{{ test_scenario['values']['hadoop-latest'] }}"
{% endif %}
pullPolicy: IfNotPresent
clusterConfig:
zookeeperConfigMapName: hdfs-zk
Expand Down
4 changes: 4 additions & 0 deletions tests/templates/kuttl/kerberos/30-access-hdfs.txt.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ spec:
serviceAccountName: test-sa
containers:
- name: access-hdfs
{% if test_scenario['values']['hadoop-latest'].find(",") > 0 %}
image: "{{ test_scenario['values']['hadoop-latest'].split(',')[1] }}"
{% else %}
image: docker.stackable.tech/stackable/hadoop:{{ test_scenario['values']['hadoop-latest'] }}-stackable0.0.0-dev
{% endif %}
env:
- name: HADOOP_CONF_DIR
value: /stackable/conf/hdfs
Expand Down
4 changes: 4 additions & 0 deletions tests/templates/kuttl/kerberos/32-check-file.txt.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ spec:
serviceAccountName: test-sa
containers:
- name: check-hdfs
{% if test_scenario['values']['hadoop-latest'].find(",") > 0 %}
image: "{{ test_scenario['values']['hadoop-latest'].split(',')[1] }}"
{% else %}
image: docker.stackable.tech/stackable/hadoop:{{ test_scenario['values']['hadoop-latest'] }}-stackable0.0.0-dev
{% endif %}
env:
- name: HADOOP_CONF_DIR
value: /stackable/conf/hdfs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ metadata:
name: test-hdfs-automatic-log
spec:
image:
{% if test_scenario['values']['hadoop'].find(",") > 0 %}
custom: "{{ test_scenario['values']['hadoop'].split(',')[1] }}"
productVersion: "{{ test_scenario['values']['hadoop'].split(',')[0] }}"
{% else %}
productVersion: "{{ test_scenario['values']['hadoop'] }}"
{% endif %}
pullPolicy: IfNotPresent
clusterConfig:
vectorAggregatorConfigMapName: hdfs-vector-aggregator-discovery
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ metadata:
name: test-hdfs-custom-log
spec:
image:
{% if test_scenario['values']['hadoop'].find(",") > 0 %}
custom: "{{ test_scenario['values']['hadoop'].split(',')[1] }}"
productVersion: "{{ test_scenario['values']['hadoop'].split(',')[0] }}"
{% else %}
productVersion: "{{ test_scenario['values']['hadoop'] }}"
{% endif %}
pullPolicy: IfNotPresent
clusterConfig:
vectorAggregatorConfigMapName: hdfs-vector-aggregator-discovery
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ metadata:
name: test-hdfs
spec:
image:
{% if test_scenario['values']['hadoop-latest'].find(",") > 0 %}
custom: "{{ test_scenario['values']['hadoop-latest'].split(',')[1] }}"
productVersion: "{{ test_scenario['values']['hadoop-latest'].split(',')[0] }}"
{% else %}
productVersion: "{{ test_scenario['values']['hadoop-latest'] }}"
{% endif %}
pullPolicy: IfNotPresent
clusterConfig:
dfsReplication: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ metadata:
name: test-hdfs
spec:
image:
{% if test_scenario['values']['hadoop-latest'].find(",") > 0 %}
custom: "{{ test_scenario['values']['hadoop-latest'].split(',')[1] }}"
productVersion: "{{ test_scenario['values']['hadoop-latest'].split(',')[0] }}"
{% else %}
productVersion: "{{ test_scenario['values']['hadoop-latest'] }}"
{% endif %}
pullPolicy: IfNotPresent
clusterConfig:
dfsReplication: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ metadata:
name: test-hdfs
spec:
image:
{% if test_scenario['values']['hadoop-latest'].find(",") > 0 %}
custom: "{{ test_scenario['values']['hadoop-latest'].split(',')[1] }}"
productVersion: "{{ test_scenario['values']['hadoop-latest'].split(',')[0] }}"
{% else %}
productVersion: "{{ test_scenario['values']['hadoop-latest'] }}"
{% endif %}
pullPolicy: IfNotPresent
dataNodes:
config:
Expand Down
5 changes: 5 additions & 0 deletions tests/templates/kuttl/profiling/03-install-hdfs.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ metadata:
name: test-hdfs
spec:
image:
{% if test_scenario['values']['hadoop'].find(",") > 0 %}
custom: "{{ test_scenario['values']['hadoop'].split(',')[1] }}"
productVersion: "{{ test_scenario['values']['hadoop'].split(',')[0] }}"
{% else %}
productVersion: "{{ test_scenario['values']['hadoop'] }}"
{% endif %}
pullPolicy: IfNotPresent
clusterConfig:
dfsReplication: 1
Expand Down
5 changes: 5 additions & 0 deletions tests/templates/kuttl/smoke/30-install-hdfs.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ metadata:
name: hdfs
spec:
image:
{% if test_scenario['values']['hadoop'].find(",") > 0 %}
custom: "{{ test_scenario['values']['hadoop'].split(',')[1] }}"
productVersion: "{{ test_scenario['values']['hadoop'].split(',')[0] }}"
{% else %}
productVersion: "{{ test_scenario['values']['hadoop'] }}"
{% endif %}
pullPolicy: IfNotPresent
clusterConfig:
zookeeperConfigMapName: hdfs-zk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ commands:
name: hdfs
spec:
image:
{% if test_scenario['values']['hadoop-latest'].find(",") > 0 %}
custom: "{{ test_scenario['values']['hadoop-latest'].split(',')[1] }}"
productVersion: "{{ test_scenario['values']['hadoop-latest'].split(',')[0] }}"
{% else %}
productVersion: "{{ test_scenario['values']['hadoop-latest'] }}"
{% endif %}
pullPolicy: IfNotPresent
clusterConfig:
zookeeperConfigMapName: hdfs-zk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ commands:
serviceAccountName: test-sa
containers:
- name: access-hdfs
{% if test_scenario['values']['hadoop-latest'].find(",") > 0 %}
image: "{{ test_scenario['values']['hadoop-latest'].split(',')[1] }}"
{% else %}
image: docker.stackable.tech/stackable/hadoop:{{ test_scenario['values']['hadoop-latest'] }}-stackable0.0.0-dev
{% endif %}
env:
- name: HADOOP_CONF_DIR
value: /stackable/conf/hdfs
Expand Down
6 changes: 5 additions & 1 deletion tests/test-definition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ dimensions:
- 3.3.4
- 3.3.6
- 3.4.0
# To use a custom image, add a comma and the full name after the product version
# - 3.4.0,docker.stackable.tech/sandbox/hadoop:3.4.0-stackable0.0.0-dev
- name: hadoop-latest
values:
- 3.3.6
- 3.4.0
# To use a custom image, add a comma and the full name after the product version
# - 3.4.0,docker.stackable.tech/sandbox/hadoop:3.4.0-stackable0.0.0-dev
- name: hadoop-external-client-docker-image
values:
- 3.3.6
Expand Down
Loading