Skip to content

Commit 95986a5

Browse files
committed
use tls feature in all integration tests
1 parent 815d243 commit 95986a5

6 files changed

Lines changed: 17 additions & 190 deletions

File tree

tests/templates/kuttl/external-access/opensearch.yaml.j2

Lines changed: 3 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ spec:
1212
productVersion: "{{ test_scenario['values']['opensearch'] }}"
1313
{% endif %}
1414
pullPolicy: IfNotPresent
15-
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
1615
clusterConfig:
16+
tls:
17+
secretClass: tls
18+
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
1719
vectorAggregatorConfigMapName: vector-aggregator-discovery
1820
{% endif %}
1921
nodes:
@@ -27,45 +29,18 @@ spec:
2729
- cluster_manager
2830
listenerClass: test-external-stable-$NAMESPACE
2931
replicas: 1
30-
podOverrides:
31-
spec:
32-
volumes:
33-
- name: tls
34-
ephemeral:
35-
volumeClaimTemplate:
36-
metadata:
37-
annotations:
38-
secrets.stackable.tech/scope: node,pod,service=opensearch,service=opensearch-nodes-cluster-manager-headless
3932
data1:
4033
config:
4134
nodeRoles:
4235
- data
4336
listenerClass: test-external-unstable-$NAMESPACE
4437
replicas: 1
45-
podOverrides:
46-
spec:
47-
volumes:
48-
- name: tls
49-
ephemeral:
50-
volumeClaimTemplate:
51-
metadata:
52-
annotations:
53-
secrets.stackable.tech/scope: node,pod,service=opensearch-nodes-data1-headless
5438
data2:
5539
config:
5640
nodeRoles:
5741
- data
5842
listenerClass: test-cluster-internal-$NAMESPACE
5943
replicas: 1
60-
podOverrides:
61-
spec:
62-
volumes:
63-
- name: tls
64-
ephemeral:
65-
volumeClaimTemplate:
66-
metadata:
67-
annotations:
68-
secrets.stackable.tech/scope: node,pod,service=opensearch-nodes-data2-headless
6944
envOverrides:
7045
# Only required for the official image
7146
# The official image (built with https://github.com/opensearch-project/opensearch-build)
@@ -83,14 +58,6 @@ spec:
8358
# not be created even if enough disk space would be available.
8459
cluster.routing.allocation.disk.threshold_enabled: "false"
8560
plugins.security.allow_default_init_securityindex: "true"
86-
plugins.security.ssl.transport.enabled: "true"
87-
plugins.security.ssl.transport.pemcert_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/tls.crt
88-
plugins.security.ssl.transport.pemkey_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/tls.key
89-
plugins.security.ssl.transport.pemtrustedcas_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/ca.crt
90-
plugins.security.ssl.http.enabled: "true"
91-
plugins.security.ssl.http.pemcert_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/tls.crt
92-
plugins.security.ssl.http.pemkey_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/tls.key
93-
plugins.security.ssl.http.pemtrustedcas_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/ca.crt
9461
podOverrides:
9562
spec:
9663
containers:
@@ -99,27 +66,11 @@ spec:
9966
- name: security-config
10067
mountPath: {{ test_scenario['values']['opensearch_home'] }}/config/opensearch-security
10168
readOnly: true
102-
- name: tls
103-
mountPath: {{ test_scenario['values']['opensearch_home'] }}/config/tls
104-
readOnly: true
10569
volumes:
10670
- name: security-config
10771
secret:
10872
secretName: opensearch-security-config
10973
defaultMode: 0o660
110-
- name: tls
111-
ephemeral:
112-
volumeClaimTemplate:
113-
metadata:
114-
annotations:
115-
secrets.stackable.tech/class: tls
116-
spec:
117-
storageClassName: secrets.stackable.tech
118-
accessModes:
119-
- ReadWriteOnce
120-
resources:
121-
requests:
122-
storage: "1"
12374
---
12475
apiVersion: v1
12576
kind: Secret

