Commit e76ee2a8 authored by Konstantinos Samaras-Tsakiris's avatar Konstantinos Samaras-Tsakiris
Browse files

Configurable cron resources

parent 592346ae
Pipeline #3461069 passed with stages
in 5 minutes and 10 seconds
......@@ -31,6 +31,8 @@ type DrupalSiteConfigOverrideSpec struct {
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"`
}
......
......@@ -245,6 +245,7 @@ func (in *DrupalSiteConfigOverrideSpec) DeepCopyInto(out *DrupalSiteConfigOverri
in.Nginx.DeepCopyInto(&out.Nginx)
in.Webdav.DeepCopyInto(&out.Webdav)
in.PhpExporter.DeepCopyInto(&out.PhpExporter)
in.Cron.DeepCopyInto(&out.Cron)
in.DrupalLogs.DeepCopyInto(&out.DrupalLogs)
}
......
......@@ -38,6 +38,38 @@ spec:
description: DrupalSiteConfigOverrideSpec defines the desired state of
DrupalSiteConfigOverride
properties:
cron:
description: Cron includes configuration for the Cron container of
the DrupalSite server pods
properties:
resources:
description: ResourceRequirements describes the compute resource
requirements.
properties:
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Limits describes the maximum amount of compute
resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
requests:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Requests describes the minimum amount of compute
resources required. If Requests is omitted for a container,
it defaults to Limits if that is explicitly specified, otherwise
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
type: object
type: object
drupallogs:
description: DrupalLogs includes configuration for the DrupalLogs
container of the DrupalSite server pods
......
......@@ -2094,10 +2094,12 @@ func (r *DrupalSiteReconciler) getDeploymentConfiguration(ctx context.Context, d
if !reflect.DeepEqual(configOverride.PhpExporter.Resources, corev1.ResourceRequirements{}) {
phpExporterResources = configOverride.PhpExporter.Resources
}
if !reflect.DeepEqual(configOverride.Cron.Resources, corev1.ResourceRequirements{}) {
cronResources = configOverride.Cron.Resources
}
if !reflect.DeepEqual(configOverride.DrupalLogs.Resources, corev1.ResourceRequirements{}) {
drupalLogsResources = configOverride.DrupalLogs.Resources
}
// NOTE: no config override is necessary for the Cron resources
}
config = DeploymentConfig{replicas: replicas,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment