turndown sets own deployment to 0
chap-dr opened this issue · 2 comments
Im running this on a cluster spun up by our current GKE terraform files, only deployment running on the cluster is teardown, the cluster currently has two node pools both with autoscaling enabled.
The very first thing turndown does, is turn its own deployment to 0, Im assuming this is why the turnup i have configured a 20 minutes after after turndown does not trigger. (poc schedule for seeing how turndown works)
This is the controller log:
cluster-turndown-5c77649bff-67tng cluster-turndown I0607 18:22:01.122236 1 validator.go:39] Validating Provider
cluster-turndown-5c77649bff-67tng cluster-turndown I0607 18:22:01.127017 1 namedlogger.go:24] [GKEClusterProvider] Loading node pools for: [ProjectID: xxxxxxxx, Zone: xxxxxxx, ClusterID: xxxxxxx]
cluster-turndown-5c77649bff-67tng cluster-turndown I0607 18:22:01.345562 1 reflector.go:122] Starting reflector *v1alpha1.TurndownSchedule (30s) from pkg/mod/k8s.io/client-go@v0.0.0-20190620085101-78d2af792bab/tools/cache/reflector.go:98
cluster-turndown-5c77649bff-67tng cluster-turndown I0607 18:22:01.345602 1 reflector.go:160] Listing and watching *v1alpha1.TurndownSchedule from pkg/mod/k8s.io/client-go@v0.0.0-20190620085101-78d2af792bab/tools/cache/reflector.go:98
cluster-turndown-5c77649bff-67tng cluster-turndown I0607 18:22:01.345705 1 schedulecontroller.go:109] Starting TurndownSchedule controller
cluster-turndown-5c77649bff-67tng cluster-turndown I0607 18:23:01.345558 1 turndownscheduler.go:404] -- Scale Down --
cluster-turndown-5c77649bff-67tng cluster-turndown I0607 18:23:01.356117 1 namedlogger.go:24] [TurndownScheduler] Already running on correct turndown host node. No need to setup environment.
cluster-turndown-5c77649bff-67tng cluster-turndown I0607 18:23:01.356152 1 namedlogger.go:24] [Turndown] Scaling Down Cluster Now
cluster-turndown-5c77649bff-67tng cluster-turndown I0607 18:23:01.364449 1 namedlogger.go:24] [GKEClusterProvider] Loading node pools for: [ProjectID: xxxxxxx, Zone: xxxxxx, ClusterID: xxxxxxx]
cluster-turndown-5c77649bff-67tng cluster-turndown I0607 18:23:01.398052 1 namedlogger.go:24] [Turndown] Found Cluster-AutoScaler. Flattening Cluster...
cluster-turndown-5c77649bff-67tng cluster-turndown I0607 18:23:01.398147 1 namedlogger.go:32] [Flattener] Starting to Flatten All Deployments...
cluster-turndown-5c77649bff-67tng cluster-turndown I0607 18:23:01.589561 1 namedlogger.go:32] [Flattener] Starting to Flatten All DaemonSets...
cluster-turndown-5c77649bff-67tng cluster-turndown I0607 18:23:02.010862 1 namedlogger.go:32] [Flattener] Starting to Suspend All Jobs...
cluster-turndown-5c77649bff-67tng cluster-turndown I0607 18:23:02.021614 1 namedlogger.go:24] [Turndown] Resizing all non-autoscaling node groups to 0...
Any input on why this is happening?
Hey @chap-dr! Thanks for the input. This behavior is definitely not expected (flattening it's own deployment). The flattener does have a blacklist, and for a while that blacklist included its own deployment. However, it does appear that bit of code no longer exists. I'm going to investigate a bit more, and will hopefully have a fix here soon. Thanks again for the report!