From 856fe9124087952d6ffce6197ec70f6f20cae1fb Mon Sep 17 00:00:00 2001 From: Andrea Mazzotti Date: Mon, 18 Sep 2023 09:56:28 +0200 Subject: [PATCH] Fix issues with renaming too many things on camel case format --- .../elementalmachineregistration_types.go | 2 +- ...re.cluster.x-k8s.io_elementalclusters.yaml | 8 +- ...er.x-k8s.io_elementalclustertemplates.yaml | 6 +- ...cture.cluster.x-k8s.io_elementalhosts.yaml | 12 +-- ...-k8s.io_elementalmachineregistrations.yaml | 38 ++++---- ...re.cluster.x-k8s.io_elementalmachines.yaml | 12 +-- ...er.x-k8s.io_elementalmachinetemplates.yaml | 10 +-- demo/demo-manifest.yaml | 2 +- .../v0.0.1/infrastructure-components.yaml | 86 +++++++++---------- internal/api/types.go | 4 +- 10 files changed, 90 insertions(+), 90 deletions(-) diff --git a/api/v1beta1/elementalmachineregistration_types.go b/api/v1beta1/elementalmachineregistration_types.go index 19829b2e..db1f56b7 100644 --- a/api/v1beta1/elementalmachineregistration_types.go +++ b/api/v1beta1/elementalmachineregistration_types.go @@ -145,7 +145,7 @@ type Elemental struct { // +optional Install Install `json:"install,omitempty" yaml:"install,omitempty"` // +optional - // +kubebuilder:default:={"reset-persistent":true,"reset-oem":true,"reboot":true} + // +kubebuilder:default:={"resetPersistent":true,"resetOem":true,"reboot":true} Reset Reset `json:"reset,omitempty" yaml:"reset,omitempty"` // +optional Registration Registration `json:"registration,omitempty" yaml:"registration,omitempty"` diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_elementalclusters.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_elementalclusters.yaml index 0f996fa0..9e3bb8a3 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_elementalclusters.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_elementalclusters.yaml @@ -17,7 +17,7 @@ spec: - name: v1beta1 schema: openAPIV3Schema: - description: ElementalCluster is the Schema for the elementalclusters API + description: ElementalCluster is the Schema for the elementalclusters API. properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -32,7 +32,7 @@ spec: metadata: type: object spec: - description: ElementalClusterSpec defines the desired state of ElementalCluster + description: ElementalClusterSpec defines the desired state of ElementalCluster. properties: controlPlaneEndpoint: description: ControlPlaneEndpoint represents the endpoint used to @@ -51,7 +51,7 @@ spec: type: object type: object status: - description: ElementalClusterStatus defines the observed state of ElementalCluster + description: ElementalClusterStatus defines the observed state of ElementalCluster. properties: conditions: description: Conditions defines current service state of the ElementalCluster. @@ -121,7 +121,7 @@ spec: ready: default: false description: Ready indicates the provider-specific infrastructure - has been provisioned and is ready + has been provisioned and is ready. type: boolean type: object type: object diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_elementalclustertemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_elementalclustertemplates.yaml index dc67d69e..b0725b8d 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_elementalclustertemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_elementalclustertemplates.yaml @@ -18,7 +18,7 @@ spec: schema: openAPIV3Schema: description: ElementalClusterTemplate is the Schema for the elementalclustertemplates - API + API. properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -34,7 +34,7 @@ spec: type: object spec: description: ElementalClusterTemplateSpec defines the desired state of - ElementalClusterTemplate + ElementalClusterTemplate. properties: template: properties: @@ -43,7 +43,7 @@ spec: type: object spec: description: ElementalClusterSpec defines the desired state of - ElementalCluster + ElementalCluster. properties: controlPlaneEndpoint: description: ControlPlaneEndpoint represents the endpoint diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_elementalhosts.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_elementalhosts.yaml index e74cf3c6..7bc856e8 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_elementalhosts.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_elementalhosts.yaml @@ -17,7 +17,7 @@ spec: - name: v1beta1 schema: openAPIV3Schema: - description: ElementalHost is the Schema for the elementalhosts API + description: ElementalHost is the Schema for the elementalhosts API. properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -32,11 +32,11 @@ spec: metadata: type: object spec: - description: ElementalHostSpec defines the desired state of ElementalHost + description: ElementalHostSpec defines the desired state of ElementalHost. properties: bootstrapSecret: description: BootstrapSecret is an optional reference to a Cluster - API Secret for bootstrap purpose + API Secret for bootstrap purpose. properties: apiVersion: description: API version of the referent. @@ -74,15 +74,15 @@ spec: x-kubernetes-map-type: atomic type: object status: - description: ElementalHostStatus defines the observed state of ElementalHost + description: ElementalHostStatus defines the observed state of ElementalHost. properties: bootstrapped: description: Bootstrapped references this host to have applied the - Boostrap instructions successfully + Boostrap instructions successfully. type: boolean installed: description: Installed references this host to have been successfully - installed by Elemental + installed by Elemental. type: boolean machineRef: description: MachineRef is an optional reference to a Cluster API diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_elementalmachineregistrations.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_elementalmachineregistrations.yaml index 538ee8ef..c601e2e3 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_elementalmachineregistrations.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_elementalmachineregistrations.yaml @@ -18,7 +18,7 @@ spec: schema: openAPIV3Schema: description: ElementalMachineRegistration is the Schema for the elementalmachineregistrations - API + API. properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -34,20 +34,20 @@ spec: type: object spec: description: ElementalMachineRegistrationSpec defines the desired state - of ElementalMachineRegistration + of ElementalMachineRegistration. properties: config: description: Config points to Elemental machine configuration. properties: - cloud-config: + cloudConfig: x-kubernetes-preserve-unknown-fields: true elemental: properties: install: properties: - config-dir: + configDir: type: string - config-urls: + configUrls: items: type: string type: array @@ -55,37 +55,37 @@ spec: type: boolean device: type: string - disable-boot-entry: + disableBootEntry: type: boolean - eject-cd: + ejectCd: type: boolean firmware: type: string iso: type: string - no-format: + noFormat: type: boolean poweroff: type: boolean reboot: type: boolean - system-uri: + systemUri: type: string tty: type: string type: object registration: properties: - ca-cert: + caCert: type: string hostname: properties: prefix: type: string - use-existing: + useExisting: type: boolean type: object - no-smbios: + noSmbios: type: boolean url: type: string @@ -93,10 +93,10 @@ spec: reset: default: reboot: true - reset-oem: true - reset-persistent: true + resetOem: true + resetPersistent: true properties: - config-urls: + configUrls: items: type: string type: array @@ -109,13 +109,13 @@ spec: reboot: default: true type: boolean - reset-oem: + resetOem: default: true type: boolean - reset-persistent: + resetPersistent: default: true type: boolean - system-uri: + systemUri: type: string type: object type: object @@ -135,7 +135,7 @@ spec: type: object status: description: ElementalMachineRegistrationStatus defines the observed state - of ElementalMachineRegistration + of ElementalMachineRegistration. type: object type: object served: true diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_elementalmachines.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_elementalmachines.yaml index 2e91df28..d5e26e2a 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_elementalmachines.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_elementalmachines.yaml @@ -17,7 +17,7 @@ spec: - name: v1beta1 schema: openAPIV3Schema: - description: ElementalMachine is the Schema for the elementalmachines API + description: ElementalMachine is the Schema for the elementalmachines API. properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -32,14 +32,14 @@ spec: metadata: type: object spec: - description: ElementalMachineSpec defines the desired state of ElementalMachine + description: ElementalMachineSpec defines the desired state of ElementalMachine. properties: providerID: - description: ProviderID references the associated ElementalHost (elemental://{ElementalHost.Namespace}/{ElementalHost.Name}) + description: ProviderID references the associated ElementalHost. (elemental://{ElementalHost.Namespace}/{ElementalHost.Name}) type: string selector: description: Selector can be used to associate ElementalHost that - match certain labels + match certain labels. properties: matchExpressions: description: matchExpressions is a list of label selector requirements. @@ -85,7 +85,7 @@ spec: x-kubernetes-map-type: atomic type: object status: - description: ElementalMachineStatus defines the observed state of ElementalMachine + description: ElementalMachineStatus defines the observed state of ElementalMachine. properties: conditions: description: Conditions defines current service state of the ElementalCluster. @@ -193,7 +193,7 @@ spec: ready: default: false description: Ready indicates the provider-specific infrastructure - has been provisioned and is ready + has been provisioned and is ready. type: boolean type: object type: object diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_elementalmachinetemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_elementalmachinetemplates.yaml index 455a8136..0b668004 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_elementalmachinetemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_elementalmachinetemplates.yaml @@ -22,7 +22,7 @@ spec: schema: openAPIV3Schema: description: ElementalMachineTemplate is the Schema for the elementalmachinetemplates - API + API. properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -38,7 +38,7 @@ spec: type: object spec: description: ElementalMachineTemplateSpec defines the desired state of - ElementalMachineTemplate + ElementalMachineTemplate. properties: template: properties: @@ -47,15 +47,15 @@ spec: type: object spec: description: ElementalMachineSpec defines the desired state of - ElementalMachine + ElementalMachine. properties: providerID: - description: ProviderID references the associated ElementalHost + description: ProviderID references the associated ElementalHost. (elemental://{ElementalHost.Namespace}/{ElementalHost.Name}) type: string selector: description: Selector can be used to associate ElementalHost - that match certain labels + that match certain labels. properties: matchExpressions: description: matchExpressions is a list of label selector diff --git a/demo/demo-manifest.yaml b/demo/demo-manifest.yaml index 5677614c..d024d009 100644 --- a/demo/demo-manifest.yaml +++ b/demo/demo-manifest.yaml @@ -23,5 +23,5 @@ spec: elemental: registration: hostname: - use-existing: true + useExisting: true prefix: "demo-" diff --git a/infrastructure-elemental/v0.0.1/infrastructure-components.yaml b/infrastructure-elemental/v0.0.1/infrastructure-components.yaml index 1ac61fbb..e5ba7ad5 100644 --- a/infrastructure-elemental/v0.0.1/infrastructure-components.yaml +++ b/infrastructure-elemental/v0.0.1/infrastructure-components.yaml @@ -31,7 +31,7 @@ spec: - name: v1beta1 schema: openAPIV3Schema: - description: ElementalCluster is the Schema for the elementalclusters API + description: ElementalCluster is the Schema for the elementalclusters API. properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -46,7 +46,7 @@ spec: metadata: type: object spec: - description: ElementalClusterSpec defines the desired state of ElementalCluster + description: ElementalClusterSpec defines the desired state of ElementalCluster. properties: controlPlaneEndpoint: description: ControlPlaneEndpoint represents the endpoint used to @@ -65,7 +65,7 @@ spec: type: object type: object status: - description: ElementalClusterStatus defines the observed state of ElementalCluster + description: ElementalClusterStatus defines the observed state of ElementalCluster. properties: conditions: description: Conditions defines current service state of the ElementalCluster. @@ -135,7 +135,7 @@ spec: ready: default: false description: Ready indicates the provider-specific infrastructure - has been provisioned and is ready + has been provisioned and is ready. type: boolean type: object type: object @@ -165,7 +165,7 @@ spec: schema: openAPIV3Schema: description: ElementalClusterTemplate is the Schema for the elementalclustertemplates - API + API. properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -181,7 +181,7 @@ spec: type: object spec: description: ElementalClusterTemplateSpec defines the desired state of - ElementalClusterTemplate + ElementalClusterTemplate. properties: template: properties: @@ -190,7 +190,7 @@ spec: type: object spec: description: ElementalClusterSpec defines the desired state of - ElementalCluster + ElementalCluster. properties: controlPlaneEndpoint: description: ControlPlaneEndpoint represents the endpoint @@ -240,7 +240,7 @@ spec: - name: v1beta1 schema: openAPIV3Schema: - description: ElementalHost is the Schema for the elementalhosts API + description: ElementalHost is the Schema for the elementalhosts API. properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -255,11 +255,11 @@ spec: metadata: type: object spec: - description: ElementalHostSpec defines the desired state of ElementalHost + description: ElementalHostSpec defines the desired state of ElementalHost. properties: bootstrapSecret: description: BootstrapSecret is an optional reference to a Cluster - API Secret for bootstrap purpose + API Secret for bootstrap purpose. properties: apiVersion: description: API version of the referent. @@ -297,15 +297,15 @@ spec: x-kubernetes-map-type: atomic type: object status: - description: ElementalHostStatus defines the observed state of ElementalHost + description: ElementalHostStatus defines the observed state of ElementalHost. properties: bootstrapped: description: Bootstrapped references this host to have applied the - Boostrap instructions successfully + Boostrap instructions successfully. type: boolean installed: description: Installed references this host to have been successfully - installed by Elemental + installed by Elemental. type: boolean machineRef: description: MachineRef is an optional reference to a Cluster API @@ -373,7 +373,7 @@ spec: schema: openAPIV3Schema: description: ElementalMachineRegistration is the Schema for the elementalmachineregistrations - API + API. properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -389,20 +389,20 @@ spec: type: object spec: description: ElementalMachineRegistrationSpec defines the desired state - of ElementalMachineRegistration + of ElementalMachineRegistration. properties: config: description: Config points to Elemental machine configuration. properties: - cloud-config: + cloudConfig: x-kubernetes-preserve-unknown-fields: true elemental: properties: install: properties: - config-dir: + configDir: type: string - config-urls: + configUrls: items: type: string type: array @@ -410,37 +410,37 @@ spec: type: boolean device: type: string - disable-boot-entry: + disableBootEntry: type: boolean - eject-cd: + ejectCd: type: boolean firmware: type: string iso: type: string - no-format: + noFormat: type: boolean poweroff: type: boolean reboot: type: boolean - system-uri: + systemUri: type: string tty: type: string type: object registration: properties: - ca-cert: + caCert: type: string hostname: properties: prefix: type: string - use-existing: + useExisting: type: boolean type: object - no-smbios: + noSmbios: type: boolean url: type: string @@ -448,10 +448,10 @@ spec: reset: default: reboot: true - reset-oem: true - reset-persistent: true + resetOem: true + resetPersistent: true properties: - config-urls: + configUrls: items: type: string type: array @@ -464,13 +464,13 @@ spec: reboot: default: true type: boolean - reset-oem: + resetOem: default: true type: boolean - reset-persistent: + resetPersistent: default: true type: boolean - system-uri: + systemUri: type: string type: object type: object @@ -490,7 +490,7 @@ spec: type: object status: description: ElementalMachineRegistrationStatus defines the observed state - of ElementalMachineRegistration + of ElementalMachineRegistration. type: object type: object served: true @@ -518,7 +518,7 @@ spec: - name: v1beta1 schema: openAPIV3Schema: - description: ElementalMachine is the Schema for the elementalmachines API + description: ElementalMachine is the Schema for the elementalmachines API. properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -533,14 +533,14 @@ spec: metadata: type: object spec: - description: ElementalMachineSpec defines the desired state of ElementalMachine + description: ElementalMachineSpec defines the desired state of ElementalMachine. properties: providerID: - description: ProviderID references the associated ElementalHost (elemental://{ElementalHost.Namespace}/{ElementalHost.Name}) + description: ProviderID references the associated ElementalHost. (elemental://{ElementalHost.Namespace}/{ElementalHost.Name}) type: string selector: description: Selector can be used to associate ElementalHost that - match certain labels + match certain labels. properties: matchExpressions: description: matchExpressions is a list of label selector requirements. @@ -586,7 +586,7 @@ spec: x-kubernetes-map-type: atomic type: object status: - description: ElementalMachineStatus defines the observed state of ElementalMachine + description: ElementalMachineStatus defines the observed state of ElementalMachine. properties: conditions: description: Conditions defines current service state of the ElementalCluster. @@ -694,7 +694,7 @@ spec: ready: default: false description: Ready indicates the provider-specific infrastructure - has been provisioned and is ready + has been provisioned and is ready. type: boolean type: object type: object @@ -728,7 +728,7 @@ spec: schema: openAPIV3Schema: description: ElementalMachineTemplate is the Schema for the elementalmachinetemplates - API + API. properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -744,7 +744,7 @@ spec: type: object spec: description: ElementalMachineTemplateSpec defines the desired state of - ElementalMachineTemplate + ElementalMachineTemplate. properties: template: properties: @@ -753,15 +753,15 @@ spec: type: object spec: description: ElementalMachineSpec defines the desired state of - ElementalMachine + ElementalMachine. properties: providerID: - description: ProviderID references the associated ElementalHost + description: ProviderID references the associated ElementalHost. (elemental://{ElementalHost.Namespace}/{ElementalHost.Name}) type: string selector: description: Selector can be used to associate ElementalHost - that match certain labels + that match certain labels. properties: matchExpressions: description: matchExpressions is a list of label selector diff --git a/internal/api/types.go b/internal/api/types.go index d70e203f..975d5ce7 100644 --- a/internal/api/types.go +++ b/internal/api/types.go @@ -81,8 +81,8 @@ func (r *RegistrationResponse) fromElementalMachineRegistration(elementalRegistr } type BootstrapResponse struct { - Files []BootstrapFile `json:"writeFiles" yaml:"writeFiles"` - Commands []string `json:"runCmd" yaml:"runCmd"` + Files []BootstrapFile `json:"write_files" yaml:"write_files"` //nolint:tagliatelle //Matching cloud-init schema + Commands []string `json:"runcmd" yaml:"runcmd"` } type BootstrapFile struct {