More

Client cluster manager (shturval-cluster-manager)

About the service

ParameterDescription
GUI nameClient Cluster Manager
System name (identifier)shturval-cluster-manager
Cluster AssignmentManages the life cycle of client clusters: creates, configures, and deletes them. During the initial deployment, installs platform services in the client cluster. The service itself runs in the management cluster.
CriticalYes
BundleMain
Public repository— (component of the Shturval platform)
Dependenciesshturval-cluster-manager-crds, shturval-auth, shturval-trust-manager
Namespaceshturval-cluster-manager

Contents

  1. Review
  2. Architecture
  3. Installation / deployment
  4. Diagnostics
  5. Life cycle
  6. Operator parameters
  7. CRD/API reference
  8. Customization via SSP

1. Review

cluster-manager is the Shturval platform operator. From objects in cluster.shturval.tech/v1beta1 it deploys cluster system components, synchronizes state with Cluster API, and writes the summary to ClusterInfo.

From ClusterConfig, the operator installs system services (SSC, OIDC, ingress, CSI and CCM, monitoring, logging), watches Cluster API, and updates the cluster to the version in spec.releaseVersion. Parameters of the running chart release are set through ShturvalServicePatch (SSP). Helm releases from SSC objects are installed by the Service management module (shturval-services).

During the initial deployment of a client cluster, cluster-manager coordinates the installation of platform services and the application of node configurations through the Node Config (NCI) mechanism. See Node configuration management module and Node Configuration (NCI). An overview of infrastructure providers and links to the documentation for each provider are on the Providers page.

Each service comes as one or more Helm charts. Charts with CRD (*-crds) are installed separately and marked as Hidden — they are managed automatically.

The operator covers ClusterConfig, ClusterProfile, ClusterInfo, ClusterUpdateChannel, ClusterUpdateSchedule, and InfrastructureProvider. A separate process in the same chart manages the IP address pool. When the cluster registry differs from the management cluster registry, a CronJob in the client cluster fetches the catalog of available releases.

Audience and tasks

AudienceTasks
Platform administratorClusterConfig, profile, update window, cluster deletion, status conditions
Platform integratorChart, update catalog image, registry, InfrastructureProvider, CSI and CCM secrets

Functions

FunctionWhat it doesDetails
ClusterConfig maintenanceInitial setup, applying manifests after SSC, and regular maintenanceAfter the finalizer is added, the check repeats after 1 s; if the initial setup is not finished, after 10 s; if the client cluster API is unreachable during deletion, after 30 s
ClusterInfoSummary of Cluster API and the client clusterRepeats every 2 minutes. Finalizer cluster.shturval.tech/clusterinfo
Release updatePhases from status.update.currentVersion to spec.releaseVersionNo more than --max-concurrent-updates at once (default 5); otherwise phase Queued and a retry after 5 min. Schedule window: retry after 30 s. SSC version check: after 1 min
ClusterUpdateChannelMatrix of available releasesSame registry as the management cluster: a request from the process. A different registry: CronJob cluster-available-updates in the client cluster. While there is no currentVersion, retry after 30 s
ClusterUpdateScheduleIn an open window, the controller writes the target version to ClusterConfigThe schedule is a cron expression and the updatePeriod field. When allowMinorVersion=false, the highest version within the current minor is chosen
InfrastructureProviderProvider record, short name ipOne object is allowed per spec.providerRef. A bad reference is checked again after 30 s. If config contains invalid JSON, ConfigValid=False and Reason: InvalidJSON are set; there is no automatic retry
ClusterProfileChecks secrets that hold extra manifestsWatches Secret objects labeled cluster.shturval.tech/manifest in the same Namespace
WebhooksDefaults and validation for ClusterConfig, ClusterProfile, InfrastructureProviderENABLE_WEBHOOKS=false disables all three
Garbage collectionDeletes a Namespace labeled cluster.shturval.tech/garbage-collect=true when no Cluster API Cluster remains in itWhile clusters remain, retry after 1 min
Update catalogImage from AVAILABLE_UPDATES_IMAGEWithout this variable the manager process exits

Triggers

ScenarioWho starts itTriggerObservable effect
Desired cluster stateUser or GitOpsCreate or change ClusterConfig, change ClusterInfo and AuthOidcClientInstall steps, conditions on ClusterConfig
Update channelOperatorClusterConfig initialization, channel does not exist yetClusterUpdateChannel with the same name and Namespace, channel: stable, ownerRef to ClusterConfig
Cluster summaryOperatorTimer, Cluster API, change of the same-name ClusterUpdateChannelUpdated ClusterInfo.status
Release matrixOperatorChannel check; the CronJob starts in the client cluster when a separate registry is usedstatus.availableUpdates, status.ready
Scheduled updateUser creates ClusterUpdateScheduleOpen cron window and a ready cacheWrites spec.releaseVersion and spec.update.followSchedule
Running an updateUser or schedule changes spec.releaseVersionChange of version, strategy, followSchedule, automatic update annotationstatus.update.phase and phase conditions
Profile manifestsUser changes ClusterProfile or related Secret objectsProfile state checkstatus.extraManifestsStatus
Infrastructure providerUser creates InfrastructureProviderCreate or change of the resource, and a change of a Cluster API Cluster in the provider Namespacestatus.ready, linkedClusters
Empty NamespaceChange of a Namespace with the garbage collection labelNamespace changeThe Namespace is deleted when no Cluster API Cluster remains in it
API request checkAPI ServerCreate or change of ClusterConfig, ClusterProfile, InfrastructureProviderDefaults are filled in, or a disallowed change is rejected

Operational limits

LimitWhat the administrator sees
No ClusterInfo.status.baseInfo.apiEndpointCluster configuration slows down. The controller keeps trying to synchronize and gradually increases the interval between attempts. Status may show the message “cluster api endpoint not ready”
A profile with extra manifests does not have status.extraManifestsStatus.ready equal to TrueInitClusterManager becomes False, reason ClusterProfileNotReady
AVAILABLE_UPDATES_IMAGE is not setThe manager process exits at startup
Webhooks are on by defaultA local run without a certificate requires ENABLE_WEBHOOKS=false. In the product, cert-manager issues the certificate
controllerType is already gatewayThe validating webhook rejects a change back to nginx
Deletion of a ClusterUpdateSchedule referenced by spec.update.followScheduleDeletion returns an error and the finalizer stays
The client API is unreachable, and cleanup of resources in the client cluster cannot be skippedClusterConfig deletion retries after 30 s. PersistentVolumesRemoved stays False, reason RemoteUnreachableWaiting
Cluster registry differs from the default registryTLS of that registry is treated as insecure when the update matrix is loaded. There is no separate field for this switch
SSH portThe connection to the node uses port 22. Another port requires a new image version
SSH private key protected by a passphraseThe passphrase is not read from the Secret automatically. Such a key works only when the SSH connection step passes the password separately
ClusterInfo lookupRead uses the name spec.clusterName. The created object receives the name and Namespace of the ClusterConfig

Cleanup of resources in the client cluster means deleting persistent volumes, load balancers, and other objects through that cluster’s API. If the API is unreachable, cluster-manager can continue the deletion without cleanup when at least one condition holds: the Cluster API Cluster has the annotation cluster.shturval.tech/force-delete-cluster-allowed=true, spec.deletePersistentVolumes=true is set, or the ClusterInitialized condition is not yet True. If deletePersistentVolumes=false, the controller adds the annotation cluster.shturval.tech/preserve-persistent-volumes to the Cluster API Cluster, and persistent volumes are kept when the cluster is deleted.

Infrastructure providers are marked as critical Critical (the service cannot be disabled in the platform GUI) only for environments where the management cluster was deployed with the corresponding provider: OpenStack (shturval-capos), Shturval v2 (shturval-capsm), vSphere (shturval-capvs), or oVirt (shturval-capov). If unused providers remained enabled on a previously installed platform, disable them as described in Provider instance.

Place in the management chain

ClusterConfig, ClusterProfile, ClusterUpdateSchedule, and InfrastructureProvider reach the API Server through the platform, Helm, or kubectl. Controllers process them and create or update Cluster API objects and ShturvalServiceConfig. CronJob cluster-available-updates appears in the client cluster only when the cluster uses a separate registry.

Key characteristics

CharacteristicValue
API group / versioncluster.shturval.tech / v1beta1
Kustomize install Namespaceshturval-cluster-manager
Helm NamespaceRelease Namespace. In the product this is often the same shturval-cluster-manager
MetricsFlag --metrics-bind-address, off by default (0), HTTPS on (--metrics-secure=true). Helm passes 0.0.0.0:8443
Probes--health-probe-bind-address=:8081
WebhooksChart port 9443. TLS directory --webhook-cert-path
Pod SecurityrunAsNonRoot, seccompProfile: RuntimeDefault, container without privilege. The process in the image runs as user 65532
Manager imager.shturval.tech/shturval/cluster-manager. If the image tag is not set, the chart appVersion is used
Update catalog imager.shturval.tech/shturval/available-updates, the same default tag. Variable AVAILABLE_UPDATES_IMAGE
HTTP/2Off (--enable-http2=false)
Container command/cluster-manager
Default registry for install stepsr.shturval.tech

Components

ComponentTypeScopePurpose
ManagerDeploymentOperator NamespaceContainer /cluster-manager
IP pool controllerDeploymentOperator NamespaceSecond Deployment of the same chart
WebhookServiceOperator NamespaceTraffic to the webhook server, port 9443
CRDCustomResourceDefinitionClusterSix Kinds, all Namespaced. Short name only on InfrastructureProvider: ip
RBACClusterRole, bindings, ServiceAccountCluster and NamespaceManager permissions
Certificatescert-manager objectsOperator NamespaceTLS for the webhook and metrics
cluster-available-updatesCronJob and ConfigMapNamespace shturval-cluster-manager of the client clusterOnly when the registry differs from the management registry

2. Architecture

Manifests applied with kubectl or Helm reach the API Server. Deployment cluster-manager runs in the operator Namespace. RBAC (ClusterRole, Binding, and ServiceAccount) gives the Pod access to the API. cert-manager issues certificates for webhooks and HTTPS metrics. CronJob cluster-available-updates is created in the client cluster only when that cluster uses a separate registry.

Manager Pod propertyValue
Command/cluster-manager
Probesport 8081
Metrics in the chart0.0.0.0:8443, HTTPS
Webhookport 9443
Usernon-root, 65532 in the image
Required environmentAVAILABLE_UPDATES_IMAGE

Object relationships

While ClusterConfig is processed, the controller creates ClusterUpdateChannel with the same name and Namespace, adds an ownerRef, creates ClusterInfo, checks the ClusterProfile status, and watches changes of AuthOidcClient. The ClusterUpdateSchedule controller writes spec.releaseVersion and spec.update.followSchedule to ClusterConfig. A change of these fields or of the strategy starts the release update. The ClusterInfo controller reads data from the Cluster API Cluster and the release list from the channel cache. The InfrastructureProvider controller watches Cluster API Cluster objects in the provider Namespace and adds a finalizer to the object from spec.providerRef.

RelationshipWhat to watch
ClusterConfig → ClusterInfoCluster summary. Lookup by spec.clusterName; the created object is named as the ClusterConfig
ClusterConfig → ClusterUpdateChannelChannel stable, ownerRef
ClusterConfig → ClusterProfileInitialization waits for extraManifestsStatus.ready
ClusterUpdateSchedule → ClusterConfigIn the window, the version and the schedule name are written to followSchedule
InfrastructureProvider → providerRef objectFinalizer infrastructureprovider.cluster.shturval.tech/native-finalizer
Channel when a separate registry is usedCronJob and ConfigMap cluster-available-updates

3. Installation / deployment

The release consists of two charts: the CRD chart and the application chart. The Namespace is set at install time. The product uses shturval-cluster-manager.

The application chart creates the manager Deployment with command /cluster-manager and a separate Deployment for the IP pool controller. The manager image is r.shturval.tech/shturval/cluster-manager; the default tag equals the chart appVersion. The update catalog job image is r.shturval.tech/shturval/available-updates.

The process does not start without AVAILABLE_UPDATES_IMAGE. The chart builds the variable from clusterManager.availableUpdates.image and appVersion. If AVAILABLE_UPDATES_IMAGE_PULL_SECRET is set, POD_NAMESPACE is also required (in the chart this is the Pod Namespace). An empty catalog schedule is replaced with 0 */1 * * *, and an empty update schedule period with 10m. Parameters of the running release are changed through SSP. Keys are listed in section 6.

Webhooks are on by default. cert-manager issues the certificates. To disable all three webhooks, set ENABLE_WEBHOOKS=false.

After installation, the desired state is set by objects, not by chart arguments. The minimum order for a new cluster is ClusterProfile (when custom manifests or shared settings are needed), then ClusterConfig. The operator creates ClusterInfo and ClusterUpdateChannel itself.

Secrets for CSI, CCM, and SSH

ClusterConfig references secrets through providerSecretRef in the CSI and CCM settings.

ProviderWhat the Secret must contain
capos CSIkey clouds.yaml
capyc CCMkey YandexCloudSAKey
capov, capvs, capyc CSI and CSI capvcdkey data (YAML). For capvcd, the YAML is expected to contain vcd and auth sections
capcd CCMData is not empty. Values are taken from annotations shturval.tech/site, org, ovdc, network, vip-subnet

Example Secret with the data key:

apiVersion: v1
kind: Secret
metadata:
  name: my-provider-credentials
  namespace: <namespace-clusterconfig>
type: Opaque
stringData:
  data: |
        ...

The Secret for SSH access to a node is a separate object. Do not confuse it with providerSecretRef:

apiVersion: v1
kind: Secret
metadata:
  name: node-ssh-access
  namespace: <operator-namespace>
type: Opaque
stringData:
  sshUser: "ubuntu"
  sshKey: |
    -----BEGIN OPENSSH PRIVATE KEY-----
    ...
    -----END OPENSSH PRIVATE KEY-----    

A private key protected by a passphrase is not supported automatically. It works only when the password is passed separately on the SSH connection step. The SSH port is fixed: 22.

Secrets for extra profile manifests are labeled cluster.shturval.tech/manifest and live in the profile Namespace.

Dependencies between services

Cluster-manager respects the installation order. Main dependencies:

ServiceDepends on
shturval-capishturval-capi-crds, shturval-local-csi, shturval-ingress-controller
shturval-capsmshturval-capsm-crds, shturval-cert-manager

4. Diagnostics

To diagnose, check the state of the objects and their Conditions.

What to checkExpected
Manager DeploymentContainer /cluster-manager in the release Namespace, probes on port 8081
MetricsHTTPS 0.0.0.0:8443, when the chart is installed
ClusterConfig.status.conditionsInstall-step conditions. A typical successful step: Status: True, Reason: Success
ClusterConfig.status.updateready, currentVersion, phase: Complete, Queued, Updating, Paused
ClusterInfo.status.readyOverall readiness. The root of ClusterInfo has no metav1.Condition list
ClusterUpdateChannel.status.readyThe matrix was read; the list is in availableUpdates
InfrastructureProvider.status.readyThe field becomes true when ProviderRefReady and ConfigValid are both True
CronJobcluster-available-updates is created only when a separate registry is used. The ConfigMap of the same name is in Namespace shturval-cluster-manager of the client cluster

Retry intervals:

SituationWhen the next check runs
The finalizer was just set on ClusterConfig or InfrastructureProvider1 s
The initial setup is not finished yet10 s
The client API is unreachable during deletion30 s
Deletion of the Cluster API Cluster failed1 s
There are no events that require an immediate ClusterInfo update2 min
The update queue is full5 min
The schedule window is closed, or the update is paused30 s
The base SSC version does not yet match the target, the channel is not ready, or there is no currentVersion30 s when the channel is not ready or there is no currentVersion; 1 min when the base SSC version does not yet match the target
The channel has successfully received the version listOn the cron schedule, and no later than 60 min
ClusterUpdateSchedule outside a window eventscheduleSyncPeriod, 10 min by default
The Namespace still has a Cluster API Cluster1 min

ClusterConfig conditions

ConditionWhen TrueWhen False
AuthDeployedThe auth installer has finishedAuth step error
ClusterManagerDeployedcluster-manager is installed during the initial installation of the management clusterInstaller error
CcmInstalledCCM is deployed or not requiredCCM deployment error
CertificatesInstalledCertificates are appliedCertificate step error
ClusterInitializedThe cluster is initializedThe initial setup is not finished yet
CsiDeployedAll CSI installs succeededInstallCsiFailed, PartialCsiDeployed
DefaultLogsCollectorResourcesInstalledLog collector resources are createdStep error
EnabledServicesDeployedSSC of enabled services are deployedPartial errors or waiting
IngressVipConfiguredIngress or VIP is applied, Reason: SuccessIngress step error
GatewayConfiguredGateway API is Programmed, Reason: SuccessEnsureGatewayFailed, GatewayProgrammedCheckFailed, GatewayNotProgrammed
IngressGatewayMigratedMigration phase Completed, Reason: SuccessIntermediate phases and migration errors
InitClusterManagerThe manager context is builtClusterProfileNotReady, ClusterApiEndpointIsNotConfigured, ClusterDeletionFailed
InitialNciDeployedThe initial node configuration (NCI) is appliedNCI step error
KubeApiOidcConfiguredkube-api OIDC is configuredStep error
MonitoringResourcesUpdatedMonitoring is updatedMonitoring step error
OidcClientServiceConfiguredOIDC service configs are updatedStep error
OidcClientsReadyOIDC clients are readyOIDC preparation error
ServicesAutoscaledAutoscaling is appliedStep error
SscContextPreparedSSC context for the log collector is readySSC preparation error
PostSscCustomManifestDeployedManifests after SSC are appliedManifest apply error
ResourcesUninstalledResources are removed on deletionDeletion step error
LoadBalancersRemovedLoad balancers are removedCleanup step error
PlatformAdminGroupInstalledThe platform administrator group is installedStep error
TenantResourcesInstalledTenant resources are installedStep error
PersistentVolumesRemovedVolumes are handled according to the deletion policyRemoteUnreachableWaiting when the client API is unreachable and skipping is not allowed

Ingress migration phases in status.systemServicesConfigStatus.ingressMigration: Preparing, AwaitingCutover, CuttingOver, Verifying, Completed, Failed. Internal migration scenario identifiers: A1, A2, A3.

Update conditions

Conditions live in status.update.conditions. After a phase succeeds, that phase condition becomes True and Reason matches the condition type.

ConditionWhen TrueWhen False
VersionIsCorrectPhases are built, or the cluster is already on spec.releaseVersionAvailableUpdatesNotReady, SpecVersionNotAvailable, BuildUpdatePhasesErr
UpdatePausedThe window is closed and pauseIfUpdatePeriodExceed is enabled. Message: the schedule window is closedFalse when there is no schedule or the window is open. When the schedule resumes, Reason: ScheduleWindowOpen
DefineClusterVersionThe version from base SSC matches the requested versionClusterVersionNotConverged
TriggerUpdateThe schedule wrote the version to ClusterConfigAvailableUpdatesNotReady, PatchClusterConfigError