tests/templates/kuttl/ldap/21-install-opensearch.yaml.j2

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ spec:
1212
productVersion: "{{ test_scenario['values']['opensearch'] }}"
1313
{% endif %}
1414
pullPolicy: IfNotPresent
15-
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
1615
clusterConfig:
16+
tls:
17+
secretClass: tls
18+
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
1719
vectorAggregatorConfigMapName: vector-aggregator-discovery
1820
{% endif %}
1921
nodes:
@@ -40,14 +42,6 @@ spec:
4042
# not be created even if enough disk space would be available.
4143
cluster.routing.allocation.disk.threshold_enabled: "false"
4244
plugins.security.allow_default_init_securityindex: "true"
43-
plugins.security.ssl.transport.enabled: "true"
44-
plugins.security.ssl.transport.pemcert_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/tls.crt
45-
plugins.security.ssl.transport.pemkey_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/tls.key
46-
plugins.security.ssl.transport.pemtrustedcas_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/ca.crt
47-
plugins.security.ssl.http.enabled: "true"
48-
plugins.security.ssl.http.pemcert_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/tls.crt
49-
plugins.security.ssl.http.pemkey_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/tls.key
50-
plugins.security.ssl.http.pemtrustedcas_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/ca.crt
5145
podOverrides:
5246
spec:
5347
containers:
@@ -56,25 +50,8 @@ spec:
5650
- name: security-config
5751
mountPath: {{ test_scenario['values']['opensearch_home'] }}/config/opensearch-security
5852
readOnly: true
59-
- name: tls
60-
mountPath: {{ test_scenario['values']['opensearch_home'] }}/config/tls
61-
readOnly: true
6253
volumes:
6354
- name: security-config
6455
secret:
6556
secretName: opensearch-security-config
6657
defaultMode: 0o660
67-
- name: tls
68-
ephemeral:
69-
volumeClaimTemplate:
70-
metadata:
71-
annotations:
72-
secrets.stackable.tech/class: tls
73-
secrets.stackable.tech/scope: node,pod,service=opensearch,service=opensearch-nodes-default-headless
74-
spec:
75-
storageClassName: secrets.stackable.tech
76-
accessModes:
77-
- ReadWriteOnce
78-
resources:
79-
requests:
80-
storage: "1"

tests/templates/kuttl/logging/20-install-opensearch.yaml.j2

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ spec:
2727
{% endif %}
2828
pullPolicy: IfNotPresent
2929
clusterConfig:
30+
tls:
31+
secretClass: tls
3032
vectorAggregatorConfigMapName: opensearch-vector-aggregator-discovery
3133
nodes:
3234
roleGroups:
@@ -52,15 +54,6 @@ spec:
5254
ROOT:
5355
level: INFO
5456
replicas: 1
55-
podOverrides:
56-
spec:
57-
volumes:
58-
- name: tls
59-
ephemeral:
60-
volumeClaimTemplate:
61-
metadata:
62-
annotations:
63-
secrets.stackable.tech/scope: node,pod,service=opensearch,service=opensearch-nodes-automatic-headless
6457
custom:
6558
config:
6659
logging:
@@ -70,15 +63,6 @@ spec:
7063
custom:
7164
configMap: custom-log-config
7265
replicas: 1
73-
podOverrides:
74-
spec:
75-
volumes:
76-
- name: tls
77-
ephemeral:
78-
volumeClaimTemplate:
79-
metadata:
80-
annotations:
81-
secrets.stackable.tech/scope: node,pod,service=opensearch,service=opensearch-nodes-custom-headless
8266
configOverrides:
8367
opensearch.yml:
8468
# Disable memory mapping in this test; If memory mapping were activated, the kernel setting
@@ -90,14 +74,6 @@ spec:
9074
# not be created even if enough disk space would be available.
9175
cluster.routing.allocation.disk.threshold_enabled: "false"
9276
plugins.security.allow_default_init_securityindex: "true"
93-
plugins.security.ssl.transport.enabled: "true"
94-
plugins.security.ssl.transport.pemcert_filepath: /stackable/opensearch/config/tls/tls.crt
95-
plugins.security.ssl.transport.pemkey_filepath: /stackable/opensearch/config/tls/tls.key
96-
plugins.security.ssl.transport.pemtrustedcas_filepath: /stackable/opensearch/config/tls/ca.crt
97-
plugins.security.ssl.http.enabled: "true"
98-
plugins.security.ssl.http.pemcert_filepath: /stackable/opensearch/config/tls/tls.crt
99-
plugins.security.ssl.http.pemkey_filepath: /stackable/opensearch/config/tls/tls.key
100-
plugins.security.ssl.http.pemtrustedcas_filepath: /stackable/opensearch/config/tls/ca.crt
10177
podOverrides:
10278
spec:
10379
containers:

