Skip to content

Commit 21237af

Browse files
feat: implement support for customer-managed ArgoCD instances (#399)
1 parent 7bb08d4 commit 21237af

22 files changed

+1528
-119
lines changed

charts/gitops-runtime/Chart.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v2
2-
appVersion: 0.1.67
2+
appVersion: 0.1.69-0
33
description: A Helm chart for Codefresh gitops runtime
44
name: gitops-runtime
55
version: 0.0.0
@@ -16,6 +16,7 @@ annotations:
1616
dependencies:
1717
- name: argo-cd
1818
repository: https://codefresh-io.github.io/argo-helm
19+
condition: argo-cd.enabled
1920
version: 7.7.14-5-cap-2.13.3-2025.3.5-50344f005
2021
- name: argo-events
2122
repository: https://codefresh-io.github.io/argo-helm
@@ -38,7 +39,7 @@ dependencies:
3839
condition: tunnel-client.enabled
3940
- name: codefresh-gitops-operator
4041
repository: oci://quay.io/codefresh/charts
41-
version: 0.3.27
42+
version: 0.5.0
4243
alias: gitops-operator
4344
condition: gitops-operator.enabled
4445
- name: garage
@@ -48,5 +49,4 @@ dependencies:
4849
condition: garage-workflows-artifact-storage.enabled
4950
- name: cf-argocd-extras
5051
repository: oci://quay.io/codefresh/charts
51-
version: 0.1.0
52-
condition: cf-argocd-extras.enabled
52+
version: 0.3.12

charts/gitops-runtime/README.md

+112-27
Large diffs are not rendered by default.

charts/gitops-runtime/README.md.gotmpl

+66
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,72 @@ See [Use OCI-based registries](https://helm.sh/docs/topics/registries/)
1616
## Codefresh official documentation:
1717
Prior to running the installation please see the official documentation at: https://codefresh.io/docs/docs/installation/gitops/hybrid-gitops-helm-installation/
1818

19+
## Installation with External ArgoCD
20+
21+
If you want to use an existing ArgoCD installation, you can disable the built-in ArgoCD and configure the GitOps Runtime to use the external ArgoCD.
22+
See the `values.yaml` example below:
23+
24+
```yaml
25+
global:
26+
# -- Configuration for external ArgoCD
27+
# Should be used when `argo-cd.enabled` is set to false
28+
external-argo-cd:
29+
# -- ArgoCD server settings
30+
server:
31+
# -- Service name of the ArgoCD server
32+
svc: argocd
33+
# -- Port of the ArgoCD server
34+
port: 80
35+
# -- Image settings for the ArgoCD server
36+
image:
37+
repository: quay.io/argoproj/argocd
38+
tag: "v2.14.4"
39+
# -- Set if Argo CD is running behind reverse proxy under subpath different from /
40+
# e.g.
41+
# rootpath: '/argocd'
42+
rootpath: ''
43+
redis:
44+
# -- Service name of the ArgoCD Redis
45+
svc: argocd-redis
46+
# -- Port of the ArgoCD Redis
47+
port: 6379
48+
repoServer:
49+
# -- Service name of the ArgoCD repo server
50+
svc: argocd-repo-server
51+
# -- Port of the ArgoCD repo server
52+
port: 8081
53+
54+
# -- How GitOps Runtime should authenticate with ArgoCD
55+
auth:
56+
# -- Authentication type. Can be password or token
57+
type: password
58+
59+
# If `auth.type=password` is set
60+
# -- ArgoCD username in plain text
61+
username: "admin"
62+
# -- ArgoCD password in plain text
63+
password: ""
64+
# -- ArgoCD password referenced by an existing secret
65+
passwordSecretKeyRef:
66+
name: argocd-initial-admin-secret
67+
key: password
68+
69+
# If `auth.type=token` is set
70+
# -- ArgoCD token in plain text
71+
token: ""
72+
# -- ArgoCD token referenced by an existing secret
73+
tokenSecretKeyRef: {}
74+
# e.g:
75+
# tokenSecretKeyRef:
76+
# name: argocd-token
77+
# key: token
78+
79+
argo-cd:
80+
# -- Disable built-in ArgoCD
81+
enabled: false
82+
```
83+
84+
1985
## Using with private registries - Helper utility
2086
The GitOps Runtime comprises multiple subcharts and container images. Subcharts also vary in values structure, making it difficult to override image specific values to use private registries.
2187
We have created a helper utility to resolve this issue:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
GitOps Runtime {{ .Values.global.runtime.name }} has been successfully installed in your cluster!
2+
To complete the setup, please finalize the process in the platform here: https://g.codefresh.io/2.0/account-settings/runtimes/{{ .Values.global.runtime.name }}/runtime-components

charts/gitops-runtime/templates/_components/cap-app-proxy/_config.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ cors: {{ .Values.global.codefresh.url }}
88
clusterChunkSize: {{ . | quote }}
99
{{- end }}
1010
env: {{ .Values.config.env | quote}}
11-
isConfigurationRuntime: {{ .Values.global.runtime.isConfigurationRuntime | quote }}
11+
isConfigurationRuntime: {{ .Values.global.runtime.isConfigurationRuntime | quote }}
12+
isExternalArgoCD: {{ .Values.global.runtime.isExternalArgoCD | quote }}
1213
runtimeName: {{ required "global.runtime.name is required" .Values.global.runtime.name | quote}}
1314
skipGitPermissionValidation: {{ .Values.config.skipGitPermissionValidation | quote }}
1415
logLevel: {{ .Values.config.logLevel | quote }}

charts/gitops-runtime/templates/_components/cap-app-proxy/environment-variables/_main-container.yaml

+9-11
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,9 @@ ARGO_CD_URL:
55
name: cap-app-proxy-cm
66
key: argoCdUrl
77
optional: true
8-
ARGO_CD_USERNAME:
9-
valueFrom:
10-
configMapKeyRef:
11-
name: cap-app-proxy-cm
12-
key: argoCdUsername
13-
optional: true
14-
ARGO_CD_PASSWORD:
15-
valueFrom:
16-
secretKeyRef:
17-
name: argocd-initial-admin-secret
18-
key: password
8+
ARGO_CD_TOKEN: {{ include "codefresh-gitops-runtime.argocd.server.token" . | nindent 2 }}
9+
ARGO_CD_USERNAME: {{ include "codefresh-gitops-runtime.argocd.server.username-env-var" . | nindent 2 }}
10+
ARGO_CD_PASSWORD: {{ include "codefresh-gitops-runtime.argocd.server.password" . | nindent 2 }}
1911
ARGO_WORKFLOWS_INSECURE:
2012
valueFrom:
2113
configMapKeyRef:
@@ -88,6 +80,12 @@ IS_CONFIGURATION_RUNTIME:
8880
configMapKeyRef:
8981
name: codefresh-cm
9082
key: isConfigurationRuntime
83+
IS_EXTERNAL_ARGOCD:
84+
valueFrom:
85+
configMapKeyRef:
86+
name: cap-app-proxy-cm
87+
key: isExternalArgoCD
88+
optional: true
9189
MANAGED: false
9290
NAMESPACE:
9391
valueFrom:

0 commit comments

Comments
 (0)