Skip to content

NE-2216: parameterize haproxy version#1362

Open
jcmoraisjr wants to merge 1 commit intoopenshift:masterfrom
jcmoraisjr:NE-2216-param-haproxy-version
Open

NE-2216: parameterize haproxy version#1362
jcmoraisjr wants to merge 1 commit intoopenshift:masterfrom
jcmoraisjr:NE-2216-param-haproxy-version

Conversation

@jcmoraisjr
Copy link
Member

add two new annotations used to parameterize the haproxy version to be used in the router.

  • haproxy-version: defines the haproxy version to use. I must be one of the installed versions in the default router image. If missing, it defaults to the older installed version.

  • haproxy-image: URL of the haproxy image to use. If configured, ingress operator deploys haproxy as a sidecar and configures it instead of the embedded haproxy from the router image.

add two new annotations used to parameterize the haproxy version to be used in the router.

* haproxy-version: defines the haproxy version to use. I must be one of the installed versions in the default router image. If missing, it defaults to the older installed version.

* haproxy-image: URL of the haproxy image to use. If configured, ingress operator deploys haproxy as a sidecar and configures it instead of the embedded haproxy from the router image.
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 13, 2026

@jcmoraisjr: This pull request references NE-2216 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

add two new annotations used to parameterize the haproxy version to be used in the router.

  • haproxy-version: defines the haproxy version to use. I must be one of the installed versions in the default router image. If missing, it defaults to the older installed version.

  • haproxy-image: URL of the haproxy image to use. If configured, ingress operator deploys haproxy as a sidecar and configures it instead of the embedded haproxy from the router image.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 13, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 13, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign jcmoraisjr for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 13, 2026

@jcmoraisjr: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/unit 977decc link true /test unit
ci/prow/hypershift-e2e-aks 977decc link true /test hypershift-e2e-aks

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Copy link
Contributor

@Thealisyed Thealisyed left a comment

Choose a reason for hiding this comment

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

It might also be worth noting that we should consider adding some test coverage for the annotations (version, image...) maybe?
Wdyt??

Comment on lines 1572 to +1573
hashableDeployment.Spec.Template.Spec.Containers = containers
hashableDeployment.Spec.Template.Spec.Containers = deployment.Spec.Template.Spec.InitContainers
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this not cause the deployment hash values to be overriden?

Comment on lines +1218 to +1224
if haproxyVersion != "" {
env = append(env, corev1.EnvVar{
Name: "ROUTER_HAPROXY_VERSION",
Value: haproxyVersion,
})
}

Copy link
Contributor

Choose a reason for hiding this comment

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

What happens if an invalid version string is given. Is there a fallback or some validation?

Comment on lines +1278 to +1280
Command: []string{"haproxy"},
Args: []string{"-W", "-db", "-S", "/var/lib/haproxy/run/master.sock,mode,600", "-f", "/var/lib/haproxy/conf/haproxy.config"},
Lifecycle: &corev1.Lifecycle{
Copy link
Contributor

Choose a reason for hiding this comment

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

This works on the assumption that haproxy is in the $PATH right? If so what if it is not or has a different config path?

updated.Spec.Template.Spec.Containers = containers

// initContainers always override all fields
updated.Spec.Template.Spec.InitContainers = expected.Spec.Template.Spec.InitContainers
Copy link
Contributor

Choose a reason for hiding this comment

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

This value is assigned twice here?

@Thealisyed
Copy link
Contributor

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants