Skip to content

Commit 22ea761

Browse files
authored
fix for external secret (#6470)
1 parent c3830d3 commit 22ea761

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

api/bean/ConfigMapAndSecret.go

+3
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ func GetTransformedDataForSecretRootJsonData(data string, mode util.SecretTransf
8080
}
8181

8282
for _, configData := range secretsJson.ConfigSecretJson.Secrets {
83+
if configData.Data == nil || configData.External {
84+
continue
85+
}
8386
configData.Data, err = util.GetDecodedAndEncodedData(configData.Data, mode)
8487
if err != nil {
8588
return "", err

pkg/bean/configSecretData.go

+6
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ func GetTransformedDataForSecretConfigData(data string, mode util.SecretTransfor
8888
}
8989

9090
for _, configData := range secretDataMap {
91+
if configData.Data == nil || configData.External {
92+
continue
93+
}
9194
data, err := util.GetDecodedAndEncodedData(configData.Data, mode)
9295
if err != nil {
9396
return "", err
@@ -110,6 +113,9 @@ func (SecretList) GetTransformedDataForSecret(data string, mode util.SecretTrans
110113
}
111114

112115
for _, configData := range secretsList.ConfigData {
116+
if configData.Data == nil || configData.External {
117+
continue
118+
}
113119
configData.Data, err = util.GetDecodedAndEncodedData(configData.Data, mode)
114120
if err != nil {
115121
return "", err

0 commit comments

Comments
 (0)