Skip to content
Snippets Groups Projects

[#11] Rename StaticSite CR to GitlabPagesSite

Files
12
@@ -23,8 +23,8 @@ import (
@@ -23,8 +23,8 @@ import (
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// 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.
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
// StaticSiteSpec defines the desired state of StaticSite
// GitlabPagesSiteSpec defines the desired state of GitlabPagesSite
type StaticSiteSpec struct {
type GitlabPagesSiteSpec struct {
// Anonymous defines if the site needs authentication or not
// Anonymous defines if the site needs authentication or not
// +kubebuilder:validation:Optional
// +kubebuilder:validation:Optional
// +kubebuilder:validation:Enum=true;false
// +kubebuilder:validation:Enum=true;false
@@ -35,8 +35,8 @@ type StaticSiteSpec struct {
@@ -35,8 +35,8 @@ type StaticSiteSpec struct {
Host string `json:"host"`
Host string `json:"host"`
}
}
// StaticSiteStatus defines the observed state of StaticSite
// GitlabPagesSiteStatus defines the observed state of GitlabPagesSite
type StaticSiteStatus struct {
type GitlabPagesSiteStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
// Important: Run "make" to regenerate code after modifying this file
}
}
@@ -44,26 +44,26 @@ type StaticSiteStatus struct {
@@ -44,26 +44,26 @@ type StaticSiteStatus struct {
//+kubebuilder:object:root=true
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:subresource:status
// StaticSite is the Schema for the staticsites API.
// GitlabPagesSite is the Schema for the gitlabpagessites API.
// The goal of the operator is to mantain sync the Route and the configuration of a Static Site.
// The goal of the operator is to mantain sync the Route and the configuration of a Gitlab Pages Site.
// The configuration is located on the ConfigMap
// The configuration is located on the ConfigMap
type StaticSite struct {
type GitlabPagesSite struct {
metav1.TypeMeta `json:",inline"`
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec StaticSiteSpec `json:"spec,omitempty"`
Spec GitlabPagesSiteSpec `json:"spec,omitempty"`
Status StaticSiteStatus `json:"status,omitempty"`
Status GitlabPagesSiteStatus `json:"status,omitempty"`
}
}
//+kubebuilder:object:root=true
//+kubebuilder:object:root=true
// StaticSiteList contains a list of StaticSite
// GitlabPagesSiteList contains a list of GitlabPagesSite
type StaticSiteList struct {
type GitlabPagesSiteList struct {
metav1.TypeMeta `json:",inline"`
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []StaticSite `json:"items"`
Items []GitlabPagesSite `json:"items"`
}
}
func init() {
func init() {
SchemeBuilder.Register(&StaticSite{}, &StaticSiteList{})
SchemeBuilder.Register(&GitlabPagesSite{}, &GitlabPagesSiteList{})
}
}
Loading