Skip to content

Commit

Permalink
Remove HMC prefix from all CRDs
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Pavlov <[email protected]>
  • Loading branch information
Kshatrix committed May 29, 2024
1 parent f480ca6 commit af3f0c9
Show file tree
Hide file tree
Showing 35 changed files with 319 additions and 319 deletions.
8 changes: 4 additions & 4 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ resources:
controller: true
domain: hmc.mirantis.com
group: hmc.mirantis.com
kind: HMCTemplate
kind: Template
path: github.com/Mirantis/hmc/api/v1alpha1
version: v1alpha1
- api:
Expand All @@ -23,7 +23,7 @@ resources:
controller: true
domain: hmc.mirantis.com
group: hmc.mirantis.com
kind: HMCDeployment
kind: Deployment
path: github.com/Mirantis/hmc/api/v1alpha1
version: v1alpha1
- api:
Expand All @@ -32,7 +32,7 @@ resources:
controller: true
domain: hmc.mirantis.com
group: hmc.mirantis.com
kind: HMCManagement
kind: Management
path: github.com/Mirantis/hmc/api/v1alpha1
version: v1alpha1
- api:
Expand All @@ -41,7 +41,7 @@ resources:
controller: true
domain: hmc.mirantis.com
group: hmc.mirantis.com
kind: HMCProviderAWS
kind: AWSProvider
path: github.com/Mirantis/hmc/api/v1alpha1
version: v1alpha1
version: "3"
26 changes: 13 additions & 13 deletions api/v1alpha1/hmcdeployment_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// HMCDeploymentSpec defines the desired state of HMCDeployment
type HMCDeploymentSpec struct {
// DeploymentSpec defines the desired state of Deployment
type DeploymentSpec struct {
// DryRun specifies whether the template should be applied after validation or only validated.
// +kubebuilder:validation:Optional
DryRun bool `json:"dryRun"`
// Template is a reference to a HMCTemplate object located in the same namespace.
// Template is a reference to a Template object located in the same namespace.
// +kubebuilder:validation:Required
Template string `json:"template"`
// Configuration allows to provide parameters for template customization.
Expand All @@ -36,32 +36,32 @@ type HMCDeploymentSpec struct {
Configuration apiextensionsv1.JSON `json:"configuration"`
}

// HMCDeploymentStatus defines the observed state of HMCDeployment
type HMCDeploymentStatus struct {
// DeploymentStatus defines the observed state of Deployment
type DeploymentStatus struct {
TemplateValidationStatus `json:",inline"`
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status

// HMCDeployment is the Schema for the hmcdeployments API
type HMCDeployment struct {
// Deployment is the Schema for the deployments API
type Deployment struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec HMCDeploymentSpec `json:"spec,omitempty"`
Status HMCDeploymentStatus `json:"status,omitempty"`
Spec DeploymentSpec `json:"spec,omitempty"`
Status DeploymentStatus `json:"status,omitempty"`
}

//+kubebuilder:object:root=true

// HMCDeploymentList contains a list of HMCDeployment
type HMCDeploymentList struct {
// DeploymentList contains a list of Deployment
type DeploymentList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []HMCDeployment `json:"items"`
Items []Deployment `json:"items"`
}

func init() {
SchemeBuilder.Register(&HMCDeployment{}, &HMCDeploymentList{})
SchemeBuilder.Register(&Deployment{}, &DeploymentList{})
}
26 changes: 13 additions & 13 deletions api/v1alpha1/hmcmanagement_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,42 +23,42 @@ import (
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// HMCManagementSpec defines the desired state of HMCManagement
type HMCManagementSpec struct {
// ManagementSpec defines the desired state of Management
type ManagementSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file

// Foo is an example field of HMCManagement. Edit hmcmanagement_types.go to remove/update
// Foo is an example field of Management. Edit management_types.go to remove/update
Foo string `json:"foo,omitempty"`
}

// HMCManagementStatus defines the observed state of HMCManagement
type HMCManagementStatus struct {
// ManagementStatus defines the observed state of Management
type ManagementStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status

// HMCManagement is the Schema for the hmcmanagements API
type HMCManagement struct {
// Management is the Schema for the managements API
type Management struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec HMCManagementSpec `json:"spec,omitempty"`
Status HMCManagementStatus `json:"status,omitempty"`
Spec ManagementSpec `json:"spec,omitempty"`
Status ManagementStatus `json:"status,omitempty"`
}

//+kubebuilder:object:root=true

// HMCManagementList contains a list of HMCManagement
type HMCManagementList struct {
// ManagementList contains a list of Management
type ManagementList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []HMCManagement `json:"items"`
Items []Management `json:"items"`
}

func init() {
SchemeBuilder.Register(&HMCManagement{}, &HMCManagementList{})
SchemeBuilder.Register(&Management{}, &ManagementList{})
}
26 changes: 13 additions & 13 deletions api/v1alpha1/hmcprovideraws_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,42 +23,42 @@ import (
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// HMCProviderAWSSpec defines the desired state of HMCProviderAWS
type HMCProviderAWSSpec struct {
// AWSProviderSpec defines the desired state of AWSProvider
type AWSProviderSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file

// Foo is an example field of HMCProviderAWS. Edit hmcprovideraws_types.go to remove/update
// Foo is an example field of AWSProvider. Edit awsprovider_types.go to remove/update
Foo string `json:"foo,omitempty"`
}

// HMCProviderAWSStatus defines the observed state of HMCProviderAWS
type HMCProviderAWSStatus struct {
// AWSProviderStatus defines the observed state of AWSProvider
type AWSProviderStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status

// HMCProviderAWS is the Schema for the hmcprovideraws API
type HMCProviderAWS struct {
// AWSProvider is the Schema for the awsprovider API
type AWSProvider struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec HMCProviderAWSSpec `json:"spec,omitempty"`
Status HMCProviderAWSStatus `json:"status,omitempty"`
Spec AWSProviderSpec `json:"spec,omitempty"`
Status AWSProviderStatus `json:"status,omitempty"`
}

//+kubebuilder:object:root=true

// HMCProviderAWSList contains a list of HMCProviderAWS
type HMCProviderAWSList struct {
// AWSProviderList contains a list of AWSProvider
type AWSProviderList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []HMCProviderAWS `json:"items"`
Items []AWSProvider `json:"items"`
}

func init() {
SchemeBuilder.Register(&HMCProviderAWS{}, &HMCProviderAWSList{})
SchemeBuilder.Register(&AWSProvider{}, &AWSProviderList{})
}
24 changes: 12 additions & 12 deletions api/v1alpha1/hmctemplate_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// HMCTemplateSpec defines the desired state of HMCTemplate
type HMCTemplateSpec struct {
// TemplateSpec defines the desired state of Template
type TemplateSpec struct {
// Provider specifies a CAPI provider associated with the template.
// +kubebuilder:validation:Enum=aws
// +kubebuilder:validation:Required
Expand All @@ -31,8 +31,8 @@ type HMCTemplateSpec struct {
HelmChartURL string `json:"helmChartURL"`
}

// HMCTemplateStatus defines the observed state of HMCTemplate
type HMCTemplateStatus struct {
// TemplateStatus defines the observed state of Template
type TemplateStatus struct {
TemplateValidationStatus `json:",inline"`
// Descriptions contains information about the template.
// +optional
Expand All @@ -50,24 +50,24 @@ type TemplateValidationStatus struct {
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status

// HMCTemplate is the Schema for the hmctemplates API
type HMCTemplate struct {
// Template is the Schema for the templates API
type Template struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec HMCTemplateSpec `json:"spec,omitempty"`
Status HMCTemplateStatus `json:"status,omitempty"`
Spec TemplateSpec `json:"spec,omitempty"`
Status TemplateStatus `json:"status,omitempty"`
}

//+kubebuilder:object:root=true

// HMCTemplateList contains a list of HMCTemplate
type HMCTemplateList struct {
// TemplateList contains a list of Template
type TemplateList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []HMCTemplate `json:"items"`
Items []Template `json:"items"`
}

func init() {
SchemeBuilder.Register(&HMCTemplate{}, &HMCTemplateList{})
SchemeBuilder.Register(&Template{}, &TemplateList{})
}
Loading

0 comments on commit af3f0c9

Please sign in to comment.