tests/templates/kuttl/metrics/20-install-opensearch.yaml.j2

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ spec:
1212
productVersion: "{{ test_scenario['values']['opensearch'] }}"
1313
{% endif %}
1414
pullPolicy: IfNotPresent
15-
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
1615
clusterConfig:
16+
tls:
17+
secretClass: tls
18+
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
1719
vectorAggregatorConfigMapName: vector-aggregator-discovery
1820
{% endif %}
1921
nodes:
@@ -40,14 +42,6 @@ spec:
4042
# not be created even if enough disk space would be available.
4143
cluster.routing.allocation.disk.threshold_enabled: "false"
4244
plugins.security.allow_default_init_securityindex: "true"
43-
plugins.security.ssl.transport.enabled: "true"
44-
plugins.security.ssl.transport.pemcert_filepath: /stackable/opensearch/config/tls/tls.crt
45-
plugins.security.ssl.transport.pemkey_filepath: /stackable/opensearch/config/tls/tls.key
46-
plugins.security.ssl.transport.pemtrustedcas_filepath: /stackable/opensearch/config/tls/ca.crt
47-
plugins.security.ssl.http.enabled: "true"
48-
plugins.security.ssl.http.pemcert_filepath: /stackable/opensearch/config/tls/tls.crt
49-
plugins.security.ssl.http.pemkey_filepath: /stackable/opensearch/config/tls/tls.key
50-
plugins.security.ssl.http.pemtrustedcas_filepath: /stackable/opensearch/config/tls/ca.crt
5145
podOverrides:
5246
spec:
5347
containers:
@@ -56,28 +50,11 @@ spec:
5650
- name: security-config
5751
mountPath: /stackable/opensearch/config/opensearch-security
5852
readOnly: true
59-
- name: tls
60-
mountPath: /stackable/opensearch/config/tls
61-
readOnly: true
6253
volumes:
6354
- name: security-config
6455
secret:
6556
secretName: opensearch-security-config
6657
defaultMode: 0o660
67-
- name: tls
68-
ephemeral:
69-
volumeClaimTemplate:
70-
metadata:
71-
annotations:
72-
secrets.stackable.tech/class: tls
73-
secrets.stackable.tech/scope: node,pod,service=opensearch,service=opensearch-nodes-default-headless
74-
spec:
75-
storageClassName: secrets.stackable.tech
76-
accessModes:
77-
- ReadWriteOnce
78-
resources:
79-
requests:
80-
storage: "1"
8158
---
8259
apiVersion: v1
8360
kind: Secret

