-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility with Windows #458
Comments
@kagoesy, Kured is written for linux (POSIX compliant) operating systems, because it uses /var/run/reboot-required file to trigger a reboot on a node. Since the filesystem of Windows is different - it will not work on such a node, unless you create a fake /var/run/reboot-required pointing to a C:...\Temp\reboot-required file. |
@jackfrancis Do you have some feedback for this question? |
I know @marosset has been experimenting with some ways to standardize a Windows interface that we can incorporate into kured. As @atighineanu points out, there's not a simple 1:1 translation of the POSIX standard that Linux distros use. |
Yes, I have been experimenting with Windows support in some my spare time. I did some exploratory work and here are some findings. My thoughts are that on Windows we could do something like this:
This approach would allow for detection of reboots from both Windows updates / servicing events (by checking reg keys) and generic workloads (by writing a sentinel file). I'm curious what everyone thinks here. |
Thanks @marosset! Based on the above I think we would benefit from two standards:
Do we know that a reboot gesture will always be equivalent to "the service stack took action"? I'm thinking, if we have a thing that continuously looks for these registry keys and then cretes the sentinel file once it exists, if a reboot doesn't have the result of clearing the registry key, we will enter into a "reboot loop". |
Unless there is an issue applying the updates across the reboot it is safe to assume that the registry keys will be cleared. |
Great, thanks. How should we go about standardizing the location a Windows sentinel file that is equivalent to |
After there is a PoC / agreement in kured on the overall design on how we want this to work for Windows we can bring this up at one of the SIG-Windows community meetings for feedback on specifics like file names? |
I have a PoC at #460 - please take a look! |
This issue was automatically considered stale due to lack of activity. Please update it and/or join our slack channels to promote it, before it automatically closes (in 7 days). |
with a volume mount to a configmap/secret with a ps1 file is enough for host-process on all windows versions. ie. apiVersion: apps/v1
kind: DaemonSet
metadata:
name: blabla
spec:
selector:
matchLabels:
k8s-app: blabla
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
template:
metadata:
labels:
k8s-app: blabla
spec:
serviceAccountName: blabla
securityContext:
windowsOptions:
hostProcess: true
runAsUserName: "NT AUTHORITY\\system"
hostNetwork: true
volumes:
- name: myconfigmap
configMap:
name: myconfigmap
containers:
- name: kube-proxy
# Update VERSION to match your Windows server version.
image: mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image:v1.0.0@sha256:b4c9637e032f667c52d1eccfa31ad8c63f1b035e8639f3f48a510536bf34032b
command:
- powershell
- -c
- ./myfolder/run.ps1
volumeMounts:
- name: myconfigmap
mountPath: /myfolder/run.ps1
subPath: run.ps1
nodeSelector:
kubernetes.io/os: windows
---
apiVersion: v1
kind: ConfigMap
metadata:
name: myconfigmap
data:
run.ps1: |
Write-Host "running on host"
|
The equivalent seems to be if((Get-Item "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" -ErrorAction SilentlyContinue).Property -Or (Get-Item "HKLM:Software\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending" -ErrorAction SilentlyContinue).Property) {
write-output "reboot pending"
} There is a few more reg entries that deals with windows file system renames and domain etc, but I dont think they are relevant for kured. See https://github.com/dotnet/sdk/blob/0847ed4847516935861fe4b02b4794430a50b4d7/src/Cli/dotnet/Installer/Windows/WindowsUtils.cs#L56 (MIT licensed) |
May I know does Kured support Windows node? If so, any requirement for the Kubernetes version and Kured version?
The text was updated successfully, but these errors were encountered: