From 23df80e247cf337141829ad0099b57e17f919bd4 Mon Sep 17 00:00:00 2001 From: Chris Doherty Date: Wed, 25 Oct 2023 06:45:02 -0500 Subject: [PATCH] Make the Template API namespace field singular Signed-off-by: Chris Doherty --- api/v1alpha2/template.go | 6 +++--- api/v1alpha2/zz_generated.deepcopy.go | 14 +++++++------- config/crd/bases/tinkerbell.org_templates.yaml | 2 +- config/crd/bases/tinkerbell.org_workflows.yaml | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/api/v1alpha2/template.go b/api/v1alpha2/template.go index 5ef50e001..fa8843631 100644 --- a/api/v1alpha2/template.go +++ b/api/v1alpha2/template.go @@ -49,9 +49,9 @@ type Action struct { // +optional Volumes []Volume `json:"volumes,omitempty"` - // Namespaces defines the Linux namespaces this container should execute in. + // Namespace defines the Linux namespaces this container should execute in. // +optional - Namespaces *Namespaces `json:"namespaces,omitempty"` + Namespace *Namespace `json:"namespaces,omitempty"` } // Volume is a specification for mounting a volume in an action. Volumes take the form @@ -71,7 +71,7 @@ type Volume string // Namespace defines the Linux namespaces to use for the container. // See https://man7.org/linux/man-pages/man7/namespaces.7.html. -type Namespaces struct { +type Namespace struct { // Network defines the network namespace. // +optional Network *string `json:"network,omitempty"` diff --git a/api/v1alpha2/zz_generated.deepcopy.go b/api/v1alpha2/zz_generated.deepcopy.go index e190b376b..12fcb75cc 100644 --- a/api/v1alpha2/zz_generated.deepcopy.go +++ b/api/v1alpha2/zz_generated.deepcopy.go @@ -51,9 +51,9 @@ func (in *Action) DeepCopyInto(out *Action) { *out = make([]Volume, len(*in)) copy(*out, *in) } - if in.Namespaces != nil { - in, out := &in.Namespaces, &out.Namespaces - *out = new(Namespaces) + if in.Namespace != nil { + in, out := &in.Namespace, &out.Namespace + *out = new(Namespace) (*in).DeepCopyInto(*out) } } @@ -344,7 +344,7 @@ func (in *Instance) DeepCopy() *Instance { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Namespaces) DeepCopyInto(out *Namespaces) { +func (in *Namespace) DeepCopyInto(out *Namespace) { *out = *in if in.Network != nil { in, out := &in.Network, &out.Network @@ -358,12 +358,12 @@ func (in *Namespaces) DeepCopyInto(out *Namespaces) { } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Namespaces. -func (in *Namespaces) DeepCopy() *Namespaces { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Namespace. +func (in *Namespace) DeepCopy() *Namespace { if in == nil { return nil } - out := new(Namespaces) + out := new(Namespace) in.DeepCopyInto(out) return out } diff --git a/config/crd/bases/tinkerbell.org_templates.yaml b/config/crd/bases/tinkerbell.org_templates.yaml index d027cce41..4d21fa013 100644 --- a/config/crd/bases/tinkerbell.org_templates.yaml +++ b/config/crd/bases/tinkerbell.org_templates.yaml @@ -93,7 +93,7 @@ spec: description: Name is a name for the action. type: string namespaces: - description: Namespaces defines the Linux namespaces this container should execute in. + description: Namespace defines the Linux namespaces this container should execute in. properties: network: description: Network defines the network namespace. diff --git a/config/crd/bases/tinkerbell.org_workflows.yaml b/config/crd/bases/tinkerbell.org_workflows.yaml index 0dbd65461..abe5e82af 100644 --- a/config/crd/bases/tinkerbell.org_workflows.yaml +++ b/config/crd/bases/tinkerbell.org_workflows.yaml @@ -228,7 +228,7 @@ spec: description: Name is a name for the action. type: string namespaces: - description: Namespaces defines the Linux namespaces this container should execute in. + description: Namespace defines the Linux namespaces this container should execute in. properties: network: description: Network defines the network namespace.