Skip to content

Comments

Introduce configurable interface for probe management#673

Open
fmount wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
fmount:probes
Open

Introduce configurable interface for probe management#673
fmount wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
fmount:probes

Conversation

@fmount
Copy link
Contributor

@fmount fmount commented Feb 18, 2026

This patch introduces the ProbeOverrides interface that enables service operators to properly configure and tune liveness, readiness and startup probes for their deployments.
This implementation provides:

  • A ProbeConf struct for standardized probe configuration (path, delays, timeouts, periods and failure thresholds)
  • A ProbeOverrides interface that allows service operators to extend their API specs and provide a common set of overrides
  • A CreateProbeSet function that can be called from the service operators as the main entrypoint to generate a set of probes that should be applied to a Pod. With this function operators can either provide a set of overrides or rely on the defaults defined in the service operator.
  • A ValidateProbes function to validate (mostly on Updates), at webhooks level, the values provided as user input.

The functions and the interface provided by this patch reduce the amount of duplicated code that should be implemented in the service operators.

Jira: https://issues.redhat.com/browse/OSPRH-26731

This patch introduces the ProbeOverrides interface that enables service
operators to properly configure and tune liveness, readiness and startup
probes for their deployments.
This implementation provides:
- A ProbeConf struct for standardized probe configuration (path, delays,
timeouts, periods and failure thresholds)
- A ProvbeOverrides interface that allows service operators to extend
  their API specs and provide a common set of overrides
- A CreateProbeSet function that can be called from the service
  operators as the main entrypoint to generate a set of probes that
  should be applied to a Pod.
  With this function operators can either provide a set of overrides
  or rely on the defaults defined in the service operator.
- A ValidateProbes function to validate (mostly on Updates), at webhooks
  level, the values provided as user input

The functions and the interface provided by this patch reduce the amount
of duplicated code that should be implemented in the service operators.

Jira: OSPRH-26731

Signed-off-by: Francesco Pantano <fpantano@redhat.com>
}

// SetProbes - configures and returns liveness and readiness probes based on the provided settings
func SetProbes(port int, disableNonTLSListeners bool, config ProbeConfig) (*v1.Probe, *v1.Probe, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not used in the current operators, so good to do this change without deprecate them first

@stuggi
Copy link
Contributor

stuggi commented Feb 23, 2026

looks good to me, thanks @fmount ! @abays @dprince please have a look, too.

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