@@ -3,7 +3,9 @@ spring:
|
||||
kubernetes:
|
||||
secrets:
|
||||
paths:
|
||||
- /tmp/application.properties
|
||||
# at the moment, we do not support reading properties/yaml/yml
|
||||
# files when mounting via 'paths'
|
||||
- /tmp/from.properties.secret.key
|
||||
enabled: true
|
||||
|
||||
config:
|
||||
|
||||
@@ -103,7 +103,7 @@ class K8sClientSecretMountBootstrapPollingIT extends K8sClientReloadBase {
|
||||
V1Secret secret = (V1Secret) util.yaml("mount/secret.yaml");
|
||||
secret.setData(Map.of(Constants.APPLICATION_PROPERTIES, Base64.getEncoder()
|
||||
.encode("from.properties.secret.key=as-mount-changed".getBytes(StandardCharsets.UTF_8))));
|
||||
coreV1Api.readNamespacedSecret("secret-reload", NAMESPACE, null);
|
||||
coreV1Api.replaceNamespacedSecret("secret-reload", NAMESPACE, secret, null, null, null, null);
|
||||
|
||||
Commons.waitForLogStatement("Detected change in config maps/secrets, reload will be triggered", K3S,
|
||||
IMAGE_NAME);
|
||||
|
||||
@@ -5,5 +5,4 @@ metadata:
|
||||
namespace: default
|
||||
data:
|
||||
# from.properties.secret.key=initial
|
||||
application.properties: |
|
||||
ZnJvbS5wcm9wZXJ0aWVzLnNlY3JldC5rZXk9aW5pdGlhbA==
|
||||
from.properties.secret.key: aW5pdGlhbA==
|
||||
|
||||
Reference in New Issue
Block a user