The other phase conditions become True when the corresponding phase finishes without an error. Names: ControllerUpdated, UpdateStrategyAvailable, PostInitUpdated, PostInitUpdated_2_15_0, CRDUpdated, PreKubeUpdated, PreKubeUpdated_2_14_0, KubeUpdated, StdUpdated, PreSscUninstall, SystemServicesUninstall, PreSystemServiceUpdated, SystemServicesUpdated, ValidateKubeApiVersion, PreSSCUpdate_2_13_1, PreSSCUpdate_2_14_0, PreSSCUpdate_2_15_0, PostSSCUpdate, PostSSCUpdate_2_14_0, PostSSCUpdate_2_14_1, PostSSCUpdate_2_15_0, PatchClientClusterServices, PatchClientClusterServices_2_14_0, PatchClientClusterServices_2_15_0.

The status.update.phase field shows the update stage: Queued — the update is waiting to start or for a free slot; Updating — the update is running; Paused — the update is paused; Complete — the target version is installed and ready=true. Phases Updating and Paused occupy a slot in the parallel update limit.

During the Kubernetes update phase, a large nci.json (threshold 10240) is moved out of the main content.

ClusterProfile readiness

The profile has no separate Condition list. If no extra manifests are set, status.extraManifestsStatus.ready becomes True. Otherwise readiness is determined by the secret checks for the management cluster and the client cluster: valid or incorrect.

ClusterInfo readiness

There are no metav1.Condition entries at the root. Watch the nested blocks: baseInfo, cluster, clusterDeployment, update, ready. The field for selection is .status.baseInfo.clusterType. Service progress does not become complete until EnabledServicesDeployed is True on ClusterConfig.

ClusterUpdateChannel readiness

There are no separate Conditions. Readiness is status.ready. While currentVersion is empty, the release list is not filled.

ClusterUpdateSchedule window

The TriggerUpdate condition is in the update conditions table. Window bounds: status.nextUpdateStart, status.nextUpdateEnd. The version written to the cluster: status.nextUpdateVersion.

InfrastructureProvider conditions

ConditionWhen TrueWhen False
ProviderRefReadyThe object is found, is not being deleted, and this InfrastructureProvider owns the reference. Reason: ProviderFoundNotFound, Deleting, OwnerLookupFailed, DuplicateProviderRef, FinalizerPatchFailed
ConfigValidJSON is empty or parses. Reason: ValidInvalidJSON
DeleteBlockedDeletion is blocked: ErrorFindingLinkedClusters, LinkedClustersFound, ErrorResolvingProviderRef, NativeFinalizerPatchFailedOn a successful deletion the finalizers are removed. This condition does not mean deletion is allowed

status.ready is true when both ProviderRefReady and ConfigValid are True.

Typical situations

SymptomCauseWhat to do
The manager Pod exits immediatelyNo AVAILABLE_UPDATES_IMAGESet the catalog image in the chart parameters
InitClusterManager=False, ClusterApiEndpointIsNotConfiguredClusterInfo.status.baseInfo has no apiEndpoint yetWait until the API address appears on the Cluster API Cluster and is written to ClusterInfo. Until then, the controller keeps trying to synchronize and gradually increases the interval between attempts
InitClusterManager=False, ClusterProfileNotReadyA profile with manifests does not have ready TrueCheck secrets labeled cluster.shturval.tech/manifest and extraManifestsStatus
Changing ingress from gateway to nginx is rejectedThe webhook forbids the reverse transitionLeave gateway
status.update.phase=Queued longer than a normal stepThe number of updates in Updating and Paused reached the limit (default 5)Wait up to 5 min for a slot to free
VersionIsCorrect=False, SpecVersionNotAvailablespec.releaseVersion is not in the channel cacheWait for ClusterUpdateChannel.status.ready and for the version in availableUpdates
Update is PausedThe schedule window is closed and pauseIfUpdatePeriodExceed=trueWait for the next window. The check repeats every 30 s
ClusterConfig deletion is stuck on RemoteUnreachableWaitingThe client API is unreachable, and cleanup of resources in the client cluster cannot be skippedRestore API access or meet a skip condition: annotation cluster.shturval.tech/force-delete-cluster-allowed=true, or deletePersistentVolumes=true, or ClusterInitialized is not yet True
ClusterUpdateSchedule is not deletedspec.update.followSchedule equals the schedule nameRemove the reference from ClusterConfig first
InfrastructureProvider is not deleted, DeleteBlockedLinked clusters exist, or the finalizer on the provider object is not removedRemove cluster references. Retry after 30 s
ConfigValid=False, InvalidJSONspec.config is set and is not a JSON objectFix the JSON. There is no retry by itself
No catalog CronJobThe cluster registry matches the management registryThe manager process requests the matrix; the CronJob is not created in this case
Channel ready=false when a separate registry is usedNo ConfigMap, the data is not ready yet, the data belongs to another currentVersion, or the data is older than the cron periodInspect ConfigMap cluster-available-updates in Namespace shturval-cluster-manager of the client cluster

Service status

What to checkCommand
All SSCs in the clusterkubectl get shturvalserviceconfig
All SSPs in the clusterkubectl get shturvalservicepatch
Specific SSC statuskubectl describe shturvalserviceconfig <name>
CAPSM Podskubectl get pods -n shturval-capsm
CAPI Podskubectl get pods -n capi-system
Monitoring Podskubectl get pods -n victoria-metrics

Typical problems

SymptomPossible reasonAction
The service Pod does not startIncorrect parameters in SSPCheck kubectl describe shturvalservicepatch <name> and the Pod logs
SSC is constantly updatedSSP conflict with the platform SSCMake sure the SSP does not overwrite fields that the platform updates
CAPI provider is not readyCRDs are not installedCheck the status of the *-crds chart and dependencies
The service was disabled unexpectedlyA platform update changed modeCheck the SSC and the platform update history

CAPSM diagnostics

A detailed guide to diagnosing the Shturval v2 provider is in shturval-capsm §4.


5. Life cycle