tests/templates/kuttl/opensearch-dashboards/10-install-opensearch.yaml.j2

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ spec:
1212
productVersion: "{{ test_scenario['values']['opensearch'] }}"
1313
{% endif %}
1414
pullPolicy: IfNotPresent
15-
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
1615
clusterConfig:
16+
tls:
17+
secretClass: tls
18+
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
1719
vectorAggregatorConfigMapName: vector-aggregator-discovery
1820
{% endif %}
1921
nodes:
@@ -25,15 +27,6 @@ spec:
2527
config:
2628
listenerClass: external-unstable
2729
replicas: 1
28-
podOverrides:
29-
spec:
30-
volumes:
31-
- name: tls
32-
ephemeral:
33-
volumeClaimTemplate:
34-
metadata:
35-
annotations:
36-
secrets.stackable.tech/scope: node,pod,service=opensearch,service=opensearch-nodes-default-headless
3730
envOverrides:
3831
# Only required for the official image
3932
# The official image (built with https://github.com/opensearch-project/opensearch-build)
@@ -51,14 +44,6 @@ spec:
5144
# not be created even if enough disk space would be available.
5245
cluster.routing.allocation.disk.threshold_enabled: "false"
5346
plugins.security.allow_default_init_securityindex: "true"
54-
plugins.security.ssl.transport.enabled: "true"
55-
plugins.security.ssl.transport.pemcert_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/tls.crt
56-
plugins.security.ssl.transport.pemkey_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/tls.key
57-
plugins.security.ssl.transport.pemtrustedcas_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/ca.crt
58-
plugins.security.ssl.http.enabled: "true"
59-
plugins.security.ssl.http.pemcert_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/tls.crt
60-
plugins.security.ssl.http.pemkey_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/tls.key
61-
plugins.security.ssl.http.pemtrustedcas_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/ca.crt
6247
podOverrides:
6348
spec:
6449
containers:
@@ -67,26 +52,10 @@ spec:
6752
- name: security-config
6853
mountPath: {{ test_scenario['values']['opensearch_home'] }}/config/opensearch-security
6954
readOnly: true
70-
- name: tls
71-
mountPath: {{ test_scenario['values']['opensearch_home'] }}/config/tls
72-
readOnly: true
7355
volumes:
7456
- name: security-config
7557
secret:
7658
secretName: opensearch-security-config
77-
- name: tls
78-
ephemeral:
79-
volumeClaimTemplate:
80-
metadata:
81-
annotations:
82-
secrets.stackable.tech/class: tls
83-
spec:
84-
storageClassName: secrets.stackable.tech
85-
accessModes:
86-
- ReadWriteOnce
87-
resources:
88-
requests:
89-
storage: "1"
9059
---
9160
apiVersion: v1
9261
kind: Secret

tests/templates/kuttl/snapshot-s3/20-install-opensearch.yaml.j2

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ spec:
1212
productVersion: "{{ test_scenario['values']['opensearch'] }}"
1313
{% endif %}
1414
pullPolicy: IfNotPresent
15-
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
1615
clusterConfig:
16+
tls:
17+
secretClass: tls
18+
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
1719
vectorAggregatorConfigMapName: vector-aggregator-discovery
1820
{% endif %}
1921
nodes:
@@ -35,14 +37,6 @@ spec:
3537
# not be created even if enough disk space would be available.
3638
cluster.routing.allocation.disk.threshold_enabled: "false"
3739
plugins.security.allow_default_init_securityindex: "true"
38-
plugins.security.ssl.transport.enabled: "true"
39-
plugins.security.ssl.transport.pemcert_filepath: /stackable/opensearch/config/tls/tls.crt
40-
plugins.security.ssl.transport.pemkey_filepath: /stackable/opensearch/config/tls/tls.key
41-
plugins.security.ssl.transport.pemtrustedcas_filepath: /stackable/opensearch/config/tls/ca.crt
42-
plugins.security.ssl.http.enabled: "true"
43-
plugins.security.ssl.http.pemcert_filepath: /stackable/opensearch/config/tls/tls.crt
44-
plugins.security.ssl.http.pemkey_filepath: /stackable/opensearch/config/tls/tls.key
45-
plugins.security.ssl.http.pemtrustedcas_filepath: /stackable/opensearch/config/tls/ca.crt
4640
s3.client.default.endpoint: http://minio:9000/
4741
s3.client.default.protocol: http
4842
s3.client.default.region: unused # but required
@@ -80,9 +74,6 @@ spec:
8074
- name: security-config
8175
mountPath: /stackable/opensearch/config/opensearch-security
8276
readOnly: true
83-
- name: tls
84-
mountPath: /stackable/opensearch/config/tls
85-
readOnly: true
8677
- name: keystore
8778
mountPath: /stackable/opensearch/config/opensearch.keystore
8879
subPath: opensearch.keystore
@@ -99,20 +90,6 @@ spec:
9990
secret:
10091
secretName: opensearch-security-config
10192
defaultMode: 0o660
102-
- name: tls
103-
ephemeral:
104-
volumeClaimTemplate:
105-
metadata:
106-
annotations:
107-
secrets.stackable.tech/scope: node,pod,service=opensearch,service=opensearch-nodes-default-headless
108-
secrets.stackable.tech/class: tls
109-
spec:
110-
storageClassName: secrets.stackable.tech
111-
accessModes:
112-
- ReadWriteOnce
113-
resources:
114-
requests:
115-
storage: "1"
11693
---
11794
apiVersion: v1
11895
kind: Secret

0 commit comments

Comments
 (0)