Skip to content

Commit b7cc589

Browse files
committed
scaffold-controller: add +orc:kustomize:ref marker to generated Ref fields
1 parent 3406aba commit b7cc589

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

cmd/scaffold-controller/data/api/types.go.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,15 @@ type {{ .Kind }}ResourceSpec struct {
3333
// {{ . | camelCase }}Ref is a reference to the ORC {{ . }} which this resource is associated with.
3434
// +required
3535
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="{{ . | camelCase }}Ref is immutable"
36+
// +orc:kustomize:ref={{ . }}
3637
{{ . }}Ref KubernetesNameRef `json:"{{ . | camelCase }}Ref,omitempty"`
3738
{{- end }}
3839
{{- range .OptionalCreateDependencies }}
3940

4041
// {{ . | camelCase }}Ref is a reference to the ORC {{ . }} which this resource is associated with.
4142
// +optional
4243
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="{{ . | camelCase }}Ref is immutable"
44+
// +orc:kustomize:ref={{ . }}
4345
{{ . }}Ref *KubernetesNameRef `json:"{{ . | camelCase }}Ref,omitempty"`
4446
{{- end }}
4547

@@ -68,6 +70,7 @@ type {{ .Kind }}Filter struct {
6870

6971
// {{ . | camelCase }}Ref is a reference to the ORC {{ . }} which this resource is associated with.
7072
// +optional
73+
// +orc:kustomize:ref={{ . }}
7174
{{ . }}Ref *KubernetesNameRef `json:"{{ . | camelCase }}Ref,omitempty"`
7275
{{- end }}
7376

0 commit comments

Comments
 (0)