The user first creates ClusterProfile, then ClusterConfig. The controller checks the profile secrets, creates ClusterInfo and ClusterUpdateChannel with channel stable, obtains the API address, and starts the cluster installation. The ClusterInfo controller collects the current cluster state. The channel controller obtains the list of available releases directly or from the ConfigMap of the client CronJob. A change of spec.releaseVersion starts the release update; progress is reflected in status.update.

StepResourceAction
1ClusterProfileThe controller checks secrets by selectors and fills status.extraManifestsStatus and ready
2ClusterConfigIf the profile ready is not True, the controller sets InitClusterManager=False
3ClusterConfigThe controller creates ClusterInfo and ClusterUpdateChannel if they do not exist yet
4ClusterConfigAfter a successful check, the controller copies secret references into status.extraManifestsStatus
5ClusterConfigStep PostSscCustomManifestDeployed applies the phase manifests
6ClusterInfoThe controller writes the summary from Cluster API and, after a ready Control Plane machine appears, also data from the client cluster
7ClusterUpdateChannelThe controller fills the list of available releases
8ClusterConfigAfter spec.releaseVersion changes, the controller updates status.update.phase

Processing ClusterConfig

ClusterConfig defines the cluster configuration. From this object the controller installs system components and keeps them in the required state. The controller adds the finalizer clusterconfig.cluster.shturval.tech/finalizer so the object cannot be deleted before the required cleanup finishes.

When a ClusterConfig is created, the controller first adds the finalizer and, after 1 second, starts preparing the cluster. It checks the profile and the API address, creates ClusterInfo and the update channel, runs the initial install steps, applies the manifests after SSC, and then moves to regular cluster maintenance. If an initial step is not finished yet, the next attempt runs after 10 seconds.

PhaseBehavior
CreateThe controller adds the finalizer, checks the profile and the API address, creates ClusterInfo and the update channel, runs the initial steps, applies the manifests after SSC, and starts regular maintenance. The initial deployment of the management cluster uses a different set of steps, and the release update controller does not start
Configuration changeThe controller compares the actual cluster state with ClusterConfig again. A change of releaseVersion, the update strategy, or followSchedule also starts the release update controller
DeleteThe controller cleans up resources in the client cluster, deletes the Cluster API Cluster, and only then removes the finalizer. Cleanup of the client cluster can be skipped in the cases defined below
ConditionsTable in section 4

Another pass over ClusterConfig also starts when the shturval-log-collector service status changes in ClusterInfo and when Ready or ClientHash changes on AuthOidcClient.

Cluster deletion

By default, before the cluster is deleted, the controller deletes persistent volumes, load balancers, and other related resources through the client cluster API. If the API is unreachable, deletion pauses: the controller writes PersistentVolumesRemoved=False with reason RemoteUnreachableWaiting and retries after 30 seconds.

Cleanup through the client cluster API can be skipped when at least one condition holds:

  • the Cluster API Cluster has the annotation cluster.shturval.tech/force-delete-cluster-allowed=true;
  • ClusterConfig has spec.deletePersistentVolumes=true;
  • the ClusterInitialized condition is not yet True.

If spec.deletePersistentVolumes=false, the controller adds the annotation cluster.shturval.tech/preserve-persistent-volumes to the Cluster API Cluster so that persistent volumes are kept.

StepResult in status
Client cluster cleanup can be skippedPersistentVolumesRemoved and LoadBalancersRemoved become True with the reason of the rule that applied. The other cleanup steps in the client cluster are not run
The client cluster API is unreachable, and skipping cleanup is not allowedPersistentVolumesRemoved=False, Reason: RemoteUnreachableWaiting; the next attempt runs after 30 seconds
The Cluster API Cluster could not be deletedInitClusterManager=False, Reason: ClusterDeletionFailed; the next attempt runs after 1 second
Deletion is finishedThe controller removes the finalizer and, after 1 second, performs a final check

Processing ClusterInfo

ClusterInfo holds the summary of the cluster state. The controller collects data about infrastructure, nodes, system services, and the update, then writes it to ClusterInfo.status. The object is protected by the finalizer cluster.shturval.tech/clusterinfo.

First the controller reads base information from the Cluster API Cluster of the same name, adds the available update strategies, and the release list from the update channel cache. After at least one ready Control Plane machine appears, it also collects services, Pods, and NCI from the client cluster.

If the Cluster API Cluster does not exist yet, the controller finishes the pass without an error. In normal operation the data is refreshed every 2 minutes and when related objects change.

PhaseBehavior
CreateThe controller adds the finalizer, then fills the status with information from Cluster API
UpdateThe status is recalculated every 2 minutes and when the Cluster API Cluster, a MachineDeployment, or the same-name ClusterUpdateChannel changes
DeleteThe controller removes the finalizer
ReadinessThere is no separate Conditions list. The overall cluster state is status.ready

The InPlace strategy is always available. RollingUpdate is added when the cluster has capsmv2 machines. Gateway mode is taken from the ingress controller type in ClusterConfig; for the management cluster it is also included when critical service readiness is calculated.

Processing ClusterProfile

ClusterProfile holds shared cluster settings and references to secrets with extra manifests. The controller checks those secrets and writes the result to status.extraManifestsStatus. The ClusterConfig controller then uses this status when installing the cluster.

If no extra manifests are set, the profile is ready. Otherwise the controller checks the manifest secrets for the management cluster and the client cluster. It watches only Secret objects labeled cluster.shturval.tech/manifest in the same Namespace as the profile.

PhaseBehavior
Create and changeIf no extra manifests are set, extraManifestsStatus.ready becomes True. Otherwise the controller checks secrets for the management cluster and the client cluster
DeleteThe controller removes the finalizer clusterprofile.cluster.shturval.tech/finalizer if it is present. This controller does not add that finalizer, so its absence does not block deletion
ReadinessThere is no separate Conditions list. The check result is extraManifestsStatus.ready

If the cluster-manager role cannot work with the resources listed in the profile, the secret check fails. How to grant the required permissions is described in Extending cluster-manager permissions.

Release update

The release update controller moves the cluster from the current version status.update.currentVersion to the target version spec.releaseVersion. It does not start during the initial deployment of the management cluster and does not process a ClusterConfig that is being deleted. The update has no finalizer of its own.

When the Shturval platform is updated, cluster-manager updates SSC with new chart versions. SSP objects are left unchanged, but the resulting values can change if the new chart version added or renamed fields.

