Repository navigation
feat(controller): add args, extra ports and pod annotations to the module controller - #236
Merged
Merged
Conversation
…dule controller Several storage controllers are still written by hand because helm_lib_module_controller_manifests has no place for three things they need, and so they miss the two-replica rule on masters and the in-process metrics authorization: - the state-snapshotter controller starts its aggregated API server with --api-addr and --api-tls-* arguments; - the storage-foundation and state-snapshotter controllers serve that API on a named "https" port that their Service and APIService target; - the storage-foundation controller rolls its pods when the aggregation API CA changes, through a checksum annotation on the pod template. Add controllerArgs (container args), additionalControllerPorts (rendered after the metrics port) and additionalPodAnnotations (merged with checksum/ca when webhooks are enabled). None is set by default, and modules that do not set them render as before. Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
krpsh123
approved these changes
Nov 15, 2026
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.
Description
helm_lib_module_controller_manifestsgets three options:controllerArgs: a list rendered asargsof thecontrollercontainer;additionalControllerPorts: a list of container ports rendered after the metrics port (metricsorhttps-metrics);additionalPodAnnotations: a map merged into the pod template annotations, next tochecksum/cawhen webhooks are enabled.None is set by default; a module that does not set them renders exactly as before. The chart version goes to 1.72.37.
No restarts by itself.
Why do we need it, and what problem does it solve?
Several storage controllers are still written by hand, so they miss what the helper now gives: two replicas on masters in HA mode (#234) and metrics authorized in the controller process instead of a kube-rbac-proxy sidecar (#235). For two of them only these options are missing:
controllerstarts its aggregated API server with--api-addrand--api-tls-*arguments (templates/controller/deployment.yaml:75-77) and serves it on a port namedhttps, which its Service targets by name (service.yaml:11);controllerserves its aggregated API on a port namedhttps(service.yaml:20) and rolls its pods when the aggregation API CA changes throughchecksum/aggregation-api-caon the pod template (deployment.yaml:72).With these options both can move to the helper without renaming the Deployment, its selector, ServiceAccount or Service ports.
What is the expected result?
controllerArgs, thecontrollercontainer gets thoseargs.additionalControllerPorts, the container lists them after the metrics port, or alone when there is no metrics port.additionalPodAnnotations, the pod template carries them; with webhooks enabledchecksum/castays.Checklist