You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f4aef73
Browse filesBrowse the repository at this point in the historyBrowse files
fix(linstor-scheduler): re-vendor to upstream 0.3.1 with native admission webhook
Re-vendor the linstor-scheduler chart from upstream 0.3.1 (appVersion
v0.3.6), which carries the admission webhook binary that stopped
stripping unknown Pod fields — the image VolumeSource and native-sidecar
restartPolicy, which broke KubeVirt containerDisk VMs and native sidecars
cluster-wide — and now reloads its TLS certificate on rotation instead of
serving a stale one until restarted.
The admission webhook ships in the upstream chart, so the previous
downstream copy is dropped: `make update` pulls it directly and applies
only cozystack-scheduler-deployment.patch (pod component label and a
distro-suffix-stripped image tag), keeping the vendoring deterministic.
Because the webhook now reloads its own certificate, the external
cert-reload workaround is dropped.
The upstream admission Deployment keeps the same name but changes its
immutable pod selector, so an in-place upgrade of an existing install
would fail. A migration deletes the old admission Deployment before the
upgrade so the new one is recreated cleanly, and bumps the migration
target version.
Add a helm-unittest suite covering the admission resources, PDB selector
isolation, least-privilege RBAC, the scheduler image tag, and backward
compatibility.
Assisted-By: Claude <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>
Copy file name to clipboardExpand all lines: packages/system/linstor-scheduler/charts/linstor-scheduler/README.md
+26-1Lines changed: 26 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,4 +69,29 @@ The following options are available:
69
69
|`serviceAccount.create`| Create the service account resource |`true`|
70
70
|`serviceAccount.name`| Sets the name of the service account. If left empty, will use the release name as default |`""`|
71
71
|`podDisruptionBudget.enabled`| Enable creation of a pod disruption budget to protect the availability of the scheduler |`true`|
72
-
|`autoscaling.enabled`| Enable creation of a horizontal pod autoscaler to ensure availability in case of high usage` |`"false`|
72
+
|`autoscaling.enabled`| Enable creation of a horizontal pod autoscaler to ensure availability in case of high usage |`false`|
73
+
|`admission.enabled`| Deploy the admission webhook that auto-sets `schedulerName` on Pods using LINSTOR-backed PVCs. |`false`|
74
+
|`admission.replicaCount`| Number of webhook replicas to deploy. |`2`|
75
+
|`admission.driver`| CSI driver name treated as LINSTOR-backed. Pods whose PVCs resolve to it get the mutation. |`linstor.csi.linbit.com`|
76
+
|`admission.failurePolicy`| Webhook `failurePolicy`. `Ignore` keeps Pod creation working if the webhook is unavailable. |`Ignore`|
77
+
|`admission.timeoutSeconds`| Webhook call timeout. Kept under the Kubernetes default of 10s to limit Pod-creation latency. |`5`|
78
+
|`admission.namespaceSelector`| Namespace selector for the webhook. Empty selects all namespaces (including `kube-system`). |`{}`|
79
+
|`admission.resources`| Resources to request and limit on the webhook container. |`{}`|
80
+
|`admission.podSecurityContext`| Pod-level security context for the webhook pod. |`{runAsNonRoot: true, runAsUser: 1000, runAsGroup: 1000, fsGroup: 1000}`|
81
+
|`admission.securityContext`| Container-level security context for the webhook container. |`{allowPrivilegeEscalation: false, capabilities: {drop: [ALL]}, readOnlyRootFilesystem: true}`|
82
+
|`admission.createTLS`| How to provision the webhook TLS: `cert-manager`, `helm`, or `""` (bring your own). See note below. |`cert-manager`|
83
+
|`admission.tls.secretName`| Name of the TLS secret. Empty defaults to `<fullname>-admission-tls`. |`""`|
84
+
|`admission.tls.caBundle`| CA bundle (base64 PEM) injected into the webhook. Only used when `createTLS` is `""`. |`""`|
85
+
|`admission.tls.certManager.rotationPolicy`|`privateKey.rotationPolicy` of the cert-manager CA. `Never` keeps the CA key (and caBundle) stable. |`Never`|
86
+
|`admission.affinity`| Affinity for the webhook pods. Empty applies a soft anti-affinity spreading replicas across nodes. |`{}`|
87
+
|`admission.reloadOnCertChange`| Add Stakater Reloader annotations so the pods restart when the TLS secret changes (see note below). |`false`|
88
+
89
+
## Admission webhook (optional)
90
+
91
+
As noted above, the LINSTOR Scheduler itself is no longer maintained and `volumeBindingMode: WaitForFirstConsumer` is the preferred approach for new deployments. For clusters that still run this scheduler, the optional admission webhook (`admission.enabled`, disabled by default) removes the need to set `schedulerName` on every Pod: it watches Pod creation and, when a Pod uses a PersistentVolumeClaim backed by the LINSTOR CSI driver, sets `schedulerName` to this scheduler automatically. It changes nothing when disabled.
92
+
93
+
> **Note:**`admission.createTLS: helm` regenerates the CA and certificate on every `helm upgrade`; it suits one-shot installs, not GitOps or continuously-reconciled setups (Flux/Argo) where the certificate would churn on each reconcile. Use `cert-manager` or bring your own secret (`""`) there.
94
+
95
+
> **Note:** the default `failurePolicy: Ignore` fails open, so an unreachable webhook never blocks Pod creation (affected Pods just fall back to the default scheduler). Setting `failurePolicy: Fail` makes the webhook mandatory for every Pod `CREATE` in the selected namespaces; with `createTLS: cert-manager` this also requires the cert-manager CA injector to be running so the `caBundle` is populated, otherwise all matching Pod creation is blocked until injection completes. Because the empty default `namespaceSelector` also intercepts the webhook's own namespace and `kube-system`, running with `failurePolicy: Fail` can deadlock a restart of the webhook (its own new Pods cannot be admitted while all replicas are down) — exclude the release namespace and `kube-system` via `admission.namespaceSelector` if you switch to `Fail`.
96
+
97
+
> **Note:** the webhook binary loads its serving certificate once at startup and does not hot-reload it. When the certificate is renewed — cert-manager rotates the leaf roughly yearly, or you rotate an external secret — the running Pods keep serving the old certificate until they restart, after which the webhook silently stops mutating. Set `admission.reloadOnCertChange: true` (requires the Stakater Reloader controller) to roll the Deployment automatically when the secret changes, or restart the webhook Pods manually after each renewal. In `createTLS: helm` mode a `helm upgrade` regenerates the certificate and already rolls the Pods.
0 commit comments