-
Notifications
You must be signed in to change notification settings - Fork 48
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
K0sControlPlane admission webhook #807
base: main
Are you sure you want to change the base?
Conversation
2195d6b
to
db4c512
Compare
2295e3f
to
3e28593
Compare
Signed-off-by: Alexey Makhov <[email protected]>
01a1cfa
to
d11ab59
Compare
Signed-off-by: Alexey Makhov <[email protected]>
d11ab59
to
325d339
Compare
if kcp.Spec.UpdateStrategy == v1beta1.UpdateRecreate { | ||
|
||
// If the cluster is running in single mode, we can't use the Recreate strategy | ||
if kcp.Spec.K0sConfigSpec.Args != nil { | ||
for _, arg := range kcp.Spec.K0sConfigSpec.Args { | ||
if arg == "--single" { | ||
return fmt.Errorf("UpdateStrategy Recreate strategy is not allowed when the cluster is running in single mode") | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove this block from machine scale reconciliation?
I am trying to test the webhook by deploying the development version but it doesn't seem to run, even though I force an error with |
A simple admission webhook that declines clusters in single mode and update strategy "Recreate"