Cluster update module (shturval-update)
About the service
| Parameter | Description |
|---|---|
| GUI name | Cluster update module |
| System name (identifier) | shturval-update |
| Cluster Assignment | Cluster update management (Kubernetes, platform components); coordination of the process of updating units and components. Installed in the management cluster. |
| Critical | Yes |
| Public repository | — (component of the Shturval platform) |
| Dependencies | shturval-update-crds, shturval-networking |
| Namespace | shturval-update-system |
Contents
1. Review
Purpose: the shturval-update operator updates the Shturval platform to the version specified in ShturvalUpdate.spec.version, checks the availability of versions through the update channel and can launch the update on a cron schedule.
Features
| Contour | Intended use |
|---|---|
ShturvalUpdate | stores the target version, the current platform version and the execution status of the update phases |
ShturvalUpdateChannel | retrieves update matrix from registry and publishes available versions to status.availableupdates |
ShturvalUpdateSchedule | calculates the update window according to a cron schedule and initiates the update via the default ShturvalUpdate |
Webhook ShturvalUpdate | checks resource operations and prohibits dangerous changes during active update |
Initiation scripts
| Event | Initiator | Observed effect |
|---|---|---|
| Manual platform update | administrator or automation changes ShturvalUpdate.spec.version | the operator checks the version, builds a set of phases and sequentially performs the update |
| Checking the update channel | operator ShturvalUpdateChannel periodically or after the default ShturvalUpdate is ready | in status.availableupdates a sorted list of available versions appears |
| Scheduled update | ShturvalUpdateSchedule in the active cron window | default ShturvalUpdate gets new spec.version and spec.followSchedule |
| Admission validation | Kubernetes API Server on create/update/delete ShturvalUpdate | changing the version and deleting a resource are blocked if the update is not yet ready |
Limitations and implications
| Limit | Consequencefor administrator |
|---|---|
The default name for ShturvalUpdate and ShturvalUpdateChannel is shturval-update | channel with a different name fails; scheduling and channel checks are focused on default resources |
ShturvalUpdateChannel patches the entire object, not just the status subresource | when making external changes to a channel resource, keep in mind that the controller regularly updates the object itself |
Registry URL is collected as https://<SYSTEM_REGISTRY>/repository/shturval_bin_public | for a private registry you need to correctly set SYSTEM_REGISTRY and, if necessary, insecure mode |
Webhook is enabled by default if ENABLE_WEBHOOKS is not equal to false | with a standard installation of Kubernetes API Server will access the operator’s admission webhook |
Extensive RBAC rights have been declared for ShturvalUpdate and ShturvalUpdateChannel | changing the access model must undergo a separate security and update compatibility check |
| The algorithm for selecting a minor version in schedule requires confirmation | #QUESTION: confirm expected version selection behavior with spec.allowMinorVersion=true |
Place in the chain of command
Update control chain

In the operational chain, the administrator or automation sets the target version via ShturvalUpdate. ShturvalUpdateChannel prepopulates the list of available versions from the registry. If a schedule is used, ShturvalUpdateSchedule selects the appropriate version from the channel resource status and patches the default update resource. ShturvalUpdate then performs the update phases and reflects the progress of the process in status.ready and status.conditions.
Key Features
| Characteristics | Description |
|---|---|
| API group/version | update.shturval.tech/v1beta1 |
| Main namespace | shturval-update-system; Helm namespace is set by the installation command #QUESTION: do I need to add namespace to Helm values |
| Controllers | ShturvalUpdate, ShturvalUpdateChannel, ShturvalUpdateSchedule |
| Deployment | shturval-update-controller-manager |
| Container image | set when installing chart shturval-update |
| Leader election | enabled by the --leader-elect flag; in the manager-manifest --leader-elect is passed |
| Metrics | bind address by defaultyu 0; Kustomize includes metrics service and authn/authz patch |
| health/readiness | default probe endpoint address :8081 |
| Webhooks | validating/defaulting webhook for ShturvalUpdate; turns off ENABLE_WEBHOOKS=false |
| Pod Security | runAsNonRoot: true, allowPrivilegeEscalation: false, drop ALL |
| HTTP/2 | disabled by default for metrics and webhook servers |
Controllers
| Controller | Purpose |
|---|---|
ShturvalUpdateReconciler | updates the cluster to spec.version, runs finalizer and conditions |
ShturvalUpdateChannelReconciler | reads the current version, gets the update matrix from the registry and publishes the available versions |
ShturvalUpdateScheduleReconciler | calculates the cron window and starts the update using the default ShturvalUpdate |
2. Architecture
Workload Components
| Component | Kubernetes type | Scope | Description |
|---|---|---|---|
ShturvalUpdate | CRD/custom resource | Namespaced | target version and platform update status |
ShturvalUpdateChannel | CRD/custom resource | Namespaced | update channel and list of available versions |
ShturvalUpdateSchedule | CRD/custom resource | Namespaced | cron schedule and next update interval |
shturval-update-controller-manager | Deployment | Namespaced | runs /shturval-update with leader election |
webhook-service | Service | Namespaced | endpoint for admission webhook |
ServiceMonitor | Prometheus resource | Namespaced | monitoring metrics endpoint; installation depends on the presence of Prometheus CRD in the cluster |
Certificate | cert-manager resource | Namespaced | webhook server certificate; installation depends on the presence of cert-manager CRD in the cluster |
Deployment architecture
Illustration: Deployment architecture

