Skip to content
Snippets Groups Projects
Commit 30263893 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-4453 get password from data instead of string data

parent c0357937
No related branches found
No related tags found
No related merge requests found
...@@ -45,7 +45,7 @@ public class ElasticsearchReconciler implements Reconciler<OzgCloudElasticsearch ...@@ -45,7 +45,7 @@ public class ElasticsearchReconciler implements Reconciler<OzgCloudElasticsearch
log.info("get password for elastic user..."); log.info("get password for elastic user...");
log.info(String.format("from secret string map: %s", secret.getStringData())); log.info(String.format("from secret string map: %s", secret.getStringData()));
log.info(String.format("from secret data map: %s", secret.getData())); log.info(String.format("from secret data map: %s", secret.getData()));
return MapUtils.getString(secret.getStringData(), OzgCloudElasticsearchSecretHelper.CREDENTIAL_SECRET_PASSWORD_FIELD); return MapUtils.getString(secret.getData(), OzgCloudElasticsearchSecretHelper.CREDENTIAL_SECRET_PASSWORD_FIELD);
} }
UpdateControl<OzgCloudElasticsearchCustomResource> buildExceptionUpdateControl(OzgCloudElasticsearchCustomResource resource, Exception e) { UpdateControl<OzgCloudElasticsearchCustomResource> buildExceptionUpdateControl(OzgCloudElasticsearchCustomResource resource, Exception e) {
......
...@@ -37,7 +37,7 @@ class ElasticsearchReconcilerTest { ...@@ -37,7 +37,7 @@ class ElasticsearchReconcilerTest {
private final OzgCloudElasticsearchCustomResource resource = ElasticsearchCustomResourceTestFactory.create(); private final OzgCloudElasticsearchCustomResource resource = ElasticsearchCustomResourceTestFactory.create();
private final static String PASSWORD = "dummyPassword"; private final static String PASSWORD = "dummyPassword";
private final Secret secret = SecretTestFactory.createBuilder().addToStringData(OzgCloudElasticsearchSecretHelper.CREDENTIAL_SECRET_PASSWORD_FIELD, PASSWORD).build(); private final Secret secret = SecretTestFactory.createBuilder().addToData(OzgCloudElasticsearchSecretHelper.CREDENTIAL_SECRET_PASSWORD_FIELD, PASSWORD).build();
@DisplayName("process flow") @DisplayName("process flow")
@Nested @Nested
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment