Skip to content

Commit c81955b

Browse files
authored
chore: Improve using release branches for manifests (#561)
1 parent 8a68839 commit c81955b

File tree

3 files changed

+35
-29
lines changed

3 files changed

+35
-29
lines changed

docs/getting-started/kubernetes/index.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,19 @@ kubectl create namespace argocd --context <control-plane-context>
6262

6363
### 1.2 Install Argo CD on Control Plane
6464

65-
Install a customized Argo CD instance that excludes components that will run on workload clusters:
65+
Install a customized Argo CD instance that excludes components that will run on workload clusters replacing <release-branch> with the release you wish to use:
6666

6767
```bash
6868
# Apply the principal-specific Argo CD configuration
6969
kubectl apply -n argocd \
70-
-k 'https://github.com/argoproj-labs/argocd-agent/install/kubernetes/argo-cd/principal?ref=main' \
70+
-k 'https://github.com/argoproj-labs/argocd-agent/install/kubernetes/argo-cd/principal?ref=<release-branch>' \
7171
--context <control-plane-context>
7272
```
7373

7474
This configuration includes:
7575

7676
-**argocd-server** (API and UI)
77-
-**argocd-dex-server** (SSO, if needed)
77+
-**argocd-dex-server** (SSO, if needed)
7878
-**argocd-redis** (state storage)
7979
-**argocd-repo-server** (Git repository access)
8080
-**argocd-application-controller** (runs on workload clusters only)
@@ -160,9 +160,11 @@ argocd-agentctl jwt create-key \
160160

161161
### 3.1 Deploy Principal Component
162162

163+
Change <release-branch> to the release you wish to use:
164+
163165
```bash
164166
kubectl apply -n argocd \
165-
-k 'https://github.com/argoproj-labs/argocd-agent/install/kubernetes/principal?ref=main' \
167+
-k 'https://github.com/argoproj-labs/argocd-agent/install/kubernetes/principal?ref=<release-branch>' \
166168
--context <control-plane-context>
167169
```
168170

@@ -184,7 +186,7 @@ The principal's gRPC service needs to be accessible from workload clusters:
184186
kubectl patch svc argocd-agent-principal -n argocd --context <control-plane-context> \
185187
--patch '{"spec":{"type":"LoadBalancer"}}'
186188

187-
# Option 2: NodePort
189+
# Option 2: NodePort
188190
kubectl patch svc argocd-agent-principal -n argocd --context <control-plane-context> \
189191
--patch '{"spec":{"type":"NodePort","ports":[{"port":8443,"nodePort":30443}]}}'
190192
```
@@ -221,15 +223,17 @@ kubectl create namespace argocd --context <workload-cluster-context>
221223

222224
### 4.3 Install Argo CD on Workload Cluster
223225

226+
Replace <release-branch> with the release you wish to use:
227+
224228
```bash
225229
# For managed agents
226230
kubectl apply -n argocd \
227-
-k 'https://github.com/argoproj-labs/argocd-agent/install/kubernetes/argo-cd/agent-managed?ref=main' \
231+
-k 'https://github.com/argoproj-labs/argocd-agent/install/kubernetes/argo-cd/agent-managed?ref=<release-branch>' \
228232
--context <workload-cluster-context>
229233

230234
# For autonomous agents (alternative)
231235
# kubectl apply -n argocd \
232-
# -k 'https://github.com/argoproj-labs/argocd-agent/install/kubernetes/argo-cd/agent-autonomous?ref=main' \
236+
# -k 'https://github.com/argoproj-labs/argocd-agent/install/kubernetes/argo-cd/agent-autonomous?ref=<release-branch>' \
233237
# --context <workload-cluster-context>
234238
```
235239

@@ -291,9 +295,11 @@ kubectl get secret argocd-agent-ca -n argocd --context <workload-cluster-context
291295

292296
### 5.4 Deploy Agent
293297

298+
Replace <release-branch> with the version of the release you wish to use:
299+
294300
```bash
295301
kubectl apply -n argocd \
296-
-k 'https://github.com/argoproj-labs/argocd-agent/install/kubernetes/agent?ref=main' \
302+
-k 'https://github.com/argoproj-labs/argocd-agent/install/kubernetes/agent?ref=<release-branch>' \
297303
--context <workload-cluster-context>
298304
```
299305

@@ -324,7 +330,7 @@ kubectl logs -n argocd deployment/argocd-agent-agent --context <workload-cluster
324330

325331
# Expected output:
326332
# INFO[0001] Starting argocd-agent (agent) v0.1.0 (ns=argocd, mode=managed, auth=mtls)
327-
# INFO[0002] Authentication successful
333+
# INFO[0002] Authentication successful
328334
# INFO[0003] Connected to argocd-agent-principal v0.1.0
329335
```
330336

@@ -389,7 +395,7 @@ Access the Argo CD UI to see your agent and its applications!
389395

390396
### Security Hardening
391397
1. **Replace development certificates** with production-grade PKI
392-
2. **Configure proper RBAC** in Argo CD
398+
2. **Configure proper RBAC** in Argo CD
393399
3. **Set up network policies** to restrict traffic
394400
4. **Enable audit logging** for compliance
395401

docs/getting-started/openshift/index.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ spec:
6464
argoCDAgent:
6565
principal:
6666
enabled: true
67-
allowedNamespaces:
67+
allowedNamespaces:
6868
- "*"
6969
jwtAllowGenerate: true
7070
auth: "mtls:CN=([^,]+)"
7171
logLevel: "trace"
7272
image: "ghcr.io/argoproj-labs/argocd-agent/argocd-agent:latest"
7373
sourceNamespaces:
7474
- "agent-managed"
75-
- "agent-autonomous"
75+
- "agent-autonomous"
7676
```
7777

7878
The above CR should create all the necessary resource for Argo CD as well as argocd-agent principal in argocd namespace.
@@ -83,10 +83,10 @@ Create argocd-redis secret, because principal looks for it to fetch redis authen
8383
oc create secret generic argocd-redis -n argocd --from-literal=auth="$(oc get secret argocd-redis-initial-password -n argocd -o jsonpath='{.data.admin\.password}' | base64 -d)"
8484
```
8585

86-
## Setting up agent workload cluster
86+
## Setting up agent workload cluster
87+
88+
### Configure Argo CD for Agent
8789

88-
### Configure Argo CD for Agent
89-
9090
Argo CD instance on Agent cluster
9191

9292
Creating Argo CD instance for Workload/spoke cluster.
@@ -100,14 +100,14 @@ Creating Argo CD instance for Workload/spoke cluster.
100100
enabled: false
101101
```
102102

103-
Create redis secret using below command for agent deployment
103+
Create redis secret using below command for agent deployment
104104
```
105105
kubectl create secret generic argocd-redis -n <workload namespace> --from-literal=auth="$(kubectl get secret argocd-redis-initial-password -n <argocd-namespace> -o jsonpath='{.data.admin\.password}' | base64 -d)"
106106
```
107107

108108
### Configure Agent in managed mode
109109

110-
Before installing agent resources create
110+
Before installing agent resources create
111111
- a TLS secret containing the issued certificate for agent
112112

113113
Create the PKI on the agent:
@@ -116,9 +116,9 @@ Run this command while connected to principal
116116
argocd-agentctl pki issue agent <agent-name> --principal-context <principal context> --agent-context <workload context> --agent-namespace <workload namespace> --upsert
117117
```
118118

119-
Apply the installation manifests for Argo CD-agent agent
119+
Apply the installation manifests for Argo CD-agent agent, change <release-branch> to the release you want to deploy:
120120
```
121-
oc apply -n $(workload-namespace) -k 'https://github.com/argoproj-labs/argocd-agent/install/kubernetes/agent?ref=main'
121+
oc apply -n $(workload-namespace) -k 'https://github.com/argoproj-labs/argocd-agent/install/kubernetes/agent?ref=<release-branch>'
122122
```
123123
This should create all the required agent related resources.
124124

@@ -129,7 +129,7 @@ kubectl patch clusterrolebinding argocd-agent-agent --type='json' -p='[{"op": "r
129129
```
130130

131131

132-
Update the configMap with name `argocd-agent-params` with parameters related to agent.mode,agent.creds, agent.namespace, agent.server.address.
132+
Update the configMap with name `argocd-agent-params` with parameters related to agent.mode,agent.creds, agent.namespace, agent.server.address.
133133
```
134134
agent.keep-alive-ping-interval: 50s
135135
agent.mode: managed
@@ -147,13 +147,13 @@ Update the configMap with name `argocd-agent-params` with parameters related to
147147
agent.tls.root-ca-secret-name: argocd-agent-ca
148148
agent.tls.secret-name: argocd-agent-client-tls
149149
```
150-
Also Update RBAC, rolebinding/clusterrolebinding with `workload-namespace`, if pod is facing rbac issues.
150+
Also Update RBAC, rolebinding/clusterrolebinding with `workload-namespace`, if pod is facing rbac issues.
151151

152152

153153

154154
### Configure Agent in Autonomous mode
155155

156-
Before installing agent resources create
156+
Before installing agent resources create
157157
Create a TLS secret containing the issued certificate for agent
158158

159159
Create the PKI on the agent:
@@ -162,9 +162,9 @@ Run this command while connected to principal
162162
argocd-agentctl pki issue agent <agent-name> --principal-context <principal context> --agent-context <workload context> --agent-namespace argocd --upsert
163163
```
164164

165-
Apply the installation manifests for argocd agent
165+
Apply the installation manifests for argocd agent replacing <release-branch> with the release that you wish to use:
166166
```
167-
oc apply -n argocd -k 'https://github.com/argoproj-labs/argocd-agent/install/kubernetes/agent?ref=main'
167+
oc apply -n argocd -k 'https://github.com/argoproj-labs/argocd-agent/install/kubernetes/agent?ref=<release-branch>'
168168
```
169169
This should create all the required agent related resources.
170170

@@ -179,7 +179,7 @@ Update the configMap with name `argocd-agent-params` with parameters related to
179179
```
180180
data:
181181
agent.keep-alive-ping-interval: 50s
182-
agent.tls.client.insecure: 'false'
182+
agent.tls.client.insecure: 'false'
183183
agent.server.port: '443'
184184
agent.tls.root-ca-path: ''
185185
agent.tls.client.cert-path: ''
@@ -196,7 +196,7 @@ data:
196196
```
197197

198198

199-
#### Troubleshooting
199+
#### Troubleshooting
200200
___
201201

202202
1. If pod fails to come up with error
@@ -217,4 +217,4 @@ kubectl patch clusterrolebinding argocd-agent-agent --type='json' -p='[{"op": "r
217217
```
218218
Unable to create application: app is not allowed in project "default", or the project does not exist
219219
```
220-
refer to doc for [AppProject Synchronization](https://argocd-agent.readthedocs.io/latest/user-guide/appprojects/#managed-agent-mode).
220+
refer to doc for [AppProject Synchronization](https://argocd-agent.readthedocs.io/latest/user-guide/appprojects/#managed-agent-mode).

hack/release.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ fi
5959
echo "*** generating new manifests"
6060
(
6161
cd install/kubernetes/agent
62-
kustomize edit set image ghcr.io/argoproj-labs/argocd-agent/argocd-agent=quay.io/argoprojlabs/argocd-agent:${TARGET_TAG}
62+
kustomize edit set image argocd-agent=quay.io/argoprojlabs/argocd-agent:${TARGET_TAG}
6363
)
6464
(
6565
cd install/kubernetes/principal
66-
kustomize edit set image ghcr.io/argoproj-labs/argocd-agent/argocd-agent=quay.io/argoprojlabs/argocd-agent:${TARGET_TAG}
66+
kustomize edit set image argocd-agent=quay.io/argoprojlabs/argocd-agent:${TARGET_TAG}
6767
)
6868

6969
echo "*** committing changes to release branch"

0 commit comments

Comments
 (0)