mirror of
https://github.com/external-secrets/external-secrets.git
synced 2024-12-15 17:51:01 +00:00
Signed-off-by: Kiyo510 <miraishida00510@gmail.com> (#2919)
typo: ref:#2917 Fix typo in ExtermalSecretRewriteTransform
This commit is contained in:
parent
3599384660
commit
2f043ecaed
5 changed files with 53 additions and 53 deletions
|
@ -288,7 +288,7 @@ type ExternalSecretRewrite struct {
|
||||||
// Used to apply string transformation on the secrets.
|
// Used to apply string transformation on the secrets.
|
||||||
// The resulting key will be the output of the template applied by the operation.
|
// The resulting key will be the output of the template applied by the operation.
|
||||||
// +optional
|
// +optional
|
||||||
Transform *ExtermalSecretRewriteTransform `json:"transform,omitempty"`
|
Transform *ExternalSecretRewriteTransform `json:"transform,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ExternalSecretRewriteRegexp struct {
|
type ExternalSecretRewriteRegexp struct {
|
||||||
|
@ -298,7 +298,7 @@ type ExternalSecretRewriteRegexp struct {
|
||||||
Target string `json:"target"`
|
Target string `json:"target"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ExtermalSecretRewriteTransform struct {
|
type ExternalSecretRewriteTransform struct {
|
||||||
// Used to define the template to apply on the secret name.
|
// Used to define the template to apply on the secret name.
|
||||||
// `.value ` will specify the secret name in the template.
|
// `.value ` will specify the secret name in the template.
|
||||||
Template string `json:"template"`
|
Template string `json:"template"`
|
||||||
|
|
|
@ -846,21 +846,6 @@ func (in *DopplerProvider) DeepCopy() *DopplerProvider {
|
||||||
return out
|
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.
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
func (in *ExternalSecret) DeepCopyInto(out *ExternalSecret) {
|
func (in *ExternalSecret) DeepCopyInto(out *ExternalSecret) {
|
||||||
*out = *in
|
*out = *in
|
||||||
|
@ -1064,7 +1049,7 @@ func (in *ExternalSecretRewrite) DeepCopyInto(out *ExternalSecretRewrite) {
|
||||||
}
|
}
|
||||||
if in.Transform != nil {
|
if in.Transform != nil {
|
||||||
in, out := &in.Transform, &out.Transform
|
in, out := &in.Transform, &out.Transform
|
||||||
*out = new(ExtermalSecretRewriteTransform)
|
*out = new(ExternalSecretRewriteTransform)
|
||||||
**out = **in
|
**out = **in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1094,6 +1079,21 @@ func (in *ExternalSecretRewriteRegexp) DeepCopy() *ExternalSecretRewriteRegexp {
|
||||||
return out
|
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.
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
func (in *ExternalSecretSpec) DeepCopyInto(out *ExternalSecretSpec) {
|
func (in *ExternalSecretSpec) DeepCopyInto(out *ExternalSecretSpec) {
|
||||||
*out = *in
|
*out = *in
|
||||||
|
|
|
@ -2190,36 +2190,6 @@ string
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<h3 id="external-secrets.io/v1beta1.ExtermalSecretRewriteTransform">ExtermalSecretRewriteTransform
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
(<em>Appears on:</em>
|
|
||||||
<a href="#external-secrets.io/v1beta1.ExternalSecretRewrite">ExternalSecretRewrite</a>)
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
</p>
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Field</th>
|
|
||||||
<th>Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<code>template</code></br>
|
|
||||||
<em>
|
|
||||||
string
|
|
||||||
</em>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<p>Used to define the template to apply on the secret name.
|
|
||||||
<code>.value</code> will specify the secret name in the template.</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<h3 id="external-secrets.io/v1beta1.ExternalSecret">ExternalSecret
|
<h3 id="external-secrets.io/v1beta1.ExternalSecret">ExternalSecret
|
||||||
</h3>
|
</h3>
|
||||||
<p>
|
<p>
|
||||||
|
@ -2900,8 +2870,8 @@ The resulting key will be the output of a regexp.ReplaceAll operation.</p>
|
||||||
<td>
|
<td>
|
||||||
<code>transform</code></br>
|
<code>transform</code></br>
|
||||||
<em>
|
<em>
|
||||||
<a href="#external-secrets.io/v1beta1.ExtermalSecretRewriteTransform">
|
<a href="#external-secrets.io/v1beta1.ExternalSecretRewriteTransform">
|
||||||
ExtermalSecretRewriteTransform
|
ExternalSecretRewriteTransform
|
||||||
</a>
|
</a>
|
||||||
</em>
|
</em>
|
||||||
</td>
|
</td>
|
||||||
|
@ -2953,6 +2923,36 @@ string
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<h3 id="external-secrets.io/v1beta1.ExternalSecretRewriteTransform">ExternalSecretRewriteTransform
|
||||||
|
</h3>
|
||||||
|
<p>
|
||||||
|
(<em>Appears on:</em>
|
||||||
|
<a href="#external-secrets.io/v1beta1.ExternalSecretRewrite">ExternalSecretRewrite</a>)
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
</p>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Field</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>template</code></br>
|
||||||
|
<em>
|
||||||
|
string
|
||||||
|
</em>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<p>Used to define the template to apply on the secret name.
|
||||||
|
<code>.value</code> will specify the secret name in the template.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
<h3 id="external-secrets.io/v1beta1.ExternalSecretSpec">ExternalSecretSpec
|
<h3 id="external-secrets.io/v1beta1.ExternalSecretSpec">ExternalSecretSpec
|
||||||
</h3>
|
</h3>
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -93,7 +93,7 @@ func RewriteRegexp(operation esv1beta1.ExternalSecretRewriteRegexp, in map[strin
|
||||||
}
|
}
|
||||||
|
|
||||||
// RewriteTransform applies string transformation on each secret key name to rewrite.
|
// 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)
|
out := make(map[string][]byte)
|
||||||
for key, value := range in {
|
for key, value := range in {
|
||||||
data := map[string][]byte{
|
data := map[string][]byte{
|
||||||
|
|
|
@ -490,7 +490,7 @@ func TestRewrite(t *testing.T) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Transform: &esv1beta1.ExtermalSecretRewriteTransform{
|
Transform: &esv1beta1.ExternalSecretRewriteTransform{
|
||||||
Template: `{{ .value | upper | replace "-" "_" }}`,
|
Template: `{{ .value | upper | replace "-" "_" }}`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -510,7 +510,7 @@ func TestRewrite(t *testing.T) {
|
||||||
args: args{
|
args: args{
|
||||||
operations: []esv1beta1.ExternalSecretRewrite{
|
operations: []esv1beta1.ExternalSecretRewrite{
|
||||||
{
|
{
|
||||||
Transform: &esv1beta1.ExtermalSecretRewriteTransform{
|
Transform: &esv1beta1.ExternalSecretRewriteTransform{
|
||||||
Template: `{{ .value | lower }}`,
|
Template: `{{ .value | lower }}`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue