Closed mickeder closed 1 year ago
This LGTM. Should we make the scheduler assigned to the pod be configurable? If so, i'm happy to raise a follow on PR to do this.
default-scheduler
will be the default if it is not specified per the docs, so this LGTM
@mickeder : If you allow edits by maintainers on this PR by checking the appropriate checkbox, then I can sign-off on the changes and merge it as this project requires signed commits by all authors.
@mh013370 I've just replaced my commit with a signed one.
Thank you for the contribution!
Signed-off-by: Michal Keder michalkeder@cogniflare.io
What's in this PR?
I removed the hardcoded SchedulerName in pod definition, since when no scheduler name is supplied, the pod is automatically scheduled using
default-scheduler
.Why?
When trying to deploy a NifiCluster to a GKE Autopilot cluster or a GKE cluster with Autoscaling with optimize-utilization profile, scheduler is changed to
gke.io/optimize-utilization-scheduler
via a mutating webhook (https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-autoscaler#autoscaling_profiles). This leads to endless recreation of Nifi pods, because the patch result is never empty: https://github.com/konpyutaika/nifikop/blob/389bab8cce20fa57136e567333e07ae25947a71f/pkg/resources/nifi/nifi.go#L654 https://github.com/konpyutaika/nifikop/blob/389bab8cce20fa57136e567333e07ae25947a71f/pkg/resources/nifi/nifi.go#L682-L688 https://github.com/konpyutaika/nifikop/blob/389bab8cce20fa57136e567333e07ae25947a71f/pkg/resources/nifi/nifi.go#L730Additional context
To test I used a GKE Autopilot cluster with cert-manager, zookeeper and nifikop installed using below commands:
Then I applied the NifiCluster from [samples] https://github.com/konpyutaika/nifikop/blob/389bab8cce20fa57136e567333e07ae25947a71f/config/samples/simplenificluster.yaml) with StorageClass set to
standard-rwo
and additional requests and limits forephmeral-storage
(required by GKE Autopilot restrictions):Checklist
To Do