-
Notifications
You must be signed in to change notification settings - Fork 1k
feat: Add switch for Route and Service for Principal #1925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e9747bd to
c797448
Compare
jgwest
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, some minor tweaks then good to go!
I'm assuming you already have, but if you haven't already, it would be good to run the updated E2E test on an OpenShift cluster to make sure it works as expected (since the E2E tests in argocd-operator repo use k3d which does not have Route installed).
|
|
||
| // ArgoCDAgentPrincipalServiceSpec defines the options for the Service backing the ArgoCD Agent Principal component. | ||
| type ArgoCDAgentPrincipalServiceSpec struct { | ||
| // Type is the ServiceType to use for the Service resource. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can add a comment indicating what the default is for this field. Something like 'if type is not specified, the default of 'ClusterIP' will be used'
api/v1alpha1/argocd_types.go
Outdated
|
|
||
| // ArgoCDAgentPrincipalRouteSpec defines the options for the Route backing the ArgoCD Agent Principal component. | ||
| type ArgoCDAgentPrincipalRouteSpec struct { | ||
| // Enabled will toggle the creation of the OpenShift Route. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can add a comment like, 'if enabled is not defined, the default is ...'
| // Env lets you specify environment for principal pods | ||
| Env []corev1.EnvVar `json:"env,omitempty"` | ||
|
|
||
| // Service defines the options for the Service backing the ArgoCD Agent component. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can add a comment like: 'if Service is not defined, a default of ClusterIP will be used'
| // Service defines the options for the Service backing the ArgoCD Agent component. | ||
| Service ArgoCDAgentPrincipalServiceSpec `json:"service,omitempty"` | ||
|
|
||
| // Route defines the options for the Route backing the ArgoCD Agent component. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can add a comment like 'If Route is not specified, a default of ... will be used'
|
|
||
| By("verifying Route for principal exists on OpenShift") | ||
| if shouldExpectRoute { | ||
| By("verifying Route for principal exists on OpenShift") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: IMHO can move this By inside the if fixture.RunningOnOpenShift {},so as not to confuse the case where it is NOT running on openshift
d458f26 to
62f651b
Compare
Thanks Jonathan, yes I tested all principal e2e tests in openshift. Addressed your review comments, PTAL. |
8142a99 to
e656b3b
Compare
Assisted by: Cursor Signed-off-by: Jayendra Parsai <[email protected]>
e656b3b to
2485cc0
Compare
jgwest
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @jparsai!
/kind enhancement
This PR adds a switch to enable/disable creation of principal route and option to provide expected type (ClusterIP/LoadBalancer) of principal service.
Fixes https://issues.redhat.com/browse/GITOPS-8072