Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the k8s v1 API group +kubebuilder:object:generate=true +groupName=k8s.cloudogu.com
Index ¶
- Constants
- Variables
- func GetPodForLabels(ctx context.Context, cli client.Client, doguLabels CesMatchingLabels) (*v1.Pod, error)
- type CesMatchingLabels
- type DevelopmentDoguMap
- type Dogu
- func (d *Dogu) ChangeState(ctx context.Context, client client.Client, newStatus string) error
- func (in *Dogu) DeepCopy() *Dogu
- func (in *Dogu) DeepCopyInto(out *Dogu)
- func (in *Dogu) DeepCopyObject() runtime.Object
- func (d *Dogu) GetDataPVC(ctx context.Context, cli client.Client) (*corev1.PersistentVolumeClaim, error)
- func (d *Dogu) GetDataVolumeName() string
- func (d *Dogu) GetDataVolumeSize() resource.Quantity
- func (d *Dogu) GetDeployment(ctx context.Context, cli client.Client) (*appsv1.Deployment, error)
- func (d *Dogu) GetDevelopmentDoguMapKey() client.ObjectKey
- func (d *Dogu) GetDoguNameLabel() CesMatchingLabels
- func (d *Dogu) GetObjectKey() client.ObjectKey
- func (d *Dogu) GetObjectMeta() *metav1.ObjectMeta
- func (d *Dogu) GetPod(ctx context.Context, cli client.Client) (*corev1.Pod, error)
- func (d *Dogu) GetPodLabels() CesMatchingLabels
- func (d *Dogu) GetPrivateKeyObjectKey() client.ObjectKey
- func (d *Dogu) GetPrivateKeySecret(ctx context.Context, cli client.Client) (*corev1.Secret, error)
- func (d *Dogu) GetPrivateKeySecretName() string
- func (d *Dogu) GetSecretObjectKey() client.ObjectKey
- func (d *Dogu) Update(ctx context.Context, client client.Client) error
- type DoguList
- type DoguResources
- type DoguSpec
- type DoguStatus
- type IngressAnnotations
- type UpgradeConfig
Constants ¶
const ( // RequeueTimeMultiplerForEachRequeue defines the factor to multiple the requeue time of a failed dogu crd operation RequeueTimeMultiplerForEachRequeue = 2 // RequeueTimeInitialRequeueTime defines the initial value of the requeue time RequeueTimeInitialRequeueTime = time.Second * 5 // RequeueTimeMaxRequeueTime defines the maximum amount of time to wait for a requeue of a dogu resource RequeueTimeMaxRequeueTime = time.Hour * 6 // DefaultVolumeSize is the default size of a new dogu volume if no volume size is specified in the dogu resource. DefaultVolumeSize = "2Gi" )
const ( // DoguLabelName is used to select a dogu pod by name. DoguLabelName = "dogu.name" // DoguLabelVersion is used to select a dogu pod by version. DoguLabelVersion = "dogu.version" )
const ( DoguStatusNotInstalled = "" DoguStatusInstalling = "installing" DoguStatusUpgrading = "upgrading" DoguStatusDeleting = "deleting" DoguStatusInstalled = "installed" DoguStatusPVCResizing = "resizing PVC" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "k8s.cloudogu.com", Version: "v1"} // 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 ¶
func GetPodForLabels ¶ added in v0.14.0
func GetPodForLabels(ctx context.Context, cli client.Client, doguLabels CesMatchingLabels) (*v1.Pod, error)
GetPodForLabels returns a pod for the given dogu labels. An error is returned if either no pod or more than one pod is found.
Types ¶
type CesMatchingLabels ¶ added in v0.14.0
type CesMatchingLabels client.MatchingLabels
CesMatchingLabels provides a convenient way to handle multiple labels for resource selection.
func (CesMatchingLabels) Add ¶ added in v0.14.0
func (cml CesMatchingLabels) Add(moreLabels CesMatchingLabels) CesMatchingLabels
Add takes the currently existing labels from this object and returns a sum of all provided labels as a new object.
func (CesMatchingLabels) DeepCopy ¶ added in v0.14.0
func (in CesMatchingLabels) DeepCopy() CesMatchingLabels
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CesMatchingLabels.
func (CesMatchingLabels) DeepCopyInto ¶ added in v0.14.0
func (in CesMatchingLabels) DeepCopyInto(out *CesMatchingLabels)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DevelopmentDoguMap ¶ added in v0.12.0
DevelopmentDoguMap is a config map that is especially used to when developing a dogu. The map contains a custom dogu.json in the data filed with the "dogu.json" identifier.
func (*DevelopmentDoguMap) DeepCopy ¶ added in v0.12.0
func (in *DevelopmentDoguMap) DeepCopy() *DevelopmentDoguMap
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevelopmentDoguMap.
func (*DevelopmentDoguMap) DeepCopyInto ¶ added in v0.12.0
func (in *DevelopmentDoguMap) DeepCopyInto(out *DevelopmentDoguMap)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DevelopmentDoguMap) DeleteFromCluster ¶ added in v0.12.0
DeleteFromCluster deletes this development config map from the cluster.
func (*DevelopmentDoguMap) ToConfigMap ¶ added in v0.12.0
func (ddm *DevelopmentDoguMap) ToConfigMap() *corev1.ConfigMap
ToConfigMap returns the development dogu map as config map pointer.
type Dogu ¶
type Dogu struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec DoguSpec `json:"spec,omitempty"` Status DoguStatus `json:"status,omitempty"` }
Dogu is the Schema for the dogus API
func (*Dogu) ChangeState ¶ added in v0.12.0
ChangeState changes the state of this dogu resource and applies it to the cluster state.
func (*Dogu) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Dogu.
func (*Dogu) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Dogu) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Dogu) GetDataPVC ¶ added in v0.19.0
func (d *Dogu) GetDataPVC(ctx context.Context, cli client.Client) (*corev1.PersistentVolumeClaim, error)
GetDataPVC returns the data pvc for this dogu.
func (*Dogu) GetDataVolumeName ¶
GetDataVolumeName returns the data volume name for the dogu resource
func (*Dogu) GetDataVolumeSize ¶ added in v0.19.0
GetDataVolumeSize returns the dataVolumeSize of the dogu. If no size is set the default size will be returned.
func (*Dogu) GetDeployment ¶ added in v0.19.0
GetDeployment returns the deployment for this dogu.
func (*Dogu) GetDevelopmentDoguMapKey ¶ added in v0.12.0
GetDevelopmentDoguMapKey returns the object key for the custom dogu descriptor with the actual name and namespace from the dogu resource.
func (*Dogu) GetDoguNameLabel ¶ added in v0.14.0
func (d *Dogu) GetDoguNameLabel() CesMatchingLabels
GetDoguNameLabel returns labels that select any resource being associated with this dogu.
func (*Dogu) GetObjectKey ¶
GetObjectKey returns the object key with the actual name and namespace from the dogu resource
func (*Dogu) GetObjectMeta ¶
func (d *Dogu) GetObjectMeta() *metav1.ObjectMeta
GetObjectMeta return the object meta with the actual name and namespace from the dogu resource
func (*Dogu) GetPod ¶ added in v0.14.0
GetPod returns a pod for this dogu. An error is returned if either no pod or more than one pod is found.
func (*Dogu) GetPodLabels ¶ added in v0.14.0
func (d *Dogu) GetPodLabels() CesMatchingLabels
GetPodLabels returns labels that select a pod being associated with this dogu.
func (*Dogu) GetPrivateKeyObjectKey ¶ added in v0.26.0
GetPrivateKeyObjectKey returns the object key for the secret containing the private key for the dogu.
func (*Dogu) GetPrivateKeySecret ¶ added in v0.26.0
GetPrivateKeySecret returns the private key secret for this dogu.
func (*Dogu) GetPrivateKeySecretName ¶ added in v0.26.0
GetPrivateKeySecretName returns the name of the dogus secret resource.
func (*Dogu) GetSecretObjectKey ¶ added in v0.5.0
GetSecretObjectKey returns the object key for the config map containing values that should be encrypted for the dogu
type DoguList ¶
type DoguList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Dogu `json:"items"` }
DoguList contains a list of Dogu
func (*DoguList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DoguList.
func (*DoguList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DoguList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DoguResources ¶ added in v0.19.0
type DoguResources struct { // dataVolumeSize represents the current size of the volume. Increasing this value leads to an automatic volume // expansion. This includes a downtime for the respective dogu. The default size for volumes is "2Gi". // It is not possible to lower the volume size after an expansion. This will introduce an inconsistent state for the // dogu. DataVolumeSize string `json:"dataVolumeSize,omitempty"` }
DoguResources defines the physical resources used by the dogu.
func (*DoguResources) DeepCopy ¶ added in v0.19.0
func (in *DoguResources) DeepCopy() *DoguResources
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DoguResources.
func (*DoguResources) DeepCopyInto ¶ added in v0.19.0
func (in *DoguResources) DeepCopyInto(out *DoguResources)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DoguSpec ¶
type DoguSpec struct { // Name of the dogu (e.g. official/ldap) Name string `json:"name,omitempty"` // Version of the dogu (e.g. 2.4.48-3) Version string `json:"version,omitempty"` // Resources of the dogu (e.g. dataVolumeSize) Resources DoguResources `json:"resources,omitempty"` // SupportMode indicates whether the dogu should be restarted in the support mode (f. e. to recover manually from // a crash loop). SupportMode bool `json:"supportMode,omitempty"` // UpgradeConfig contains options to manipulate the upgrade process. UpgradeConfig UpgradeConfig `json:"upgradeConfig,omitempty"` // AdditionalIngressAnnotations provides additional annotations that get included into the dogu's ingress rules. AdditionalIngressAnnotations IngressAnnotations `json:"additionalIngressAnnotations,omitempty"` }
DoguSpec defines the desired state of a Dogu
func (*DoguSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DoguSpec.
func (*DoguSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DoguStatus ¶
type DoguStatus struct { // Status represents the state of the Dogu in the ecosystem Status string `json:"status"` // RequeueTime contains time necessary to perform the next requeue RequeueTime time.Duration `json:"requeueTime"` // RequeuePhase is the actual phase of the dogu resource used for a currently running async process. RequeuePhase string `json:"requeuePhase"` }
DoguStatus defines the observed state of a Dogu.
func (*DoguStatus) DeepCopy ¶
func (in *DoguStatus) DeepCopy() *DoguStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DoguStatus.
func (*DoguStatus) DeepCopyInto ¶
func (in *DoguStatus) DeepCopyInto(out *DoguStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DoguStatus) NextRequeue ¶ added in v0.3.0
func (ds *DoguStatus) NextRequeue() time.Duration
NextRequeue increases the requeue time of the dogu status and returns the new requeue time
func (*DoguStatus) ResetRequeueTime ¶ added in v0.3.0
func (ds *DoguStatus) ResetRequeueTime()
ResetRequeueTime resets the requeue timer to the initial value
type IngressAnnotations ¶ added in v0.29.0
IngressAnnotations are annotations of nginx-ingress rules.
func (IngressAnnotations) DeepCopy ¶ added in v0.29.0
func (in IngressAnnotations) DeepCopy() IngressAnnotations
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressAnnotations.
func (IngressAnnotations) DeepCopyInto ¶ added in v0.29.0
func (in IngressAnnotations) DeepCopyInto(out *IngressAnnotations)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UpgradeConfig ¶ added in v0.12.0
type UpgradeConfig struct { // AllowNamespaceSwitch lets a dogu switch its dogu namespace during an upgrade. The dogu must be technically the // same dogu which did reside in a different namespace. The remote dogu's version must be equal to or greater than // the version of the local dogu. AllowNamespaceSwitch bool `json:"allowNamespaceSwitch,omitempty"` // ForceUpgrade allows to install the same or even lower dogu version than already is installed. Please note, that // possible data loss may occur by inappropriate dogu downgrading. ForceUpgrade bool `json:"forceUpgrade,omitempty"` }
UpgradeConfig contains configuration hints for the dogu operator regarding aspects during the upgrade of dogus.
func (*UpgradeConfig) DeepCopy ¶ added in v0.12.0
func (in *UpgradeConfig) DeepCopy() *UpgradeConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpgradeConfig.
func (*UpgradeConfig) DeepCopyInto ¶ added in v0.12.0
func (in *UpgradeConfig) DeepCopyInto(out *UpgradeConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.