Explorar o código

fix: handle empty conversionStrategy (#1408)

This is for the case when the conversion webhook does not
set the conversionStrategy properly (it doesn't run the Defaulter).

Signed-off-by: Moritz Johner <beller.moritz@googlemail.com>
Moritz Johner %!s(int64=3) %!d(string=hai) anos
pai
achega
6593e06561
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      pkg/utils/utils.go

+ 3 - 0
pkg/utils/utils.go

@@ -69,6 +69,9 @@ func Decode(strategy esv1beta1.ExternalSecretDecodingStrategy, in []byte) ([]byt
 		return out, nil
 	case esv1beta1.ExternalSecretDecodeNone:
 		return in, nil
+	// default when stored version is v1alpha1
+	case "":
+		return in, nil
 	case esv1beta1.ExternalSecretDecodeAuto:
 		out, err := Decode(esv1beta1.ExternalSecretDecodeBase64, in)
 		if err != nil {