diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 561326b..1bd5983 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Tinkerbell. @@ -22,7 +21,9 @@ limitations under the License. package v1alpha1 import ( + "k8s.io/api/core/v1" runtime "k8s.io/apimachinery/pkg/runtime" + "net/http" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -71,6 +72,82 @@ func (in *Connection) DeepCopy() *Connection { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExperimentalOpts) DeepCopyInto(out *ExperimentalOpts) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExperimentalOpts. +func (in *ExperimentalOpts) DeepCopy() *ExperimentalOpts { + if in == nil { + return nil + } + out := new(ExperimentalOpts) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HMACOpts) DeepCopyInto(out *HMACOpts) { + *out = *in + if in.Secrets != nil { + in, out := &in.Secrets, &out.Secrets + *out = make(RPCSecrets, len(*in)) + for key, val := range *in { + var outVal []v1.SecretReference + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = make([]v1.SecretReference, len(*in)) + copy(*out, *in) + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HMACOpts. +func (in *HMACOpts) DeepCopy() *HMACOpts { + if in == nil { + return nil + } + out := new(HMACOpts) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IPMITOOLOptions) DeepCopyInto(out *IPMITOOLOptions) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPMITOOLOptions. +func (in *IPMITOOLOptions) DeepCopy() *IPMITOOLOptions { + if in == nil { + return nil + } + out := new(IPMITOOLOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IntelAMTOptions) DeepCopyInto(out *IntelAMTOptions) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntelAMTOptions. +func (in *IntelAMTOptions) DeepCopy() *IntelAMTOptions { + if in == nil { + return nil + } + out := new(IntelAMTOptions) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Job) DeepCopyInto(out *Job) { *out = *in @@ -201,7 +278,7 @@ func (in *Machine) DeepCopyInto(out *Machine) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec + in.Spec.DeepCopyInto(&out.Spec) in.Status.DeepCopyInto(&out.Status) } @@ -290,6 +367,7 @@ func (in *MachineRef) DeepCopy() *MachineRef { func (in *MachineSpec) DeepCopyInto(out *MachineSpec) { *out = *in out.Connection = in.Connection + in.ProviderOptions.DeepCopyInto(&out.ProviderOptions) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineSpec. @@ -344,6 +422,156 @@ func (in *OneTimeBootDeviceAction) DeepCopy() *OneTimeBootDeviceAction { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProviderOptions) DeepCopyInto(out *ProviderOptions) { + *out = *in + if in.IntelAMT != nil { + in, out := &in.IntelAMT, &out.IntelAMT + *out = new(IntelAMTOptions) + **out = **in + } + if in.IPMITOOL != nil { + in, out := &in.IPMITOOL, &out.IPMITOOL + *out = new(IPMITOOLOptions) + **out = **in + } + if in.Redfish != nil { + in, out := &in.Redfish, &out.Redfish + *out = new(RedfishOptions) + **out = **in + } + if in.RPC != nil { + in, out := &in.RPC, &out.RPC + *out = new(RPCOptions) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderOptions. +func (in *ProviderOptions) DeepCopy() *ProviderOptions { + if in == nil { + return nil + } + out := new(ProviderOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RPCOptions) DeepCopyInto(out *RPCOptions) { + *out = *in + in.Request.DeepCopyInto(&out.Request) + in.Signature.DeepCopyInto(&out.Signature) + in.HMAC.DeepCopyInto(&out.HMAC) + out.Experimental = in.Experimental +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RPCOptions. +func (in *RPCOptions) DeepCopy() *RPCOptions { + if in == nil { + return nil + } + out := new(RPCOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in RPCSecrets) DeepCopyInto(out *RPCSecrets) { + { + in := &in + *out = make(RPCSecrets, len(*in)) + for key, val := range *in { + var outVal []v1.SecretReference + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = make([]v1.SecretReference, len(*in)) + copy(*out, *in) + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RPCSecrets. +func (in RPCSecrets) DeepCopy() RPCSecrets { + if in == nil { + return nil + } + out := new(RPCSecrets) + in.DeepCopyInto(out) + return *out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RedfishOptions) DeepCopyInto(out *RedfishOptions) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedfishOptions. +func (in *RedfishOptions) DeepCopy() *RedfishOptions { + if in == nil { + return nil + } + out := new(RedfishOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RequestOpts) DeepCopyInto(out *RequestOpts) { + *out = *in + if in.StaticHeaders != nil { + in, out := &in.StaticHeaders, &out.StaticHeaders + *out = make(http.Header, len(*in)) + for key, val := range *in { + var outVal []string + if val == nil { + (*out)[key] = nil + } else { + inVal := (*in)[key] + in, out := &inVal, &outVal + *out = make([]string, len(*in)) + copy(*out, *in) + } + (*out)[key] = outVal + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestOpts. +func (in *RequestOpts) DeepCopy() *RequestOpts { + if in == nil { + return nil + } + out := new(RequestOpts) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SignatureOpts) DeepCopyInto(out *SignatureOpts) { + *out = *in + if in.IncludedPayloadHeaders != nil { + in, out := &in.IncludedPayloadHeaders, &out.IncludedPayloadHeaders + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SignatureOpts. +func (in *SignatureOpts) DeepCopy() *SignatureOpts { + if in == nil { + return nil + } + out := new(SignatureOpts) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Task) DeepCopyInto(out *Task) { *out = *in diff --git a/config/crd/bases/bmc.tinkerbell.org_machines.yaml b/config/crd/bases/bmc.tinkerbell.org_machines.yaml index e7ead1a..10bba5a 100644 --- a/config/crd/bases/bmc.tinkerbell.org_machines.yaml +++ b/config/crd/bases/bmc.tinkerbell.org_machines.yaml @@ -72,172 +72,171 @@ spec: - insecureTLS - port type: object - providerOpts: + providerOptions: description: ProviderOptions contains provider specific options. properties: intelAMT: - description: IPMI contains ipmi provider options. + description: IntelAMT contains the options to customize the IntelAMT + provider. properties: port: + description: Port that intelAMT will use for calls. type: integer required: - port type: object ipmitool: - description: IPMITOOL contains ipmitool provider options. + description: IPMITOOL contains the options to customize the Ipmitool + provider. properties: cipherSuite: + description: CipherSuite that ipmitool will use for calls. type: string port: + description: Port that ipmitool will use for calls. type: integer required: - cipherSuite - port type: object redfish: - description: Redfish contains redfish provider options. + description: Redfish contains the options to customize the Redfish + provider. properties: port: + description: Port that redfish will use for calls. type: integer required: - port type: object rpc: - description: RPC contains rpc provider options. + description: RPC contains the options to customize the RPC provider. properties: consumerURL: description: ConsumerURL is the URL where an rpc consumer/listener is running and to which we will send and receive all notifications. type: string + experimental: + description: Experimental options. + properties: + customRequestPayload: + description: CustomRequestPayload must be in json. + type: string + dotPath: + description: 'DotPath is the path to the json object where + the bmclib RequestPayload{} struct will be embedded. + For example: object.data.body' + type: string + required: + - customRequestPayload + - dotPath + type: object + hmac: + description: HMAC is the options used to create a HMAC signature. + properties: + prefixSigDisabled: + description: 'PrefixSigDisabled determines whether the + algorithm will be prefixed to the signature. Example: + sha256=abc123' + type: boolean + secrets: + additionalProperties: + items: + description: SecretReference represents a Secret Reference. + It has enough information to retrieve secret in + any namespace + properties: + name: + description: name is unique within a namespace + to reference a secret resource. + type: string + namespace: + description: namespace defines the space within + which the secret name must be unique. + type: string + type: object + x-kubernetes-map-type: atomic + type: array + description: Secrets are a map of algorithms to secrets + used for signing. + type: object + required: + - prefixSigDisabled + - secrets + type: object logNotificationsDisabled: description: LogNotificationsDisabled determines whether responses from rpc consumer/listeners will be logged or not. type: boolean - opts: - description: Opts are the options for the rpc provider. + request: + description: Request is the options used to create the rpc + HTTP request. properties: - experimental: - description: Experimental options. - properties: - customRequestPayload: - description: CustomRequestPayload must be in json. + httpContentType: + description: HTTPContentType is the content type to use + for the rpc request notification. + type: string + httpMethod: + description: HTTPMethod is the HTTP method to use for + the rpc request notification. + type: string + staticHeaders: + additionalProperties: + items: type: string - dotPath: - description: 'DotPath is the path to where the bmclib - RequestPayload{} will be embedded. For example: - object.data.body' - type: string - required: - - customRequestPayload - - dotPath - type: object - hmac: - description: HMAC is the options used to create a HMAC - signature. - properties: - prefixSigDisabled: - description: 'PrefixSigDisabled determines whether - the algorithm will be prefixed to the signature. - Example: sha256=abc123' - type: boolean - secrets: - additionalProperties: - items: - description: SecretReference represents a Secret - Reference. It has enough information to retrieve - secret in any namespace - properties: - name: - description: name is unique within a namespace - to reference a secret resource. - type: string - namespace: - description: namespace defines the space within - which the secret name must be unique. - type: string - type: object - x-kubernetes-map-type: atomic - type: array - description: Secrets are a map of algorithms to secrets - used for signing. - type: object - required: - - prefixSigDisabled - - secrets - type: object - request: - description: Request is the options used to create the - rpc HTTP request. - properties: - httpContentType: - description: HTTPContentType is the content type to - use for the rpc request notification. - type: string - httpMethod: - description: HTTPMethod is the HTTP method to use - for the rpc request notification. - type: string - staticHeaders: - additionalProperties: - items: - type: string - type: array - description: StaticHeaders are predefined headers - that will be added to every request. - type: object - timestampFormat: - description: TimestampFormat is the time format for - the timestamp header. - type: string - timestampHeader: - description: 'TimestampHeader is the header name that - should contain the timestamp. Example: X-BMCLIB-Timestamp' - type: string - required: - - httpContentType - - httpMethod - - staticHeaders - - timestampFormat - - timestampHeader - type: object - signature: - description: Signature is the options used for adding - an HMAC signature to an HTTP request. - properties: - appendAlgoToHeaderDisabled: - description: 'AppendAlgoToHeaderDisabled decides whether - to append the algorithm to the signature header - or not. Example: X-BMCLIB-Signature becomes X-BMCLIB-Signature-256 - When set to true, a header will be added for each - algorithm. Example: X-BMCLIB-Signature-256 and X-BMCLIB-Signature-512' - type: boolean - headerName: - description: 'HeaderName is the header name that should - contain the signature(s). Example: X-BMCLIB-Signature' - type: string - includedPayloadHeaders: - description: 'IncludedPayloadHeaders are headers whose - values will be included in the signature payload. - Example: X-BMCLIB-My-Custom-Header All headers will - be deduplicated.' - items: - type: string - type: array - required: - - appendAlgoToHeaderDisabled - - headerName - - includedPayloadHeaders + type: array + description: StaticHeaders are predefined headers that + will be added to every request. type: object + timestampFormat: + description: TimestampFormat is the time format for the + timestamp header. + type: string + timestampHeader: + description: 'TimestampHeader is the header name that + should contain the timestamp. Example: X-BMCLIB-Timestamp' + type: string + required: + - httpContentType + - httpMethod + - staticHeaders + - timestampFormat + - timestampHeader + type: object + signature: + description: Signature is the options used for adding an HMAC + signature to an HTTP request. + properties: + appendAlgoToHeaderDisabled: + description: 'AppendAlgoToHeaderDisabled decides whether + to append the algorithm to the signature header or not. + Example: X-BMCLIB-Signature becomes X-BMCLIB-Signature-256 + When set to true, a header will be added for each algorithm. + Example: X-BMCLIB-Signature-256 and X-BMCLIB-Signature-512' + type: boolean + headerName: + description: 'HeaderName is the header name that should + contain the signature(s). Example: X-BMCLIB-Signature' + type: string + includedPayloadHeaders: + description: 'IncludedPayloadHeaders are headers whose + values will be included in the signature payload. Example: + X-BMCLIB-My-Custom-Header All headers will be deduplicated.' + items: + type: string + type: array required: - - experimental - - hmac - - request - - signature + - appendAlgoToHeaderDisabled + - headerName + - includedPayloadHeaders type: object required: - consumerURL + - experimental + - hmac - logNotificationsDisabled - - opts + - request + - signature type: object type: object required: