Controller cleanup#92
Merged
Merged
Conversation
Extract middleware state checking into checkMiddlewareState, which returns a sum type (middlewareUpToDate | middlewareOutdated) so that handleMiddlewareUpdate becomes a flat type-switch orchestrator. This eliminates the redundant Describe and GetMiddlewareVersion calls, and removes the now-unused isMiddlewareLatest method.
Move pipeline RBAC setup (setupPipelineRBAC, ensureDeployFunctionRole, ensureDeployFunctionRoleBinding) to function_rbac.go and deploy mechanics (deploy, persistRegistryAuthSecret) to function_deploy.go, so the main controller file focuses on reconciliation flow.
Move removeFuncAnnotations from the top-level Reconcile method into reconcile(), grouping it with the other reconciliation steps. This keeps Reconcile focused on status tracking and error handling while reconcile() owns the full business logic sequence.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.