Skip to content

Commit f5adadd

Browse files
Fix the remaining TODOs or remove them if not necessary
1 parent b70158b commit f5adadd

7 files changed

Lines changed: 9 additions & 25 deletions

File tree

rust/operator-binary/src/controller/build/role_builder.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ impl<'a> RoleBuilder<'a> {
4949
}
5050
}
5151

52-
// TODO Only one builder function which calls the other ones?
53-
5452
pub fn role_group_builders(&self) -> Vec<RoleGroupBuilder<'_>> {
5553
self.cluster
5654
.role_group_configs

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,16 @@ spec:
6060
annotations:
6161
secrets.stackable.tech/scope: node,pod,service=opensearch-nodes-data2-headless
6262
envOverrides:
63-
# TODO Make these the defaults in the image
63+
# Only required for the official image
64+
# The official image (built with https://github.com/opensearch-project/opensearch-build)
65+
# installs a demo configuration if not disabled explicitly.
6466
DISABLE_INSTALL_DEMO_CONFIG: "true"
6567
OPENSEARCH_HOME: {{ test_scenario['values']['opensearch_home'] }}
6668
configOverrides:
67-
# TODO Add the required options to the operator
6869
opensearch.yml:
6970
# Disable memory mapping in this test; If memory mapping were activated, the kernel setting
7071
# vm.max_map_count would have to be increased to 262144 on the node.
7172
node.store.allow_mmap: "false"
72-
# TODO Check that this is safe despite the warning in the documentation
7373
plugins.security.allow_default_init_securityindex: "true"
7474
plugins.security.ssl.transport.enabled: "true"
7575
plugins.security.ssl.transport.pemcert_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/tls.crt
@@ -79,7 +79,6 @@ spec:
7979
plugins.security.ssl.http.pemcert_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/tls.crt
8080
plugins.security.ssl.http.pemkey_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/tls.key
8181
plugins.security.ssl.http.pemtrustedcas_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/ca.crt
82-
plugins.security.authcz.admin_dn: "CN=generated certificate for pod"
8382
podOverrides:
8483
spec:
8584
containers:
@@ -89,11 +88,8 @@ spec:
8988
mountPath: {{ test_scenario['values']['opensearch_home'] }}/config/opensearch-security
9089
readOnly: true
9190
- name: tls
92-
# The Java policy allows reading from ${OPENSEARCH_HOME}/config.
9391
mountPath: {{ test_scenario['values']['opensearch_home'] }}/config/tls
9492
readOnly: true
95-
securityContext:
96-
fsGroup: 1000
9793
volumes:
9894
- name: security-config
9995
secret:

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ spec:
1717
default:
1818
replicas: 3
1919
envOverrides:
20+
# Only required for the official image
21+
# The official image (built with https://github.com/opensearch-project/opensearch-build)
22+
# installs a demo configuration if not disabled explicitly.
2023
DISABLE_INSTALL_DEMO_CONFIG: "true"
2124
OPENSEARCH_HOME: {{ test_scenario['values']['opensearch_home'] }}
2225
configOverrides:
@@ -44,8 +47,6 @@ spec:
4447
- name: tls
4548
mountPath: {{ test_scenario['values']['opensearch_home'] }}/config/tls
4649
readOnly: true
47-
securityContext:
48-
fsGroup: 1000
4950
volumes:
5051
- name: security-config
5152
secret:

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ spec:
3838
plugins.security.ssl.http.pemcert_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/tls.crt
3939
plugins.security.ssl.http.pemkey_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/tls.key
4040
plugins.security.ssl.http.pemtrustedcas_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/ca.crt
41-
plugins.security.authcz.admin_dn: "CN=generated certificate for pod"
4241
podOverrides:
4342
spec:
4443
containers:
@@ -50,8 +49,6 @@ spec:
5049
- name: tls
5150
mountPath: {{ test_scenario['values']['opensearch_home'] }}/config/tls
5251
readOnly: true
53-
securityContext:
54-
fsGroup: 1000
5552
volumes:
5653
- name: security-config
5754
secret:

tests/templates/kuttl/smoke/10-assert.yaml.j2

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# All fields are checked that are set by the operator.
22
# This helps to detect unintentional changes.
33
# The maintenance effort should be okay as long as it is only done in the smoke test.
4-
# TODO Check individual field in unit tests
54
---
65
apiVersion: kuttl.dev/v1beta1
76
kind: TestAssert
@@ -404,7 +403,6 @@ data:
404403
network.host: "0.0.0.0"
405404
node.store.allow_mmap: "false"
406405
plugins.security.allow_default_init_securityindex: "true"
407-
plugins.security.authcz.admin_dn: "CN=generated certificate for pod"
408406
plugins.security.nodes_dn: ["CN=generated certificate for pod"]
409407
plugins.security.ssl.http.enabled: "true"
410408
plugins.security.ssl.http.pemcert_filepath: "{{ test_scenario['values']['opensearch_home'] }}/config/tls/tls.crt"
@@ -439,7 +437,6 @@ data:
439437
network.host: "0.0.0.0"
440438
node.store.allow_mmap: "false"
441439
plugins.security.allow_default_init_securityindex: "true"
442-
plugins.security.authcz.admin_dn: "CN=generated certificate for pod"
443440
plugins.security.nodes_dn: ["CN=generated certificate for pod"]
444441
plugins.security.ssl.http.enabled: "true"
445442
plugins.security.ssl.http.pemcert_filepath: "{{ test_scenario['values']['opensearch_home'] }}/config/tls/tls.crt"

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,16 @@ spec:
5555
annotations:
5656
secrets.stackable.tech/scope: node,pod,service=opensearch-nodes-data-headless
5757
envOverrides:
58-
# TODO Make these the defaults in the image
58+
# Only required for the official image
59+
# The official image (built with https://github.com/opensearch-project/opensearch-build)
60+
# installs a demo configuration if not disabled explicitly.
5961
DISABLE_INSTALL_DEMO_CONFIG: "true"
6062
OPENSEARCH_HOME: {{ test_scenario['values']['opensearch_home'] }}
6163
configOverrides:
62-
# TODO Add the required options to the operator
6364
opensearch.yml:
6465
# Disable memory mapping in this test; If memory mapping were activated, the kernel setting
6566
# vm.max_map_count would have to be increased to 262144 on the node.
6667
node.store.allow_mmap: "false"
67-
# TODO Check that this is safe despite the warning in the documentation
6868
plugins.security.allow_default_init_securityindex: "true"
6969
plugins.security.ssl.transport.enabled: "true"
7070
plugins.security.ssl.transport.pemcert_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/tls.crt
@@ -74,7 +74,6 @@ spec:
7474
plugins.security.ssl.http.pemcert_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/tls.crt
7575
plugins.security.ssl.http.pemkey_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/tls.key
7676
plugins.security.ssl.http.pemtrustedcas_filepath: {{ test_scenario['values']['opensearch_home'] }}/config/tls/ca.crt
77-
plugins.security.authcz.admin_dn: "CN=generated certificate for pod"
7877
podOverrides:
7978
spec:
8079
containers:
@@ -86,8 +85,6 @@ spec:
8685
- name: tls
8786
mountPath: {{ test_scenario['values']['opensearch_home'] }}/config/tls
8887
readOnly: true
89-
securityContext:
90-
fsGroup: 1000
9188
volumes:
9289
- name: security-config
9390
secret:

tests/templates/kuttl/smoke/20-test-opensearch.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ data:
7272
7373
from opensearchpy import OpenSearch
7474
75-
# TODO Use a discovery ConfigMap
76-
7775
host = 'opensearch'
7876
port = 9200
7977
auth = ('admin', 'AJVFsGJBbpT6mChn') # For testing only. Don't store credentials in code.

0 commit comments

Comments
 (0)