|
1 | 1 | //! Configuration of an OpenSearch node |
2 | 2 |
|
| 3 | +use std::iter; |
| 4 | + |
3 | 5 | use serde_json::json; |
4 | 6 | use stackable_operator::{ |
5 | 7 | builder::pod::container::FieldPathEnvVar, commons::networking::DomainName, |
@@ -238,6 +240,10 @@ impl NodeConfig { |
238 | 240 | /// The list looks similar to: |
239 | 241 | /// - DC=local,DC=cluster,DC=svc,DC=my-namespace,DC=opensearch-nodes-cluster-manager-headless,DC=opensearch-nodes-cluster-manager-* |
240 | 242 | /// - DC=local,DC=cluster,DC=svc,DC=my-namespace,DC=opensearch-nodes-data-headless,DC=opensearch-nodes-data-* |
| 243 | + /// - CN=generated certificate for pod |
| 244 | + /// |
| 245 | + /// The entry "CN=generated certificate for pod" is still added to make the transition from |
| 246 | + /// SDP 26.3 to 26.7 possible. |
241 | 247 | fn nodes_dn(&self) -> Vec<String> { |
242 | 248 | self.cluster |
243 | 249 | .role_group_configs |
@@ -265,6 +271,11 @@ impl NodeConfig { |
265 | 271 | .collect::<Vec<_>>() |
266 | 272 | .join(",") |
267 | 273 | }) |
| 274 | + // TODO Remove "CN=generated certificate for pod" after the release of SDP 26.7 and |
| 275 | + // adapt the comment of the function and the tests. |
| 276 | + // |
| 277 | + // tracked in https://github.com/stackabletech/opensearch-operator/issues/145 |
| 278 | + .chain(iter::once("CN=generated certificate for pod".to_owned())) |
268 | 279 | .collect() |
269 | 280 | } |
270 | 281 |
|
@@ -691,6 +702,7 @@ mod tests { |
691 | 702 | "plugins.security.authcz.admin_dn: CN=update-security-config.0b1e30e6-326e-4c1a-868d-ad6598b49e8b\n", |
692 | 703 | "plugins.security.nodes_dn:\n", |
693 | 704 | "- DC=local,DC=cluster,DC=svc,DC=default,DC=my-opensearch-cluster-nodes-default-headless,DC=my-opensearch-cluster-nodes-default-*\n", |
| 705 | + "- CN=generated certificate for pod\n", |
694 | 706 | "plugins.security.ssl.http.enabled: true\n", |
695 | 707 | "plugins.security.ssl.http.pemcert_filepath: /stackable/opensearch/config/tls/server/tls.crt\n", |
696 | 708 | "plugins.security.ssl.http.pemkey_filepath: /stackable/opensearch/config/tls/server/tls.key\n", |
|
0 commit comments