If currentVersion is empty, the controller determines the current version from the client cluster. On an error it retries after 1 minute. If the current and target versions match, and the update is not running and is not paused, the controller sets phase=Complete and ready=true.

If the versions differ, the update first moves to Queued. The controller checks that the target version is in the update channel cache and that a free slot is available within the parallel update limit. If every slot is taken, the cluster stays in the queue and the next check runs after 5 minutes. When a slot is free, the update moves to Updating.

PhaseSpec fieldsWhat appears in status
Startspec.releaseVersion differs from status.update.currentVersionready=false, conditions of the previous update are cleared, phase=Queued
Waiting for a free slotBy default no more than 5 clusters are updated at once in Updating or PausedThe cluster stays in Queued
UpdateThe target version is in the update channel cachephase=Updating; as phases complete, their conditions become True in order
PausefollowSchedule is set, the update window is closed, and pauseIfUpdatePeriodExceed is enabledphase=Paused, UpdatePaused=True
FinishThe base SSC version matches the targetready=true, phase=Complete, VersionIsCorrect=True

On each pass the controller selects the next phase whose condition is not yet True. Before starting it, the controller checks the update window again. If the window has closed and pauseIfUpdatePeriodExceed is enabled, the update moves to Paused. While the window stays closed, the check repeats every 30 seconds.

Phases run in order until the base SSC version matches the target. If the versions still differ after the phases, the controller sets DefineClusterVersion=False with reason ClusterVersionNotConverged and checks again after 1 minute.

The ClusterUpdateChannel controller builds the available-version cache. The ClusterInfo, schedule, and release update controllers use that cache. If the target version is not in the cache, the controller sets VersionIsCorrect=False with reason AvailableUpdatesNotReady or SpecVersionNotAvailable and checks again after 1 minute. When the current version already matches the target, the cache is not checked.

Processing ClusterUpdateChannel

ClusterUpdateChannel stores the current cluster version and the available updates. The controller obtains the version list, writes it to status.availableUpdates, and keeps it in an internal cache. The ClusterInfo, schedule, and release update controllers use this data. The object has no finalizer; when it is deleted or missing, the matching cache entry is removed.

How the list is obtained depends on the cluster registry:

  • if the cluster uses the same registry as the management cluster, cluster-manager requests the update matrix itself. Leftover CronJob and ConfigMap cluster-available-updates objects in the client cluster are deleted;
  • if the registries differ, the controller creates CronJob cluster-available-updates in the client cluster, with the image from AVAILABLE_UPDATES_IMAGE and the schedule from AVAILABLE_UPDATES_CRON. The job result is read from the ConfigMap of the same name in Namespace shturval-cluster-manager. A separate one-off Job is not created.

While currentVersion is empty, the controller checks again after 30 seconds. If the matrix request fails, it clears the status and the cache and also retries after 30 seconds.

With a separate registry, the channel is not ready when the ConfigMap is missing, its data is not ready yet, the data belongs to another currentVersion, or the data is older than the CronJob period. In each of these cases the status and the cache are cleared, and the check repeats after 30 seconds.

PhaseBehavior
CreateThe object is created while ClusterConfig is processed; the default channel is stable
UpdateThe controller copies currentVersion, then obtains the update matrix directly or from the client cluster ConfigMap
Successful checkStatus receives lastChecked, ready=true, and the list of available versions. The next check follows the CronJob schedule, and no later than 60 minutes
DeleteThis channel’s entry is removed from the internal cache
ReadinessThere is no separate Conditions list. The result is status.ready

If AVAILABLE_UPDATES_CRON is not set, the schedule 0 */1 * * * is used.

Processing ClusterUpdateSchedule

ClusterUpdateSchedule sets the schedule and the length of the update window. When the window opens, the controller selects the target version and writes spec.releaseVersion and spec.update.followSchedule on ClusterConfig, which starts the cluster update.

The schedule and ClusterConfig must be in the same Namespace, but their names may differ. The object is protected by the finalizer clusterupdateschedule.cluster.shturval.tech/finalizer. A periodic check runs at the SCHEDULE_SYNC_PERIOD interval, every 10 minutes by default.

PhaseSpec fieldsWhat appears in status
Createschedule, updatePeriod, pauseIfUpdatePeriodExceed, allowMinorVersionThe controller adds the finalizer and calculates the bounds of the next window
Window open, cluster readyThe controller selects a versionstatus.nextUpdateVersion receives the selected version, and ClusterConfig receives releaseVersion and followSchedule; TriggerUpdate becomes True
Window closed—nextUpdateStart and nextUpdateEnd receive the bounds of the next window
Delete while the reference is activeClusterConfig.spec.update.followSchedule contains the schedule nameDeletion is blocked and the finalizer stays

In an open window the controller first checks the cluster state. If the update was paused by this schedule (Ready=false and UpdatePaused=True), it resumes: the pause condition becomes False with reason ScheduleWindowOpen, and the phase changes to Updating. If the cluster is not ready for another reason, the controller waits until it is ready.

The target version is chosen from the update channel cache:

  • with allowMinorVersion=true, the highest available version by semantic versioning;
  • with allowMinorVersion=false, the highest version with the same major and minor as status.update.currentVersion.

If the cache is not ready yet, TriggerUpdate becomes False with reason AvailableUpdatesNotReady. If there is no suitable version, the nextUpdate* fields are cleared.

The schedule is a five-field cron expression. The object can be deleted only after ClusterConfig.spec.update.followSchedule no longer references it; the controller then removes the finalizer.

Processing InfrastructureProvider

InfrastructureProvider registers a Cluster API infrastructure provider object in the platform. The controller checks spec.providerRef, protects the referenced object from being deleted too early, and builds the list of clusters that use this provider.

InfrastructureProvider receives the finalizer infrastructureprovider.cluster.shturval.tech/finalizer, and the object from spec.providerRef receives infrastructureprovider.cluster.shturval.tech/native-finalizer. After adding its own finalizer, the controller checks again after 1 second.

PhaseBehavior
CreateThe controller adds the finalizer, finds the object from providerRef, protects it with a separate finalizer, and writes the UID to status.providerRefUID
UpdateThe controller checks the reference, the JSON in spec.config, the templates, and the list of linked clusters again. providerRef cannot be changed: the webhook rejects that change
DeleteIf there are no linked clusters, the controller removes the finalizer from the provider object, then from InfrastructureProvider
ConditionsTable in section 4

