Skip to content

Add defaults maxconn - #233

Merged
xosk31 merged 1 commit into
six-group:mainfrom
kenichi-mashiyama:add-defaults-maxconn
Sep 21, 2026
Merged

xosk31 merged 1 commit into
six-group:mainfrom
kenichi-mashiyama:add-defaults-maxconn

Conversation

@kenichi-mashiyama

Copy link
Copy Markdown
Contributor

Summary

This PR adds support for configuring the maxconn parameter within the defaults section of HAProxy configurations.

Motivation

HAProxy allows setting a maximum number of concurrent connections per process using the maxconn parameter. While this is configurable at the frontend level, there are scenarios where operators need to define a global or default maxconn limit across all proxies that do not explicitly override it. By introducing the maxconn field to the DefaultsConfiguration struct, users can now specify a default maximum connection limit directly via the Instance CRD.

Changes

  • Added the Maxconn (*int64) field to the DefaultsConfiguration struct in apis/proxy/v1alpha1/instance_types.go.
  • Updated the Model() method in apis/proxy/v1alpha1/instance_types.go to map this new field to the native HAProxy model (defaults.Maxconn = d.Maxconn).
  • Added unit tests (TestDefaultsConfigurationModelWithMaxconn and TestDefaultsConfigurationAddToParserWithMaxconn) in apis/proxy/v1alpha1/instance_types_test.go to verify the correct mapping and generation of the maxconn configuration line.
  • Regenerated CRDs, DeepCopyInto methods, and API documentation to reflect the new maxconn field.

Checklist

  • Code changes implemented
  • Unit tests added/updated
  • Generated CRDs and API docs updated

@xosk31 xosk31 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for your contribution!

@xosk31
xosk31 merged commit 568a452 into six-group:main Sep 21, 2026
4 checks passed
@kenichi-mashiyama
kenichi-mashiyama deleted the add-defaults-maxconn branch September 21, 2026 12:36
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