Interaction with external systems
| System | How to use |
|---|---|
| Kubernetes API | storing CRD, running reconcile, applying changes to platform resources |
| Update registry | matrix file source at <registry>/update/<channel>/<currentVersion> |
| Shturval service configuration | managing system services during update phases |
| Child clusters | access viakubeconfig Secret <clusterId>-kubeconfig in namespace <clusterId>, key value |
Update Resource Links
Illustration: Update Resource Links

Access to child clusters
If the update phase accesses a child cluster, the operator expects a Secret with kubeconfig:
apiVersion: v1
kind: Secret
metadata:
name: <clusterId>-kubeconfig
namespace: <clusterId>
type: Opaque
stringData:
value: |
apiVersion: v1
kind: Config
clusters:
- name: <cluster>
cluster:
server: https://<api-server>
certificate-authority-data: <base64-ca>
contexts:
- name: <cluster>
context:
cluster: <cluster>
user: <user>
current-context: <cluster>
users:
- name: <user>
user:
token: <token>
SSH keys and passphrase-protected SSH keys are not read by this circuit: kubeconfig from the value key is used for access.
3. Installation / deployment
The delivery includes two Helm charts: shturval-update-crds for the CRD and shturval-update for the controller. The installation must first deliver the CRD, then the main chart with Deployment, RBAC, webhook and related objects.
Note: any changes to installation parameters must be made in concert with the platform via ShturvalServicePatch (SSP) or other approved service management mechanism, without manual changes that bypass the platform lifecycle.
Minimum installation order
| Step | What is installed | Result |
|---|---|---|
| 1 | chart shturval-update-crds | CRDs ShturvalUpdate, ShturvalUpdateChannel, ShturvalUpdateSchedule appear in Kubernetes API |
| 2 | chart shturval-update | controller manager is launched, RBAC, Service and webhook integration are created |
| 3 | default CR | resources are created through which the operator determines the current version, channel and schedule |
4. Diagnostics
Diagnostics are based on the CR and conditions status fields. The original technical manual does not have a ready set of operational kubectl get/logs commands, so the test commands are not duplicated here.
General symptoms
| Symptom | Possible reason | Action |
|---|---|---|
ShturvalUpdate.status.ready=false does not change for a long time | the target version is not available, the phases are not built, or one of the phases returned an error | check status.conditions resource ShturvalUpdate |
ShturvalUpdateChannel.status.ready=false | the current version has not been read or is unavailable update matrix | check status.currentversion, status.lastchecked, registry parameters |
There is no expected version in status.availableupdates | channel, current version or matrix semver restrictions do not give the desired transition | check channel and current platform version |
| Scheduled updatee starts | cron window has not yet arrived, update is already in progress or channel does not contain available versions | check ShturvalUpdateSchedule.status.nextUpdateStart/End and status.conditions |
Removal ShturvalUpdate rejected | webhook prevents deletion at status.ready=false | wait for the update to complete or confirm the emergency procedure separately |
Conditions ShturvalUpdate
| Condition | True | False/reasons |
|---|---|---|
VersionIsCorrect | version available and phases built | SpecVersionErr, SpecVersionResourceNotFound, SpecVersionNotAvailable, BuildUpdatePhasesErr |
ControllerUpdated | init/controller phase completed | reason depends on the specific update |
PostInitUpdated | post-init phase completed | reason depends on the specific update |
CRDUpdated | CRD phase completed | CRDGetFailed, CRDPatchFailed |
PreKubeUpdated | pre-kube phase completed | reason depends on the specific update |
NCIUpdated | kube/NCI phase completed | reason depends on kube phase |
StdUpdated | STD phase completed | reason depends on the STD phase |
SystemServicesUninstall | SSC uninstall phase completed | SSCUpdateFail, SSCUninstallFail |
PreSystemServiceUpdated | pre-SSC phase completed | reason depends on the release command |
SystemServicesUpdated | system services phase completed | SSCGetFail, SSCAddFail, SSCUpdateFail, SSCUpdateWait, SSCServices* |
ValidateKubeApiVersion | API Kubernetes check completed | reason depends on the command phase |
UpdatePaused | update paused due to schedule window | condition is removed by the controller after resumption |
PostSSCUpdate | post-SSC phase completed | reason depends on the release command |
DefineClusterVersion | current cluster version defined | UndefinedBaseSscVersions |
Conditions ShturvalUpdateChannel
ShturvalUpdateChannel has no separate conditions defined. The fields status.ready, status.currentversion, status.lastchecked and status.availableupdates are used for diagnostics.
Conditions ShturvalUpdateSchedule
| Condition | True | False/reasons |
|---|---|---|
TriggerUpdate | ShturvalUpdate successfully patched by schedule | PatchShturvalUpdateError if there is an error when launching update according to schedule |
5. Life cycle
End-to-end update lifecycle
Illustration: End-to-end update lifecycle