If the object from providerRef is not found or the reference is invalid, the controller sets ProviderRefReady=False and checks again after 30 seconds. If spec.config is set but is not a JSON object, ConfigValid=False is set; no automatic retry is scheduled in that case. When ProviderRefReady and ConfigValid are both True, the provider is ready: the controller fills the supported platform versions and the list of linked clusters.

Only one InfrastructureProvider can reference a given provider object. Uniqueness is the combination of apiVersion, kind, namespace, and name. Linked clusters are found by the provider reference on the InfraCluster object; for capov, OVirtMachine objects are used. An error while searching for OVirtMachine is written to the log and does not stop processing of the other data.

Deletion is blocked if clusters use the provider or if the search for them failed. In that case DeleteBlocked becomes True, and the check repeats after 30 seconds.

Allowed spec.type values: capbd, capos, capov, capsmv2, capvs, capcd, capyc. For capsmv2, spec.config may be omitted.

Deleting empty Namespaces

The garbage collection controller deletes a Namespace that no longer contains a Cluster API Cluster. This clears the Namespace automatically after the last cluster is deleted.

The controller handles only changes of existing Namespaces labeled cluster.shturval.tech/garbage-collect=true. Creating or deleting a Namespace does not start this check. If the Namespace still has at least one Cluster API Cluster, the controller checks again after 1 minute. When no such objects remain, the Namespace is deleted.

This operation does not use a finalizer.

Critical services

Services with the Critical flag (for example, the provider the management cluster was deployed with) are restarted by cluster-manager automatically on failure. Deleting the Pod manually to restart it is acceptable.


6. Operator parameters

Operator parameters are set in the chart values.yaml and in container environment variables. A running release is changed through SSP.

  • SSC objects are created and updated by the platform during updates; do not edit SSC manually — changes may be overwritten.
  • For customization, use ShturvalServicePatch (SSP), which overlays SSC.
ParameterDefaultWhere it goes
Manager imager.shturval.tech/shturval/cluster-manager, the tag is the chart appVersionDeployment /cluster-manager
clusterManager.availableUpdates.imager.shturval.tech/shturval/available-updates and the same tagAVAILABLE_UPDATES_IMAGE. If the value is empty, the process does not start
clusterManager.availableUpdatesCronSchedule0 */1 * * *AVAILABLE_UPDATES_CRON. An empty variable is replaced with the same expression
scheduleSyncPeriod10mSCHEDULE_SYNC_PERIOD. An empty value is replaced with 10m
AVAILABLE_UPDATES_IMAGE_PULL_SECRETnot setName of the pull secret for the catalog image. If set, POD_NAMESPACE is required
POD_NAMESPACEPod NamespaceNamespace of the pull secret
KUBERNETES_CLUSTER_DOMAINset by the chartDeployment environment variable
Webhook port9443Webhook Service
Metrics address in the chart0.0.0.0:8443--metrics-bind-address. Metrics HTTPS is on
ENABLE_WEBHOOKSnot falseThe value false disables registration of the ClusterConfig, ClusterProfile, and InfrastructureProvider webhooks

The chart has a global values file. The install description does not list the specific keys of that file: the values that landed in the release are the ones in effect.

Process flags that the chart does not expose as a separate values key by default, but that change observable behavior when they are set on the container:

FlagDefaultEffect
--max-concurrent-updates5How many clusters can be in Updating or Paused
--enable-http2falseHTTP/2 is off
--health-probe-bind-address:8081Probes
--metrics-securetrueMetrics over HTTPS
--acme-verify-timeout1mTLS verification timeout for ACME on the certificate step
-zap-log-levelzap leveldebug or info

7. CRD/API reference

All six CRDs belong to group cluster.shturval.tech, version v1beta1, and are Namespaced. The short name ip is set only for InfrastructureProvider.

The schema of ShturvalServiceConfig and ShturvalServicePatch, including modes auto, manual, and absent, is described on the Service management module (shturval-services) page.

ClusterConfig

Short name is not set. The plural resource name is clusterconfigs.

spec

The main fields are below. Nested service, NTP, registry, and Vault fields belong to systemServicesConfig, systemRegistryConfig, and ntpConfig.

FieldTypeRequiredDescription
clusterNamestringYesTarget cluster name
clusterProfileNamestringNoProfile. An empty value leads to the default profile
clusterTypeenum platform, clientNoDefault client
secureboolNoSecure mode
deployKeepAlivedboolNoEnables a virtual IP address for the Kubernetes API. In the manifest the field is named deployKeepAlived
systemServicesConfigobjectYesServices, ingress, CSI, CCM, monitoring, logging
releaseVersionstringNoShturval release version
systemRegistrystringNoRegistry, the previous way to set it
systemRegistryConfigobjectNoRegistry, the structured way to set it
licensestringYesLicense token
ntpConfigobjectNoNTP and time zone
deletePersistentVolumesboolNoDelete PVs before the cluster is deleted. When false, the Cluster API Cluster receives the annotation cluster.shturval.tech/preserve-persistent-volumes
update.updateStrategyenum InPlace, RollingUpdateNoDefault InPlace
update.followSchedulestring, pointerNoName of the ClusterUpdateSchedule that started the update. Empty means a manual start
systemServicesConfig.ingress.controllerTypeenum nginx, gatewayNoDefault nginx. The webhook reads an empty value as nginx. A change from gateway back to nginx is rejected
systemServicesConfig.ingress.vaultConfigobjectNoVault PKI for ingress

CSI and CCM secrets are set through providerSecretRef. Key layout is in section 3.

status

FieldTypeDescription
conditionsCondition listInstall-step conditions. Table in section 4
extraManifestsStatusobjectCopy of profile manifests for installation after SSC
controlplaneEndpointstringAPI address
controlplaneEndpointIPstringIP address calculated from the API address
kubeVersionstringKubernetes version
oidcClientsHashmapOIDC client hashes
systemServicesConfigStatusobjectMirror of monitoring, logging, and ingress URLs, ingress controller type, and migration phases
updateobjectready, currentVersion, phase (Complete, Queued, Updating, Paused), pipeline conditions

status.update.conditions are in section 4.

Finalizer: clusterconfig.cluster.shturval.tech/finalizer.

ClusterProfile

Short name is not set. The plural resource name is clusterprofiles.

spec

