villebro opened a new pull request, #58:
URL: https://github.com/apache/superset-kubernetes-operator/pull/58

   ## Summary
   
   Polish pass on the recent refactor (PRs #55–#57). Fixes two user-blocking 
bugs surfaced after the CRD collapse and Job-based lifecycle pipeline:
   
   - Helm-installed operators couldn't run lifecycle tasks because the chart's 
`managerRules` was missing `batch/jobs` — the kustomize RBAC had drifted from 
the Helm template.
   - The minimal `Superset` CR in `docs/getting-started.md` failed CRD 
validation because `spec.image` was omitted (it's required).
   
   Also closes a Supervised-upgrade gating bug where `LastLifecycleImage` never 
advanced when no task would actually run (lifecycle disabled, or every task 
disabled), so users got stuck in `AwaitingApproval` indefinitely after bumping 
the image tag. Related: the upgrade approval annotation was being cleared 
*before* status was persisted in `finalizeLifecycle`, so a status patch failure 
would re-gate the next reconcile.
   
   The rest of the change set is targeted polish: stale doc references 
(lifecycle tasks now run as Jobs, not bare Pods), an unused-`Idle`-phase 
removal, a typo fix (`Supervsied` → `Supervised`), explicit operator 
precedence, and a few `omitempty` API-status cleanups.
   
   ## Details
   
   **Behavior fixes**
   - `internal/controller/lifecycle.go`: extracted `settleLifecycle` helper 
used by all three completion paths (lifecycle-disabled, no-tasks, post-task 
finalize). Each path now advances `Status.LastLifecycleImage`. New user-facing 
message `"No lifecycle tasks configured"` for the no-tasks path.
   - `internal/controller/lifecycle.go` + `superset_controller.go`: moved 
upgrade approval annotation clearing into a separate helper called from the 
parent reconciler *after* the post-lifecycle status patch. Eliminates the race 
where a status-patch failure would strand the cleared annotation.
   - `internal/controller/schedule.go`: `validateSchedules` only sets 
`ScheduleValid=True` when at least one schedule is actually configured; removes 
the stale condition when the schedule is unset.
   
   **Helm**
   - `charts/superset-operator/templates/_helpers.tpl`: added `batch/jobs` rule 
and aligned `pods` verbs with the kustomize source of truth.
   
   **API**
   - `api/v1alpha1/superset_types.go`: `omitempty` + `// +optional` on 
`ComponentRefStatus.Ready` and `.Ref`; corrected misleading comments on 
`MaintenancePageSpec.PodTemplate` ("nested within deployment template" — it 
isn't) and `CeleryBeatComponentSpec` (the spec exposes no replicas field).
   - Regenerated CRD YAML and `docs/reference/api-reference.md`.
   
   **Docs**
   - `docs/getting-started.md`: added required `spec.image`.
   - `docs/user-guide/lifecycle.md`: fixed maintenance custom-image example 
(`podTemplate` is a sibling of `deploymentTemplate`, not nested); Pod→Job 
terminology audit.
   - `docs/user-guide/configuration.md`: per-component `sqlaEngineOptions` 
override location is `lifecycle`, not `init`.
   - `docs/architecture/internals.md`: task workload type `bare Pod` → `Job`; 
added missing Clone and Rotate rows.
   
   **Tests**
   - `internal/controller/lifecycle_settle_test.go`: 5 tests covering the 
gating fix and annotation race.
   - `internal/controller/schedule_test.go`: 3 tests covering `ScheduleValid` 
condition behavior.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to