v1alpha1

package
v0.0.0-...-122cdc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the drupal.webservices v1alpha1 API group +kubebuilder:object:generate=true +groupName=drupal.webservices.cern.ch

Index

Constants

View Source
const (
	QoSStandard  QoSClass      = "standard"
	QoSCritical  QoSClass      = "critical"
	QoSTest      QoSClass      = "test"
	DBODStandard DatabaseClass = "standard"
	DBODCritical DatabaseClass = "critical"
	DBODSSD      DatabaseClass = "ssd"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "drupal.webservices.cern.ch", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Backup

type Backup struct {
	// BackupName represents the name of a given velero 'Backup' resource
	// +optional
	BackupName string `json:"backupName,omitempty"`

	// Date represents the created date of a given velero 'Backup' resource
	// +optional
	Date *metav1.Time `json:"date,omitempty"`

	// Expires represents the expiry date of a given velero 'Backup' resource
	// +optional
	Expires *metav1.Time `json:"expires,omitempty"`

	// DrupalSiteName represents the name of the drupalSite for the given velero 'Backup' resource
	// +optional
	DrupalSiteName string `json:"drupalSiteName,omitempty"`
}

Backup item represents information of a single velero 'Backup' object

func (*Backup) DeepCopy

func (in *Backup) DeepCopy() *Backup

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Backup.

func (*Backup) DeepCopyInto

func (in *Backup) DeepCopyInto(out *Backup)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CloneFrom

type CloneFrom string

CloneFrom specifies the string that the CloneFrom field acts on.

type Configuration

type Configuration struct {
	// ExtraConfigurationRepo injects the composer project and other supported configuration from the given git repo to the site,
	// by building an image specific to this site from the generic CERN one.
	// Add extra modules to your website with Composer through a Git repo.
	// This field is deprecated.
	// +kubebuilder:validation:Pattern=`[(http(s)?):\/\/(www\.)?a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)`
	// +optional
	ExtraConfigurationRepo string `json:"extraConfigurationRepo,omitempty"`

	// ExtraConfigurationRepository injects the composer project and other supported configuration from the given git repo to the site,
	// by building an image specific to this site from the generic CERN one.
	// +optional
	ExtraConfigurationRepository `json:"extraConfigurationRepository,omitempty"`

	// QoSClass specifies the website's performance and availability requirements.  The default value is "standard".
	// +kubebuilder:validation:Enum:=critical;test;standard
	// +kubebuilder:default=standard
	// +optional
	QoSClass `json:"qosClass,omitempty"`

	// DatabaseClass specifies the kind of database that the website needs, among those supported by the cluster. The default value is "standard".
	// +kubebuilder:validation:Enum:=critical;ssd;standard
	// +kubebuilder:default=standard
	// +optional
	DatabaseClass `json:"databaseClass,omitempty"`

	// CloneFrom initializes this environment by cloning the specified DrupalSite (usually the "live" site),
	// instead of installing an empty CERN-themed website.
	// Immutable.
	// +optional
	CloneFrom `json:"cloneFrom,omitempty"`

	// DiskSize is the max size of the site's files directory.
	// +optional
	// +kubebuilder:validation:Pattern=`^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$`
	DiskSize string `json:"diskSize,omitempty"`

	// WebDAVPassword sets the HTTP basic auth password for WebDAV file access.
	// A default is auto-generated if a value isn't given.
	// Changing this field updates the password.
	// +optional
	WebDAVPassword string `json:"webDAVPassword,omitempty"`

	// ScheduledBackups when "enabled" will enable Scheduled Velero backups for the site and when "disabled" will disable scheduled backups
	// +kubebuilder:validation:Enum:=enabled;disabled
	// +kubebuilder:default=enabled
	// +optional
	ScheduledBackups string `json:"scheduledBackups,omitempty"`

	// EasyStart when "enable" triggers a restore taskrun of the easystart template.
	// +kubebuilder:validation:Enum:=enable
	// +optional
	Easystart string `json:"easystart,omitempty"`
}

Configuration of the DrupalSite for specific needs. A typical default value is given for every setting, so usually these won't need to change.

func (*Configuration) DeepCopy

func (in *Configuration) DeepCopy() *Configuration

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Configuration.

func (*Configuration) DeepCopyInto

func (in *Configuration) DeepCopyInto(out *Configuration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DatabaseClass

type DatabaseClass string

DatabaseClass specifies the kind of database that the website needs, among those supported by the cluster.

type DrupalSite

type DrupalSite struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   DrupalSiteSpec   `json:"spec"`
	Status DrupalSiteStatus `json:"status,omitempty"`
}

DrupalSite is a website that deploys the CERN Drupal Distribution

func (DrupalSite) ConditionFalse

func (drp DrupalSite) ConditionFalse(condition status.ConditionType) (update bool)

ConditionFalse reports if the condition is true

func (DrupalSite) ConditionReasonSet

func (drp DrupalSite) ConditionReasonSet(condition status.ConditionType) (update bool)

ConditionReasonSet reports if the condition Reason is not empty

func (DrupalSite) ConditionTrue

func (drp DrupalSite) ConditionTrue(condition status.ConditionType) (update bool)

ConditionTrue reports if the condition is true

func (DrupalSite) ConditionUnknown

func (drp DrupalSite) ConditionUnknown(condition status.ConditionType) (update bool)

ConditionUnknown reports if the condition is true

func (*DrupalSite) DeepCopy

func (in *DrupalSite) DeepCopy() *DrupalSite

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DrupalSite.

func (*DrupalSite) DeepCopyInto

func (in *DrupalSite) DeepCopyInto(out *DrupalSite)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DrupalSite) DeepCopyObject

