Skip to content

Commit

Permalink
Signed-off-by: Kiyo510 <[email protected]> (external-secrets#…
Browse files Browse the repository at this point in the history
…2919)

typo: ref:external-secrets#2917 Fix typo in ExtermalSecretRewriteTransform
  • Loading branch information
Kiyo510 authored Dec 2, 2023
1 parent 3599384 commit 2f043ec
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 53 deletions.
4 changes: 2 additions & 2 deletions apis/externalsecrets/v1beta1/externalsecret_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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"`
Expand Down
32 changes: 16 additions & 16 deletions apis/externalsecrets/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 32 additions & 32 deletions docs/api/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -2190,36 +2190,6 @@ string
</tr>
</tbody>
</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>
<p>
Expand Down Expand Up @@ -2900,8 +2870,8 @@ The resulting key will be the output of a regexp.ReplaceAll operation.</p>
<td>
<code>transform</code></br>
<em>
<a href="#external-secrets.io/v1beta1.ExtermalSecretRewriteTransform">
ExtermalSecretRewriteTransform
<a href="#external-secrets.io/v1beta1.ExternalSecretRewriteTransform">
ExternalSecretRewriteTransform
</a>
</em>
</td>
Expand Down Expand Up @@ -2953,6 +2923,36 @@ string
</tr>
</tbody>
</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>
<p>
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
4 changes: 2 additions & 2 deletions pkg/utils/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ func TestRewrite(t *testing.T) {
},
},
{
Transform: &esv1beta1.ExtermalSecretRewriteTransform{
Transform: &esv1beta1.ExternalSecretRewriteTransform{
Template: `{{ .value | upper | replace "-" "_" }}`,
},
},
Expand All @@ -510,7 +510,7 @@ func TestRewrite(t *testing.T) {
args: args{
operations: []esv1beta1.ExternalSecretRewrite{
{
Transform: &esv1beta1.ExtermalSecretRewriteTransform{
Transform: &esv1beta1.ExternalSecretRewriteTransform{
Template: `{{ .value | lower }}`,
},
},
Expand Down

0 comments on commit 2f043ec

Please sign in to comment.