diff --git a/apis/externalsecrets/v1beta1/externalsecret_types.go b/apis/externalsecrets/v1beta1/externalsecret_types.go index 5415a19e6..3d95ffaf7 100644 --- a/apis/externalsecrets/v1beta1/externalsecret_types.go +++ b/apis/externalsecrets/v1beta1/externalsecret_types.go @@ -288,7 +288,7 @@ type ExternalSecretRewrite struct { // Used to apply string transformation on the secrets. // The resulting key will be the output of the template applied by the operation. // +optional - Transform *ExtermalSecretRewriteTransform `json:"transform,omitempty"` + Transform *ExternalSecretRewriteTransform `json:"transform,omitempty"` } type ExternalSecretRewriteRegexp struct { @@ -298,7 +298,7 @@ type ExternalSecretRewriteRegexp struct { Target string `json:"target"` } -type ExtermalSecretRewriteTransform struct { +type ExternalSecretRewriteTransform struct { // Used to define the template to apply on the secret name. // `.value ` will specify the secret name in the template. Template string `json:"template"` diff --git a/apis/externalsecrets/v1beta1/zz_generated.deepcopy.go b/apis/externalsecrets/v1beta1/zz_generated.deepcopy.go index e3bad9739..bbeb1b9d4 100644 --- a/apis/externalsecrets/v1beta1/zz_generated.deepcopy.go +++ b/apis/externalsecrets/v1beta1/zz_generated.deepcopy.go @@ -846,21 +846,6 @@ func (in *DopplerProvider) DeepCopy() *DopplerProvider { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExtermalSecretRewriteTransform) DeepCopyInto(out *ExtermalSecretRewriteTransform) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtermalSecretRewriteTransform. -func (in *ExtermalSecretRewriteTransform) DeepCopy() *ExtermalSecretRewriteTransform { - if in == nil { - return nil - } - out := new(ExtermalSecretRewriteTransform) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ExternalSecret) DeepCopyInto(out *ExternalSecret) { *out = *in @@ -1064,7 +1049,7 @@ func (in *ExternalSecretRewrite) DeepCopyInto(out *ExternalSecretRewrite) { } if in.Transform != nil { in, out := &in.Transform, &out.Transform - *out = new(ExtermalSecretRewriteTransform) + *out = new(ExternalSecretRewriteTransform) **out = **in } } @@ -1094,6 +1079,21 @@ func (in *ExternalSecretRewriteRegexp) DeepCopy() *ExternalSecretRewriteRegexp { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExternalSecretRewriteTransform) DeepCopyInto(out *ExternalSecretRewriteTransform) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalSecretRewriteTransform. +func (in *ExternalSecretRewriteTransform) DeepCopy() *ExternalSecretRewriteTransform { + if in == nil { + return nil + } + out := new(ExternalSecretRewriteTransform) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ExternalSecretSpec) DeepCopyInto(out *ExternalSecretSpec) { *out = *in diff --git a/docs/api/spec.md b/docs/api/spec.md index 5d093f42e..12a76442b 100644 --- a/docs/api/spec.md +++ b/docs/api/spec.md @@ -2190,36 +2190,6 @@ string -
-(Appears on: -ExternalSecretRewrite) -
--
-Field | -Description | -
---|---|
-template
-
-string
-
- |
-
- Used to define the template to apply on the secret name.
- |
-
@@ -2900,8 +2870,8 @@ The resulting key will be the output of a regexp.ReplaceAll operation.
transform
-
-ExtermalSecretRewriteTransform
+
+ExternalSecretRewriteTransform
+(Appears on: +ExternalSecretRewrite) +
++
+Field | +Description | +
---|---|
+template
+
+string
+
+ |
+
+ Used to define the template to apply on the secret name.
+ |
+
diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 930149000..d24f17683 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -93,7 +93,7 @@ func RewriteRegexp(operation esv1beta1.ExternalSecretRewriteRegexp, in map[strin } // RewriteTransform applies string transformation on each secret key name to rewrite. -func RewriteTransform(operation esv1beta1.ExtermalSecretRewriteTransform, in map[string][]byte) (map[string][]byte, error) { +func RewriteTransform(operation esv1beta1.ExternalSecretRewriteTransform, in map[string][]byte) (map[string][]byte, error) { out := make(map[string][]byte) for key, value := range in { data := map[string][]byte{ diff --git a/pkg/utils/utils_test.go b/pkg/utils/utils_test.go index b0d8e8ac7..c1d90289d 100644 --- a/pkg/utils/utils_test.go +++ b/pkg/utils/utils_test.go @@ -490,7 +490,7 @@ func TestRewrite(t *testing.T) { }, }, { - Transform: &esv1beta1.ExtermalSecretRewriteTransform{ + Transform: &esv1beta1.ExternalSecretRewriteTransform{ Template: `{{ .value | upper | replace "-" "_" }}`, }, }, @@ -510,7 +510,7 @@ func TestRewrite(t *testing.T) { args: args{ operations: []esv1beta1.ExternalSecretRewrite{ { - Transform: &esv1beta1.ExtermalSecretRewriteTransform{ + Transform: &esv1beta1.ExternalSecretRewriteTransform{ Template: `{{ .value | lower }}`, }, },