Skip to content

Commit 815fb2e

Browse files
committed
rename template to secretTemplate
1 parent 1e583aa commit 815fb2e

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ spec:
174174
privileges: OWNER # Can be OWNER/READ/WRITE
175175
annotations: # Annotations to be propagated to the secrets metadata section (optional)
176176
foo: "bar"
177-
template: # Output secrets can be customized using standard Go templates
177+
secretTemplate: # Output secrets can be customized using standard Go templates
178178
PQ_URL: "host={{.Host}} user={{.Role}} password={{.Password}} dbname={{.Database}}"
179179
```
180180

deploy/crds/db.movetokube.com_postgresusers_crd.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ spec:
4343
type: string
4444
secretName:
4545
type: string
46-
template:
46+
secretTemplate:
4747
additionalProperties:
4848
type: string
4949
type: object

pkg/apis/db/v1alpha1/postgresuser_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type PostgresUserSpec struct {
1414
Database string `json:"database"`
1515
SecretName string `json:"secretName"`
1616
// +optional
17-
Template map[string]string `json:"template,omitempty"` // key-value, where key is secret field, value is go template
17+
SecretTemplate map[string]string `json:"secretTemplate,omitempty"` // key-value, where key is secret field, value is go template
1818
// +optional
1919
Privileges string `json:"privileges"`
2020
// +optional

pkg/apis/db/v1alpha1/zz_generated.deepcopy.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/controller/postgresuser/postgresuser_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ func (r *ReconcilePostgresUser) newSecretForCR(cr *dbv1alpha1.PostgresUser, role
288288
name = cr.Spec.SecretName
289289
}
290290

291-
templateData, err := renderTemplate(cr.Spec.Template, templateContext{
291+
templateData, err := renderTemplate(cr.Spec.SecretTemplate, templateContext{
292292
Role: role,
293293
Host: r.pgHost,
294294
Database: cr.Status.DatabaseName,

0 commit comments

Comments
 (0)