Skip to content

Commit

Permalink
fix: workaround for deserialization of credentials in k8srunnable: re…
Browse files Browse the repository at this point in the history
…name field
  • Loading branch information
matteo-s committed Feb 12, 2025
1 parent 66fbd41 commit 532fd9f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -917,10 +917,10 @@ protected V1Secret buildRunSecret(T runnable) {
}

//set core credentials as env with prefix (when required)
if (runnable.getCredentials() != null) {
if (runnable.getCredentialsMap() != null) {
String envsPrefix = k8sSecretHelper.getEnvsPrefix();
runnable
.getCredentials()
.getCredentialsMap()
.entrySet()
.forEach(e -> {
if (envsPrefix != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public class K8sRunnable implements RunRunnable, SecuredRunnable, CredentialsCon
private List<CoreMetric> metrics;

@ToString.Exclude
private Map<String, String> credentials;
private Map<String, String> credentialsMap;

@JsonProperty("context_refs")
private List<ContextRef> contextRefs;
Expand All @@ -115,14 +115,14 @@ public String getFramework() {

@Override
public void eraseCredentials() {
this.credentials = null;
this.credentialsMap = null;
}

@Override
public void setCredentials(Collection<Credentials> credentials) {
if (credentials != null) {
//export to map
this.credentials =
this.credentialsMap =
credentials
.stream()
.flatMap(c -> c.toMap().entrySet().stream())
Expand Down

0 comments on commit 532fd9f

Please sign in to comment.