func (in *DrupalSite) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DrupalSiteConfigOverride

type DrupalSiteConfigOverride struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   DrupalSiteConfigOverrideSpec   `json:"spec,omitempty"`
	Status DrupalSiteConfigOverrideStatus `json:"status,omitempty"`
}

DrupalSiteConfigOverride is the Schema for the drupalsiteconfigoverrides API

func (*DrupalSiteConfigOverride) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DrupalSiteConfigOverride.

func (*DrupalSiteConfigOverride) DeepCopyInto

func (in *DrupalSiteConfigOverride) DeepCopyInto(out *DrupalSiteConfigOverride)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DrupalSiteConfigOverride) DeepCopyObject

func (in *DrupalSiteConfigOverride) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DrupalSiteConfigOverrideList

type DrupalSiteConfigOverrideList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []DrupalSiteConfigOverride `json:"items"`
}

DrupalSiteConfigOverrideList contains a list of DrupalSiteConfigOverride

func (*DrupalSiteConfigOverrideList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DrupalSiteConfigOverrideList.

func (*DrupalSiteConfigOverrideList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DrupalSiteConfigOverrideList) DeepCopyObject

func (in *DrupalSiteConfigOverrideList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DrupalSiteConfigOverrideSpec

type DrupalSiteConfigOverrideSpec struct {
	// Php includes configuration for the PHP container of the DrupalSite server pods
	Php Resources `json:"php,omitempty"`
	// Nginx includes configuration for the Nginx container of the DrupalSite server pods
	Nginx Resources `json:"nginx,omitempty"`
	// Webdav includes configuration for the Webdav container of the DrupalSite server pods
	Webdav Resources `json:"webdav,omitempty"`
	// PhpExporter includes configuration for the PhpExporter container of the DrupalSite server pods
	PhpExporter Resources `json:"phpexporter,omitempty"`
	// Cron includes configuration for the Cron container of the DrupalSite server pods
	Cron Resources `json:"cron,omitempty"`
	// DrupalLogs includes configuration for the DrupalLogs container of the DrupalSite server pods
	DrupalLogs Resources `json:"drupallogs,omitempty"`
}

DrupalSiteConfigOverrideSpec defines the desired state of DrupalSiteConfigOverride

func (*DrupalSiteConfigOverrideSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DrupalSiteConfigOverrideSpec.

func (*DrupalSiteConfigOverrideSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DrupalSiteConfigOverrideStatus

type DrupalSiteConfigOverrideStatus struct {
}

DrupalSiteConfigOverrideStatus defines the observed state of DrupalSiteConfigOverride

func (*DrupalSiteConfigOverrideStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DrupalSiteConfigOverrideStatus.

func (*DrupalSiteConfigOverrideStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DrupalSiteList

type DrupalSiteList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []DrupalSite `json:"items"`
}

DrupalSiteList contains a list of DrupalSite

func (*DrupalSiteList) DeepCopy

func (in *DrupalSiteList) DeepCopy() *DrupalSiteList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DrupalSiteList.

func (*DrupalSiteList) DeepCopyInto

func (in *DrupalSiteList) DeepCopyInto(out *DrupalSiteList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DrupalSiteList) DeepCopyObject

func (in *DrupalSiteList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type DrupalSiteSpec

type DrupalSiteSpec struct {
	// SiteURL is the URL where the site should be made available.
	// Recommended to set `<environmentName>-<projectname>.web.cern.ch`
	// or `<projectname>.web.cern.ch` if this is the "live" site
	// +kubebuilder:validation:Required
	SiteURL []Url `json:"siteUrl"`

	// Version refers to the version and release of the CERN Drupal Distribution that will be deployed to serve this website.
	// Changing this value triggers the website's update process.
	// +kubebuilder:validation:Required
	Version `json:"version"`

	// Configuration of the DrupalSite for specific needs. A typical default value is given for every setting, so usually these won't need to change.
	// +kubebuilder:default={"databaseClass":"standard","qosClass":"standard"}
	// +optional
	Configuration `json:"configuration,omitempty"`
}

DrupalSiteSpec defines the desired state of DrupalSite

func (*DrupalSiteSpec) DeepCopy

func (in *DrupalSiteSpec) DeepCopy() *DrupalSiteSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DrupalSiteSpec.

func (*DrupalSiteSpec) DeepCopyInto

func (in *DrupalSiteSpec) DeepCopyInto(out *DrupalSiteSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DrupalSiteStatus

type DrupalSiteStatus struct {
	// Conditions specifies different conditions based on the DrupalSite status
	// +kubebuilder:validation:type=array
	// +optional
	Conditions status.Conditions `json:"conditions,omitempty"`

	// ReleaseID reports the actual release of CERN Drupal Distribution that is being used in the deployment.
	// +optional
	ReleaseID `json:"releaseID,omitempty"`

	// ServingPodImage reports the complete image name of the PHP-FPM container that is being used in the deployment.
	// This can be different from the image version that is set on the Spec during the update process.
	// +optional
	ServingPodImage string `json:"servingPodImage,omitempty"`

	// AvailableBackups lists all the velero 'Backup' objects created for the current DrupalSite
	// +optional
	AvailableBackups []Backup `json:"availableBackups,omitempty"`

	// ExpectedDeploymentReplicas specifies the deployment replicas for the current DrupalSite
	// +optional
	ExpectedDeploymentReplicas *int32 `json:"expectedDeploymentReplicas,omitempty"`

	// GitlabWebhookURL is the URL that triggers a new build of the site's image after changes on its source Gitlab "extraConfigurationRepo".
	// It should be copied to Gitlab.
	// +optional
	GitlabWebhookURL string `json:"gitlabWebhookURL,omitempty"`

	// DBUpdatesLastCheckTimestamp reports the time when the site was checked for db updates
	DBUpdatesLastCheckTimestamp string `json:"dBUpdatesLastCheckTimestamp,omitempty"`
}

DrupalSiteStatus defines the observed state of DrupalSite

func (*DrupalSiteStatus) DeepCopy

func (in *DrupalSiteStatus) DeepCopy() *DrupalSiteStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DrupalSiteStatus.

func (*DrupalSiteStatus) DeepCopyInto

func (in *DrupalSiteStatus) DeepCopyInto(out *DrupalSiteStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DrupalVersion

type DrupalVersion struct {
	// Name of the version
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLenght=2
	Name string `json:"name"`
	// ReleaseSpec contains the details for the current DrupalVersion
	// +kubebuilder:validation:Required
	ReleaseSpec `json:"releaseSpec"`
}

DrupalVersion represents one available version present on the Container Registry

func (*DrupalVersion) DeepCopy

func (in *DrupalVersion) DeepCopy() *DrupalVersion

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DrupalVersion.

func (*DrupalVersion) DeepCopyInto

func (in *DrupalVersion) DeepCopyInto(out *DrupalVersion)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExtraConfigurationRepository

type ExtraConfigurationRepository struct {
	// Branch specifies the branch of the repository
	// +kubebuilder:default=master
	Branch string `json:"branch,omitempty"`
	// RepositoryUrl specifies the URL of the repository
	RepositoryUrl Url `json:"repositoryUrl,omitempty"`
}

ExtraConfigurationRepository injects the composer project and other supported configuration from a git repository

func (*ExtraConfigurationRepository) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtraConfigurationRepository.

func (*ExtraConfigurationRepository) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type QoSClass

type QoSClass string

QoSClass specifies the website's performance and availability requirements

type ReleaseID

type ReleaseID struct {
	// Current releaseID is the image tag that is in use by the site's deployment now
	// +optional
	// +kubebuilder:validation:MinLength=1
	Current string `json:"current,omitempty"`
	// Failsafe releaseID stores the image tag during the upgrade process to allow rollback operations
	// +optional
	// +kubebuilder:validation:MinLength=1
	Failsafe string `json:"failsafe,omitempty"`
}

ReleaseID reports the actual release of CERN Drupal Distribution that is being used in the deployment.

func (*ReleaseID) DeepCopy

func (in *ReleaseID) DeepCopy() *ReleaseID

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReleaseID.

func (*ReleaseID) DeepCopyInto

func (in *ReleaseID) DeepCopyInto(out *ReleaseID)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ReleaseSpec

type ReleaseSpec struct {
	// LatestReleaseSpec will contain the latest version of a specific DrupalVersion
	// +kubebuilder:validation:Required
	LatestReleaseSpec string `json:"latest"`
}

ReleaseSpec contains the details of a release

func (*ReleaseSpec) DeepCopy

func (in *ReleaseSpec) DeepCopy() *ReleaseSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReleaseSpec.

func (*ReleaseSpec) DeepCopyInto

func (in *ReleaseSpec) DeepCopyInto(out *ReleaseSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Resources

type Resources struct {
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
}

func (*Resources) DeepCopy

func (in *Resources) DeepCopy() *Resources

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resources.

func (*Resources) DeepCopyInto

func (in *Resources) DeepCopyInto(out *Resources)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SupportedDrupalVersions

type SupportedDrupalVersions struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   SupportedDrupalVersionsSpec   `json:"spec,omitempty"`
	Status SupportedDrupalVersionsStatus `json:"status,omitempty"`
}

SupportedDrupalVersions is the Schema for the supporteddrupalversions API

func (*SupportedDrupalVersions) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SupportedDrupalVersions.

func (*SupportedDrupalVersions) DeepCopyInto

func (in *SupportedDrupalVersions) DeepCopyInto(out *SupportedDrupalVersions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SupportedDrupalVersions) DeepCopyObject

func (in *SupportedDrupalVersions) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SupportedDrupalVersionsList

type SupportedDrupalVersionsList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []SupportedDrupalVersions `json:"items"`
}

SupportedDrupalVersionsList contains a list of SupportedDrupalVersions

func (*SupportedDrupalVersionsList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SupportedDrupalVersionsList.

func (*SupportedDrupalVersionsList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SupportedDrupalVersionsList) DeepCopyObject

func (in *SupportedDrupalVersionsList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SupportedDrupalVersionsSpec

type SupportedDrupalVersionsSpec struct {
	// Optional list of versions to be ignored in Status
	// +optional
	Blacklist []string `json:"blacklist,omitempty"`
	// +kubebuilder:validation:Required
	DefaultVersion string `json:"defaultVersion"`
}

SupportedDrupalVersionsSpec defines the desired state of SupportedDrupalVersions

func (*SupportedDrupalVersionsSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SupportedDrupalVersionsSpec.

func (*SupportedDrupalVersionsSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SupportedDrupalVersionsStatus

type SupportedDrupalVersionsStatus struct {
	// AvailableVersions will list all the current versions present in the Container Registry
	// and supported by our infrastructure
	// + optional
	AvailableVersions []DrupalVersion `json:"versions,omitempty"`
}

SupportedDrupalVersionsStatus defines the observed state of SupportedDrupalVersions

func (*SupportedDrupalVersionsStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SupportedDrupalVersionsStatus.

func (*SupportedDrupalVersionsStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Url

type Url string

Url refers to where the site should be made available. +kubebuilder:validation:Pattern=`[(http(s)?):\/\/(www\.)?a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)`

type Version

type Version struct {
	// Name specifies the "version" branch of CERN Drupal Distribution that will be deployed, eg `v8.9-1`
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name"`
	// ReleaseSpec is the concrete release of the specified version,
	// typically of the format `RELEASE.<timestamp>`.
	// CERN Drupal image tags take the form `<version.name>-<version.releaseSpec>`,
	// for example `v8.9-1-RELEASE.2021.05.25T16-00-33Z`
	// +optional
	ReleaseSpec string `json:"releaseSpec"`
}

Version refers to the version and release of the CERN Drupal Distribution that will be deployed to serve this website

func (*Version) DeepCopy

func (in *Version) DeepCopy() *Version

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Version.

func (*Version) DeepCopyInto

func (in *Version) DeepCopyInto(out *Version)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL