Skip to content

Commit 3ce0115

Browse files
committed
Update ArgoCD Operator API to latest version
- Update CRDs with latest API definitions - Migrate Principal/Agent specs: move 5 fields to top level - Add LoadBalancer service and disable Route for Principal Signed-off-by: Mike Ng <[email protected]>
1 parent 51ca4f3 commit 3ce0115

File tree

10 files changed

+1296
-1145
lines changed

10 files changed

+1296
-1145
lines changed

charts/argocd-agent-addon/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ appVersion: 0.1.0
33
description: Argo CD Agent Addon for Open Cluster Management
44
name: argocd-agent-addon
55
type: application
6-
version: 0.23.0
6+
version: 0.24.0

charts/argocd-agent-addon/crds/argocd-operator-crds.yaml

Lines changed: 635 additions & 564 deletions
Large diffs are not rendered by default.

charts/argocd-agent-addon/templates/argocd-operator/argocd.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@ spec:
1111
argoCDAgent:
1212
principal:
1313
enabled: true
14+
auth: "mtls:CN=system:open-cluster-management:cluster:([^:]+):addon:argocd-agent-addon:agent:argocd-agent-addon-agent"
15+
image: {{ .Values.argoCDAgentImage }}:{{ .Values.argoCDAgentTag }}
1416
server:
15-
auth: "mtls:CN=system:open-cluster-management:cluster:([^:]+):addon:argocd-agent-addon:agent:argocd-agent-addon-agent"
16-
image: {{ .Values.argoCDAgentImage }}:{{ .Values.argoCDAgentTag }}
17+
enableWebSocket: false
18+
keepAliveMinInterval: "30s"
19+
service:
20+
type: LoadBalancer
21+
route:
22+
enabled: false
1723
namespace:
1824
allowedNamespaces:
1925
- "*"

charts/argocd-agent-addon/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ addonTag: latest
99

1010
# ArgoCD operator image
1111
argoCDOperatorImage: quay.io/mikeshng/argocd-operator
12-
argoCDOperatorTag: latest
12+
argoCDOperatorTag: latest-api
1313

1414
# ArgoCD agent image
1515
argoCDAgentImage: ghcr.io/argoproj-labs/argocd-agent/argocd-agent

examples/gitopscluster.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ spec:
1010
name: placement
1111
argoCDAgentAddon:
1212
mode: managed
13-
operatorImage: quay.io/mikeshng/argocd-operator:latest
13+
operatorImage: quay.io/mikeshng/argocd-operator:latest-api
1414
agentImage: ghcr.io/argoproj-labs/argocd-agent/argocd-agent:latest

internal/addon/addon_install.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030

3131
// Default images (used when not specified)
3232
const (
33-
defaultOperatorImage = "quay.io/mikeshng/argocd-operator:latest"
33+
defaultOperatorImage = "quay.io/mikeshng/argocd-operator:latest-api"
3434
defaultAgentImage = "ghcr.io/argoproj-labs/argocd-agent/argocd-agent:latest"
3535
)
3636

@@ -170,10 +170,11 @@ func ParseImageReference(imageRef string) (string, string, error) {
170170
repository := imageRef[:lastColonIndex]
171171
tag := imageRef[lastColonIndex+1:]
172172

173-
// Check if this might be a port number instead of a tag
174-
// Port numbers are typically numeric and shorter
175-
if !strings.Contains(tag, "/") && len(tag) < 10 {
176-
// This looks like it could be a tag
173+
// Check if this is a tag (not a port number in the registry URL)
174+
// Tags don't contain slashes and are typically shorter than paths
175+
// Port numbers would be numeric-only
176+
if !strings.Contains(tag, "/") {
177+
// This looks like a tag
177178
return repository, tag, nil
178179
}
179180
}

internal/addon/charts/argocd-agent-addon/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ apiVersion: v2
22
name: argocd-agent-addon
33
description: Argo CD Agent Addon
44
type: application
5-
version: 0.23.0
6-
appVersion: "0.23.0"
5+
version: 0.24.0
6+
appVersion: "0.24.0"

internal/addon/charts/argocd-agent-addon/crds/argocd-operator-crds.yaml

Lines changed: 635 additions & 564 deletions
Large diffs are not rendered by default.

internal/addon/charts/argocd-agent-addon/templates/argocd.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@ spec:
99
argoCDAgent:
1010
agent:
1111
enabled: true
12+
creds: "mtls:open-cluster-management:cluster:([^:]+):addon:argocd-agent"
13+
logLevel: "info"
14+
logFormat: "text"
15+
image: {{ .Values.global.argoCDAgent.image }}:{{ .Values.global.argoCDAgent.tag }}
1216
client:
1317
principalServerAddress: {{ .Values.global.argoCDAgent.serverAddress }}
1418
principalServerPort: "{{ .Values.global.argoCDAgent.serverPort }}"
15-
logLevel: "info"
16-
logFormat: "text"
17-
image: {{ .Values.global.argoCDAgent.image }}:{{ .Values.global.argoCDAgent.tag }}
1819
mode: {{ .Values.global.argoCDAgent.mode }}
19-
creds: "mtls:open-cluster-management:cluster:([^:]+):addon:argocd-agent"
20+
enableWebSocket: false
21+
enableCompression: false
2022
keepAliveInterval: "50s"
2123
tls:
2224
secretName: "argocd-agent-open-cluster-management.io-argocd-agent-addon-client-cert"

internal/controller/addon_template_management.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func (r *GitOpsClusterReconciler) EnsureAddOnTemplate(ctx context.Context, gitOp
7777
// Get operator and agent images from GitOpsCluster spec or use defaults
7878
operatorImage := gitOpsCluster.Spec.ArgoCDAgentAddon.OperatorImage
7979
if operatorImage == "" {
80-
operatorImage = "quay.io/mikeshng/argocd-operator:latest"
80+
operatorImage = "quay.io/mikeshng/argocd-operator:latest-api"
8181
}
8282

8383
agentImage := gitOpsCluster.Spec.ArgoCDAgentAddon.AgentImage

0 commit comments

Comments
 (0)