Skip to content

Conversation

@labrenbe
Copy link
Member

@labrenbe labrenbe commented Nov 21, 2025

Description

Allow referencing Secret keys in the OpenSearch config to add them as entries to the OpenSearch keystore.

Part of #44.

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

  • Changes are OpenShift compatible
  • CRD changes approved
  • CRD documentation for all fields, following the style guide.
  • Helm chart can be installed and deployed operator works
  • Integration tests passed (for non trivial changes)
  • Changes need to be "offline" compatible
  • Links to generated (nightly) docs added
  • Release note snippet added

Reviewer

  • Code contains useful comments
  • (Integration-)Test cases added
  • Documentation added or updated. Follows the style guide.
  • Changelog updated
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Acceptance

  • Feature Tracker has been updated
  • Proper release label has been added
  • Links to generated (nightly) docs added
  • Release note snippet added
  • Add type/deprecation label & add to the deprecation schedule
  • Add type/experimental label & add to the experimental features tracker

@labrenbe labrenbe self-assigned this Nov 21, 2025
@labrenbe labrenbe moved this to Development: In Progress in Stackable Engineering Nov 21, 2025
@labrenbe labrenbe marked this pull request as ready for review November 21, 2025 10:36
@labrenbe labrenbe moved this from Development: In Progress to Development: Waiting for Review in Stackable Engineering Nov 21, 2025
@siegfriedweber siegfriedweber mentioned this pull request Dec 2, 2025
3 tasks
@siegfriedweber siegfriedweber moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Dec 3, 2025
Comment on lines 385 to 388
crd::{
NodeRoles,
v1alpha1::{self, OpenSearchKeystore, SecretKeyRef},
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We decided to use the versioned module explicitly.

Suggested change
crd::{
NodeRoles,
v1alpha1::{self, OpenSearchKeystore, SecretKeyRef},
},
crd::{NodeRoles, v1alpha1},

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is generated by make regenerate-charts.

Comment on lines 9 to 28
---
apiVersion: opensearch.stackable.tech/v1alpha1
kind: OpenSearchCluster
metadata:
name: opensearch
spec:
clusterConfig:
keystore:
- key: s3.client.default.access_key # <1>
secretKeyRef:
name: s3-credentials # <2>
key: accessKey # <3>
- key: s3.client.default.secret_key
secretKeyRef:
name: s3-credentials
key: secretKey
nodes:
roleGroups:
default:
replicas: 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a complete specification with the header and role group definition, but it is not working (at least the image property is missing and the TLS configuration). Should we just leave out the unnecessary fields such as nodes and replace it with ...?

Comment on lines 200 to 205
vec![v1alpha1::OpenSearchKeystore {
key: OpenSearchKeystoreKey::from_str_unsafe("Keystore1"),
secret_key_ref: v1alpha1::SecretKeyRef {
name: SecretName::from_str_unsafe("my-keystore-secret"),
key: SecretKey::from_str_unsafe("my-keystore-file"),
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenSearchKeystore is not used in this module and should therefore not be added.

Comment on lines 510 to 516
vec![OpenSearchKeystore {
key: OpenSearchKeystoreKey::from_str_unsafe("Keystore1"),
secret_key_ref: SecretKeyRef {
name: SecretName::from_str_unsafe("my-keystore-secret"),
key: SecretKey::from_str_unsafe("my-keystore-file"),
},
}],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no assertion for OpenSearchKeystore. I would remove it from the test.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes must also be applied to 51-install-opensearch-2.yaml.j2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development: In Review

Development

Successfully merging this pull request may close these issues.

3 participants