Skip to content

feat(controller): add args, extra ports and pod annotations to the module controller - #236

Merged
duckhawk merged 1 commit into
mainfrom
feat/module-controller-args-annotations-ports
Nov 15, 2026
Merged

duckhawk merged 1 commit into
mainfrom
feat/module-controller-args-annotations-ports

Conversation

@duckhawk

Copy link
Copy Markdown
Member

Description

helm_lib_module_controller_manifests gets three options:

  • controllerArgs: a list rendered as args of the controller container;
  • additionalControllerPorts: a list of container ports rendered after the metrics port (metrics or https-metrics);
  • additionalPodAnnotations: a map merged into the pod template annotations, next to checksum/ca when 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:

  • state-snapshotter controller starts its aggregated API server with --api-addr and --api-tls-* arguments (templates/controller/deployment.yaml:75-77) and serves it on a port named https, which its Service targets by name (service.yaml:11);
  • storage-foundation controller serves its aggregated API on a port named https (service.yaml:20) and rolls its pods when the aggregation API CA changes through checksum/aggregation-api-ca on 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?

  • With controllerArgs, the controller container gets those args.
  • With additionalControllerPorts, the container lists them after the metrics port, or alone when there is no metrics port.
  • With additionalPodAnnotations, the pod template carries them; with webhooks enabled checksum/ca stays.
  • Without the options, the rendered manifests do not change.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

…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>
@duckhawk
duckhawk merged commit 9c383c1 into main Nov 15, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants