CFE-987: Use RouterExternalCertificate feature gate for adding ROUTER_ENABLE_EXTERNAL_CERTIFICATE env var to the router pods#1017
Conversation
|
@arkadeepsen: This pull request references CFE-987 which is a valid jira issue. DetailsIn response to this:
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. |
|
/retest |
| } else { | ||
| env = append(env, | ||
| corev1.EnvVar{Name: "ROUTER_EXTERNAL_CERTIFICATE", Value: "false"}, | ||
| ) | ||
| } |
There was a problem hiding this comment.
I think it's better to only add the env variable, if routeExternalCertificateEnabled. If feature-gate is not enabled, then do nothing. At the router side we will check ROUTER_EXTERNAL_CERTIFICATE exists or not, and take actions accordingly.
In that case, we can skip the else statement
|
/assign @alebedev87 |
|
/retest |
alebedev87
left a comment
There was a problem hiding this comment.
A couple of remarks which can be easily addressed and I'm good to LGTM.
| // Add router external certificate environment variable. | ||
| if routeExternalCertificateEnabled { | ||
| env = append(env, | ||
| corev1.EnvVar{Name: "ROUTER_EXTERNAL_CERTIFICATE", Value: "true"}, |
There was a problem hiding this comment.
The naming in ROUTER_EXTERNAL_CERTIFICATE doesn't seem to reflect the meaning passed to the router. It looks like we try to pass the name or some sort of reference to an external certificate. While what we do is we try to enable the handling of the external certificate field.
| corev1.EnvVar{Name: "ROUTER_EXTERNAL_CERTIFICATE", Value: "true"}, | |
| corev1.EnvVar{Name: "ROUTER_EXTERNAL_CERTIFICATE_ENABLED", Value: "true"}, |
There was a problem hiding this comment.
This was mentioned in the EP here which I am following. I guess we'd need to change the EP as well if we make this change.
There was a problem hiding this comment.
Yeah, it's hard to focus on the right name in the future code during the EP review. I think it's fine to tweak it in the EP if we find a better name down the implementation line.
I looked at the other variables from the router deployment and found ROUTER_ENABLE_COMPRESSION or ROUTER_DISABLE_HTTP2. I think we should follow the same pattern:
| corev1.EnvVar{Name: "ROUTER_EXTERNAL_CERTIFICATE", Value: "true"}, | |
| corev1.EnvVar{Name: "ROUTER_ENABLE_EXTERNAL_CERTIFICATE", Value: "true"}, |
There was a problem hiding this comment.
Sure. @chiragkyal can you please take a note of this change in the EP? This would also need updating the Router implementation.
There was a problem hiding this comment.
Thanks for the heads-up. Noted in https://issues.redhat.com/browse/CFE-1038
…RNAL_CERTIFICATE env var to the router pod based on the feature gate.
fd22bec to
4b56133
Compare
|
/retest |
1 similar comment
|
/retest |
|
@arkadeepsen: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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/test-infra repository. I understand the commands that are listed here. |
|
@arkadeepsen : can you please update the title and the description of the PR according to the latest changes? |
|
/lgtm |
|
@arkadeepsen: This pull request references CFE-987 which is a valid jira issue. DetailsIn response to this:
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. |
Done |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alebedev87 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
[ART PR BUILD NOTIFIER] This PR has been included in build ose-cluster-ingress-operator-container-v4.16.0-202402271510.p0.ga96d79f.assembly.stream.el9 for distgit ose-cluster-ingress-operator. |
Use
RouterExternalCertificatefeature gate and addROUTER_ENABLE_EXTERNAL_CERTIFICATEenv var to the router pod based on the feature gate according to the EP openshift/enhancements#1307.