Skip to content

Commit

Permalink
Fix s3 key creation
Browse files Browse the repository at this point in the history
  • Loading branch information
markbaumgarten committed Jan 9, 2025
1 parent 2e78967 commit 903c47b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions opensearch-operator/pkg/builders/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,11 +420,13 @@ func NewSTSForNodePool(
#!/usr/bin/env bash
set -euo pipefail
/usr/share/opensearch/bin/opensearch-keystore create
if [ ! -f /usr/share/opensearch/config/opensearch.keystore ]; then
/usr/share/opensearch/bin/opensearch-keystore create
fi
for i in /tmp/keystoreSecrets/*/*; do
key=$(basename $i)
echo "Adding file $i to keystore key $key"
/usr/share/opensearch/bin/opensearch-keystore add-file "$key" "$i"
/usr/share/opensearch/bin/opensearch-keystore add-file "$key" "$i" --force
done
# Add the bootstrap password since otherwise the opensearch entrypoint tries to do this on startup
Expand Down Expand Up @@ -939,7 +941,7 @@ func NewBootstrapPod(
for i in /tmp/keystoreSecrets/*/*; do
key=$(basename $i)
echo "Adding file $i to keystore key $key"
/usr/share/opensearch/bin/opensearch-keystore add-file "$key" "$i"
/usr/share/opensearch/bin/opensearch-keystore add-file "$key" "$i" --force
done
# Add the bootstrap password since otherwise the opensearch entrypoint tries to do this on startup
Expand Down Expand Up @@ -1254,4 +1256,4 @@ func NewServiceMonitor(cr *opsterv1.OpenSearchCluster) *monitoring.ServiceMonito
NamespaceSelector: namespaceSelector,
},
}
}
}

0 comments on commit 903c47b

Please sign in to comment.