FieldDescription
kubeadmControlPlaneConfigurationkubeadm Control Plane settings
kubeletConfigurationKubelet
clusterAPIConfigurationMachineDeployment timeouts
repositoryImages, the previous way to set them
repositoryConfigImages, the structured way to set them
licensePlatform license
ntpServersNTP servers
time_zoneTime zone
monitoringEndpointExternal monitoring address
loggingEndpointExternal address of the logging system
customManifestsPhases and selectors of secrets that hold manifest templates

status

FieldDescription
extraManifestsStatus.manifestsStatusPer phase: platform and client secret statuses
extraManifestsStatus.readyOverall readiness. Secret values: valid or incorrect

The finalizer clusterprofile.cluster.shturval.tech/finalizer is defined on the type. Handling does not add it and only removes it on deletion.

ClusterInfo

Short name is not set. The plural resource name is clusterinfoes.

spec

FieldRequiredDescription
clusterNameYesCluster name

status

FieldDescription
baseInfoAPI address, cluster type, network, pause, provider
clusterCluster API phase, Control Plane and worker summary
workersGroupsWorker node groups
machineGroupsMachine groups
systemServicesSSC services and ingress statuses
clusterDeploymentStages: resources, infrastructure, Control Plane, nodes, services, ready
updatereleaseVersion, availableUpdates, availableStrategies, updater, NCI, kube, and service stages, nested ready
podsPod summary
licenseWorker CPU summary
readyOverall readiness, StatusTrue or StatusFalse

There are no Conditions at the root. Select by .status.baseInfo.clusterType.

Finalizer: cluster.shturval.tech/clusterinfo.

ClusterUpdateChannel

Short name is not set. The resource name matches the ClusterConfig name.

spec

FieldTypeRequiredDescription
channelstringNoMatrix channel. Default stable

status

FieldTypeDescription
readyboolThe matrix was read successfully
currentVersionstringCopy of ClusterConfig.status.update.currentVersion
lastCheckedtimeTime of the last check
availableUpdateslist of stringsAvailable releases

There is no finalizer.

ClusterUpdateSchedule

Short name is not set.

spec

FieldTypeRequiredDescription
schedulestringYesFive-field cron
updatePerioddurationYesWindow length after the cron start
pauseIfUpdatePeriodExceedboolYesPause the update outside the window
allowMinorVersionboolYestrue — highest semver from the cache. false — highest version in the same minor as the current version

status

FieldTypeDescription
nextUpdateStarttimeStart of the current or next window
nextUpdateEndtimeEnd of the window
nextUpdateVersionstringVersion the schedule wrote to ClusterConfig
conditionsCondition listTriggerUpdate

Finalizer: clusterupdateschedule.cluster.shturval.tech/finalizer.

InfrastructureProvider

Short name ip. The plural resource name is infrastructureproviders.

spec

FieldTypeRequiredDescription
typestringYescapbd, capos, capov, capsmv2, capvs, capcd, capyc
subtypestringNoInformational field, for example, zvirt or vkcloud
allowEditCSIboolNoPermission to change CSI
ipAddressPoolNamestringNoIP pool name
templates[]objectNokubeVersion, template, templateNetInterface — VM templates by Kubernetes version
providerRefObjectReferenceYesCluster API provider object. The field is unique and cannot be changed after the resource is created
configJSON without a strict schemaNoType parameters. May be absent for capsmv2

status

FieldTypeDescription
observedGenerationint64Generation the controller has seen
readyboolBoth ProviderRefReady and ConfigValid are True
conditionsCondition listTable in section 4
providerRefUIDUIDUID of the providerRef object
linkedClusterslist of referencesClusters that reference the provider
supportedPlatformVersionslist of stringsPlatform versions from templates[].kubeVersion

InfrastructureProvider itself has the finalizer infrastructureprovider.cluster.shturval.tech/finalizer. The provider object from providerRef gets a separate finalizer, infrastructureprovider.cluster.shturval.tech/native-finalizer: while an InfrastructureProvider references that object, the provider object cannot be deleted.

On create and update, the webhook checks that providerRef is unique. After the resource is created, this field cannot be changed.


8. Customization via SSP

General instructions for creating and applying SSP — How to manage CustomValues of services. Below are an example of extending cluster-manager permissions and the limits on service configuration.

What SSP is

ShturvalServicePatch is a Kubernetes object the administrator uses to override system service parameters on top of the platform SSC.

Main SSP fields:

FieldDescription
spec.shturvalServiceConfigNameTarget SSC name (which SSC the SSP applies to)
spec.customvaluesOverridden values; the structure matches the chart values.yaml

Extending cluster-manager permissions

When deploying a cluster, cluster-manager applies manifests from ClusterProfile in the management cluster. If the profile specifies resources, for example, users of API group auth.shturval.tech or pods, the default permissions may be insufficient. In that case the Secret check for manifests fails, and the cluster profile gets status False (in the interface, Not Ready).

Creating profiles and diagnosing permission errors are described on How to create and apply cluster profiles (ClusterProfile).

The default cluster-manager permissions are set in ClusterRole — shturval-cluster-manager-role.

To add permissions, create a separate ClusterRole and aggregate its rules into shturval-cluster-manager-role in one of these ways:

  • add the label rbac.shturval.tech/shturval-cluster-manager-aggregated-role: "true";
  • add a custom label to the ClusterRole and specify it in spec.customvalues.roleAggregateLabels for shturval-cluster-manager.

Example ShturvalServicePatch:

apiVersion: ops.shturval.tech/v1beta2
kind: ShturvalServicePatch
metadata:
  name: cluster-manager-custom
spec:
  shturvalServiceConfigName: shturval-cluster-manager
  customvalues:
    roleAggregateLabels:
      custom/auth-user-role: "true"

The detailed procedure for adding permissions for cluster profiles is in If there are not enough rights to platform manifests.

What not to do through SSP

  • Do not change the mode field of CAPI providers through SSP without agreement with the platform.
  • Do not set nodeSelector or affinity that conflicts with the management cluster placement policy.
  • Do not change the namespace through SSP — it is set in the SSC and is part of the service identity.

The spec.customvalues field in an SSP overlays spec.customvalues in the SSC and does not replace it completely. Use only the keys that need to be overridden.

Chart and parameter mapping

spec.customvalues (in SSC and SSP) matches values.yaml of the specific chart:

  • CAPSM: the values.yaml structure is described in shturval-capsm §6.
  • Other services: the values structure is described in the documentation of the corresponding chart.