Skip to content

Commit

Permalink
feat: Add spec.requiresDowntime (#2132)
Browse files Browse the repository at this point in the history
* add spec.requiresDowntime and update documentation

* update crd bases with requiresDowntime

* add spec.RequiresDowntime to v1beta2

* Update docs/contributor/resources/03-moduletemplate.md

Co-authored-by: Małgorzata Świeca <[email protected]>

---------

Co-authored-by: Tomasz Smelcerz <[email protected]>
Co-authored-by: Małgorzata Świeca <[email protected]>
  • Loading branch information
3 people authored Dec 20, 2024
1 parent 67aceb4 commit 4210b9e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/v1beta1/moduletemplate_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ type ModuleTemplateSpec struct {
Target Target `json:"target"`

CustomStateCheck []*v1beta2.CustomStateCheck `json:"customStateCheck,omitempty"`

// RequiresDowntime indicates whether the module requires downtime in support of maintenance windows during module upgrades.
// +optional
RequiresDowntime bool `json:"requiresDowntime,omitempty"`
}

// +kubebuilder:object:root=true
Expand Down
4 changes: 4 additions & 0 deletions api/v1beta2/moduletemplate_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ type ModuleTemplateSpec struct {
// Manager contains information for identifying a module's resource that can be used as indicator for the installation readiness of the module. Typically, this is the manager Deployment of the module. In exceptional cases, it may also be another resource.
// +optional
Manager *Manager `json:"manager,omitempty"`

// RequiresDowntime indicates whether the module requires downtime in support of maintenance windows during module upgrades.
// +optional
RequiresDowntime bool `json:"requiresDowntime,omitempty"`
}

// Manager defines the structure for the manager field in ModuleTemplateSpec.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ spec:
Mandatory indicates whether the module is mandatory. It is used to enforce the installation of the module with
its configuration in all runtime clusters.
type: boolean
requiresDowntime:
description: RequiresDowntime indicates whether the module requires
downtime in support of maintenance windows during module upgrades.
type: boolean
target:
description: |-
Target describes where the Module should later on be installed if parsed correctly. It is used as installation
Expand Down Expand Up @@ -307,6 +311,10 @@ spec:
maxLength: 64
pattern: ^([a-z]{3,}(-[a-z]{3,})*)?$
type: string
requiresDowntime:
description: RequiresDowntime indicates whether the module requires
downtime in support of maintenance windows during module upgrades.
type: boolean
resources:
description: Resources is a list of additional resources of the module
that can be fetched, e.g., the raw manifest.
Expand Down
4 changes: 4 additions & 0 deletions docs/contributor/resources/03-moduletemplate.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ The `resources` field is a list of additional resources of the module that can b
The `associatedResources` field is a list of module-related custom resource definitions (CRDs) that should be cleaned up during module deletion.
The list is purely informational and does not introduce functional changes to the module.

### **.spec.requiresDowntime**

The `requiresDowntime` field indicates whether the module requires downtime to support maintenance windows during module upgrades. It is optional and defaults to `false`, meaning the module version upgrades don't require downtime.

## `operator.kyma-project.io` Labels

These are the synchronization labels available on the ModuleTemplate CR:
Expand Down

0 comments on commit 4210b9e

Please sign in to comment.