Skip to content

Conversation

@jparsai
Copy link
Collaborator

@jparsai jparsai commented Oct 30, 2025

/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

@jparsai jparsai force-pushed the agent-service branch 2 times, most recently from e9747bd to c797448 Compare October 30, 2025 07:28
Copy link
Member

@jgwest jgwest left a 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.
Copy link
Member

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'


// 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.
Copy link
Member

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.
Copy link
Member

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.
Copy link
Member

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")
Copy link
Member

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

@jparsai jparsai force-pushed the agent-service branch 2 times, most recently from d458f26 to 62f651b Compare October 30, 2025 15:09
@jparsai
Copy link
Collaborator Author

jparsai commented Oct 30, 2025

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).

Thanks Jonathan, yes I tested all principal e2e tests in openshift. Addressed your review comments, PTAL.

Assisted by: Cursor

Signed-off-by: Jayendra Parsai <[email protected]>
Copy link
Member

@jgwest jgwest left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @jparsai!

@jgwest jgwest merged commit 2447f50 into argoproj-labs:master Oct 31, 2025
7 checks passed
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