Update via ShturvalUpdate
| Step | Resource/Component | Action |
|---|---|---|
| 1 | ShturvalUpdate | operator receives the resource and completes reconcile without error if the resource has already been deleted |
| 2 | ShturvalUpdate.status | if the current version is not yet defined, the operator sets in status.currentversion |
| 3 | ShturvalUpdate.status.clusterinfo | if the cluster type is not yet defined, the operator fills in information about the cluster |
| 4 | ShturvalUpdate | finalizer update.shturval.tech/finalizer is added |
| 5 | ShturvalUpdate.spec.version | if the target version is empty, the operator sets status.ready=true and does not trigger the update |
| 6 | ShturvalUpdate.status.conditions | when a new update starts, conditions are reset, ready is transferred to false |
| 7 | Update phases | operator checks version availability, builds phases and executes update commands |
| 8 | ShturvalUpdate.status.currentversion | after successful execution and in the absence of a pause, the operator again determines the cluster version |
Finalizer: update.shturval.tech/finalizer. When deleted, the operator removes the finalizer and completes the reconcile.
Reconcile ShturvalUpdate
Illustration: Reconcile ShturvalUpdate

Checking the update channel
| Step | Resource/component | Action |
|---|---|---|
| 1 | ShturvalUpdateChannel | the operator accepts for processing only the default resource with the name shturval-update |
| 2 | ShturvalUpdateChannel.status | ready is translated into false, updated lastchecked |
| 3 | Default ShturvalUpdate | operator reads current version |
| 4 | Update registry | loading matrix at URL <registry>/update/<channel>/<currentVersion> |
| 5 | ShturvalUpdateChannel.status.availableupdates | matrix is filtered by semver rules, the result is sorted and written to status |
| 6 | ShturvalUpdateChannel.status.ready | after a successful check, true is set |
Finalizer: update.shturval.tech/finalizer. When deleting a channel resource, the operator removes the finalizer.
Reconcile ShturvalUpdateChannel
Illustration: Reconcile ShturvalUpdateChannel

Scheduled update
| Step | Resource/component | Action |
|---|---|---|
| 1 | ShturvalUpdateSchedule | the operator receives the schedule and calculates the window using spec.schedule |
| 2 | status.nextUpdateStart/End | the beginning and end of the nearest or current window are recorded |
| 3 | Default ShturvalUpdate | if update is already in progress, schedule waits for the next attempt |
| 4 | UpdatePaused | if the update was paused by this schedule, the operator clears pause-condition |
| 5 | ShturvalUpdateChannel.status.availableupdates | selecting the version to launch |
| 6 | Default ShturvalUpdate | spec.version and spec.followSchedule are patched, condition TriggerUpdate=True |
When deleting ShturvalUpdateSchedule, the operator prohibits deletion if the default ShturvalUpdate.spec.followSchedule points to the schedule to be deleted; otherwise it removes the finalizer.
Reconcile ShturvalUpdateSchedule
Illustration: Reconcile ShturvalUpdateSchedule

Resource Negotiation Protocol
| Step | Member | Action |
|---|---|---|
| 1 | ShturvalUpdateChannel | reads ShturvalUpdate.status.currentversion, gets matrix and writes status.availableupdates |
| 2 | ShturvalUpdateSchedule | reads ShturvalUpdateChannel.status.availableupdates into the cron window and patches the default ShturvalUpdate |
| 3 | ShturvalUpdate | checks spec.version against ShturvalUpdateChannel.status.availableupdates, builds and executes phases |
| 4 | ShturvalUpdateChannel | after the default one is ready, ShturvalUpdate starts a re-check channel |
6. Operator parameters
Process flags
| Flag | Default | Purpose |
|---|---|---|
--debug | false | enables debug mode |
--metrics-bind-address | 0 | metrics endpoint address; :8443 for HTTPS, :8080 for HTTP, 0 disables metrics service |
--health-probe-bind-address | :8081 | address health/readiness probe endpoint |
--leader-elect | false | includes leader election; in the manager-manifest --leader-elect is passed |
--metrics-secure | true | enables HTTPS for metrics endpoint; false enables HTTP |
--enable-http2 | false | enables HTTP/2 for metrics and webhook servers |
Environment Variables
| Variable | Default/Source | Purpose |
|————|———————————|————|| WATCH_NAMESPACE | shturval-update-system if env is missing | namespace of reconciler work |
| SYNC_PERIOD | 60m | retry interval for ShturvalUpdateChannel |
| SCHEDULE_SYNC_PERIOD | at runtime 60m, Helm default 10m | retry interval for ShturvalUpdateSchedule |
| SYSTEM_REGISTRY | r.shturval.tech | registry host; operator adds schema and path /repository/shturval_bin_public |
| SYSTEM_REGISTRY_INSECURE | false; auto true for non-default registry without env | insecure HTTP client mode for registry |
| ENABLE_WEBHOOKS | enabled if not false | webhook registration |
| GODEBUG | tlsmlkem=0 | runtime/build Go option |
7. CRD/API reference
API group/version for all resources: update.shturval.tech/v1beta1.
ShturvalUpdate (su, shup, shupdate) — Namespaced
spec field | Type | Required | Description |
|---|---|---|---|
spec.version | string | N | target platform version; semver is allowed with optional v, prerelease and build metadata |
spec.followSchedule | *string | N | name of ShturvalUpdateSchedule that initiated the update; empty for manual start |
status field | Type | Description |
|---|---|---|
status.ready | bool | readiness of the update process |
status.currentversion | string | current platform version |
status.clusterinfo.typecluster | string | cluster type: base or mgmt |
status.clusterinfo.insecure | bool | repository connection type from ShturvalRepoConfig.spec.insecure |
status.conditions | []metav1.Condition | update progress and phase errors |
Conditions ShturvalUpdate are listed in the Diagnostics section.
ShturvalUpdateChannel (suc, shupch, shupdatechannel) — Namespaced
spec field | Type | Required | Description |
|---|---|---|---|
spec.channel | string | N | update channel; an empty value at runtime is interpreted as stable |
status field | Type | Description |
|---|---|---|
status.ready | bool | channel check readiness |
status.currentversion | string | current version from default ShturvalUpdate |
status.lastchecked | metav1.Time | last check time |
status.availableupdates | []string | sorted list of available versions from update matrix |
Conditions for ShturvalUpdateChannel are not defined.
ShturvalUpdateSchedule — Namespaced
There is no ShortName marker for ShturvalUpdateSchedule. #QUESTION: is a short alias necessary?for kubectl.
spec field | Type | Required | Description |
|---|---|---|---|
spec.schedule | string | Y | cron-expression |
spec.updatePeriod | metav1.Duration | Y | update window duration; default 24h0m0s |
spec.pauseIfUpdatePeriodExceed | bool | Y | if true, update is paused when leaving the window |
spec.allowMinorVersion | bool | Y | if true, schedule can select the latest available version from channel status |
status field | Type | Description |
|---|---|---|
status.nextUpdateStart | *metav1.Time | start of the nearest or current window |
status.nextUpdateEnd | *metav1.Time | end of window |
status.nextUpdateVersion | *string | version selected by schedule |
status.conditions | []metav1.Condition | planning progress |
Conditions ShturvalUpdateSchedule are listed in the Diagnostics section.
Where to configure
Services and repositories → Installed services → shturval-update → Manage. More details: Update Kubernetes.