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

Fix kuttl tests #482

Merged
merged 5 commits into from
Oct 5, 2023
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
3 changes: 3 additions & 0 deletions rust/operator-binary/src/authentication/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,10 @@ impl TrinoAuthenticationConfig {
stackable_trino_crd::Container::Vector => {}
}
}
}

/// Add required init / side car containers
pub fn add_authentication_containers(&self, role: &TrinoRole, pod_builder: &mut PodBuilder) {
// containers
for container in self.sidecar_containers(role) {
pod_builder.add_container(container);
Expand Down
3 changes: 3 additions & 0 deletions rust/operator-binary/src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,9 @@ fn build_rolegroup_statefulset(
// add trino container first to better default into that container (e.g. instead of vector)
pod_builder.add_container(container_trino);

// add password-update container if required
trino_authentication_config.add_authentication_containers(trino_role, &mut pod_builder);

if let Some(ContainerLogConfig {
choice:
Some(ContainerLogConfigChoice::Custom(CustomContainerLogConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ spec:
productVersion: "'"{{ test_scenario['values']['trino-latest'] }}"'"
clusterConfig:
catalogLabelSelector: {}
gracefulShutdownTimeout: 5s
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
vectorAggregatorConfigMapName: vector-aggregator-discovery
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ spec:
productVersion: "{{ test_scenario['values']['trino-latest'] }}"
clusterConfig:
catalogLabelSelector: {}
gracefulShutdownTimeout: 5s
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
vectorAggregatorConfigMapName: vector-aggregator-discovery
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ spec:
productVersion: "{{ test_scenario['values']['trino-latest'] }}"
clusterConfig:
catalogLabelSelector: {}
gracefulShutdownTimeout: 5s
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
vectorAggregatorConfigMapName: vector-aggregator-discovery
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ spec:
productVersion: "{{ test_scenario['values']['trino-latest'] }}"
clusterConfig:
catalogLabelSelector: {}
gracefulShutdownTimeout: 5s
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
vectorAggregatorConfigMapName: vector-aggregator-discovery
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ spec:
productVersion: "{{ test_scenario['values']['trino-latest'] }}"
clusterConfig:
catalogLabelSelector: {}
gracefulShutdownTimeout: 5s
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
vectorAggregatorConfigMapName: vector-aggregator-discovery
{% endif %}
Expand Down
1 change: 1 addition & 0 deletions tests/templates/kuttl/logging/02-install-trino.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ spec:
productVersion: "{{ test_scenario['values']['trino'] }}"
clusterConfig:
catalogLabelSelector: {}
gracefulShutdownTimeout: 5s
vectorAggregatorConfigMapName: trino-vector-aggregator-discovery
# in order to add the password-file-updater container
authentication:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ spec:
productVersion: "{{ test_scenario['values']['trino-latest'] }}"
clusterConfig:
catalogLabelSelector: {}
gracefulShutdownTimeout: 5s
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
vectorAggregatorConfigMapName: vector-aggregator-discovery
{% endif %}
Expand Down
1 change: 1 addition & 0 deletions tests/templates/kuttl/resources/10-install-trino.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ spec:
productVersion: "{{ test_scenario['values']['trino-latest'] }}"
clusterConfig:
catalogLabelSelector: {}
gracefulShutdownTimeout: 5s
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
vectorAggregatorConfigMapName: vector-aggregator-discovery
{% endif %}
Expand Down
1 change: 1 addition & 0 deletions tests/templates/kuttl/smoke/10-install-trino.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ spec:
opa:
configMapName: opa
package: trino
gracefulShutdownTimeout: 5s
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
vectorAggregatorConfigMapName: vector-aggregator-discovery
{% endif %}
Expand Down
1 change: 1 addition & 0 deletions tests/templates/kuttl/tls/10-install-trino.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ spec:
productVersion: "{{ test_scenario['values']['trino-latest'] }}"
clusterConfig:
catalogLabelSelector: {}
gracefulShutdownTimeout: 5s
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
vectorAggregatorConfigMapName: vector-aggregator-discovery
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,18 @@ spec:
labels:
app: trino-test-helper
spec:
securityContext:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
containers:
- name: trino-test-helper
image: docker.stackable.tech/stackable/testing-tools:0.2.0-stackable0.0.0-dev
command: ["sleep", "infinity"]
{% if test_scenario['values']['use-tls'] == 'true' %}
volumeMounts:
- mountPath: "/stackable/trusted"
name: server-tls-mount
securityContext:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
volumes:
- name: server-tls-mount
ephemeral:
Expand All @@ -40,3 +41,4 @@ spec:
requests:
storage: "1"
storageClassName: secrets.stackable.tech
{% endif %}