Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 19 additions & 17 deletions install/helm-repo/argocd-agent-agent/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
apiVersion: v2
name: argocd-agent-agent
description: A Helm chart for Kubernetes
description: Argo CD Agent for connecting managed clusters to a Principal

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
# chart version
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"
# applicaation version, ArgoCD Agent version
appVersion: 0.4.1


home: https://github.com/argoproj-labs/argocd-agent
sources:
- https://github.com/argoproj-labs/argocd-agent
keywords:
- argocd
- gitops
- agent
maintainers:
- name: Argo Project Maintainers
url: https://github.com/argoproj-labs/argocd-agent
kubeVersion: ">=1.24.0-0"
annotations:
charts.openshift.io/name: "Argo CD Agent - Agent Component"
79 changes: 79 additions & 0 deletions install/helm-repo/argocd-agent-agent/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# argocd-agent-agent

![Version: 0.4.1](https://img.shields.io/badge/Version-0.4.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

Argo CD Agent for connecting managed clusters to a Principal

**Homepage:** <https://github.com/argoproj-labs/argocd-agent>

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| Argo Project Maintainers | | <https://github.com/argoproj-labs/argocd-agent> |

## Source Code

* <https://github.com/argoproj-labs/argocd-agent>

## Requirements

Kubernetes: `>=1.24.0-0`

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | Affinity rules for the agent Pod. |
| agentMode | string | `"autonomous"` | Agent mode of operation. |
| auth | string | `"mtls:any"` | Authentication mode for connecting to the principal. |
| healthzPort | string | `"8002"` | Healthz server port exposed by the agent. |
| image | string | `"ghcr.io/argoproj-labs/argocd-agent/argocd-agent"` | Container image repository for the agent. |
| imagePullPolicy | string | `"Always"` | Image pull policy for the agent container. |
| imageTag | string | `"latest"` | Container image tag for the agent. |
| logLevel | string | `"info"` | Log level for the agent. |
| metricsPort | string | `"8181"` | Metrics server port exposed by the agent. |
| namespaceOverride | string | `""` | Override namespace to deploy the agent into. Leave empty to use the release namespace. |
| nodeSelector | object | `{}` | Node selector for scheduling the agent Pod. |
| podAnnotations | object | `{}` | Additional annotations to add to the agent Pod. |
| podLabels | object | `{}` | Additional labels to add to the agent Pod. |
| priorityClassName | string | `""` | PriorityClassName for the agent Pod. |
| probes | object | `{"liveness":{"enabled":true,"failureThreshold":3,"httpGet":{"path":"/healthz","port":"healthz"},"initialDelaySeconds":10,"periodSeconds":10,"timeoutSeconds":2},"readiness":{"enabled":true,"failureThreshold":3,"httpGet":{"path":"/healthz","port":"healthz"},"initialDelaySeconds":5,"periodSeconds":10,"timeoutSeconds":2}}` | Liveness and readiness probe configuration. |
| probes.liveness.enabled | bool | `true` | Enable the liveness probe. |
| probes.liveness.failureThreshold | int | `3` | Failure threshold for liveness probe. |
| probes.liveness.initialDelaySeconds | int | `10` | Initial delay before the first liveness probe. |
| probes.liveness.periodSeconds | int | `10` | Frequency of liveness probes. |
| probes.liveness.timeoutSeconds | int | `2` | Timeout for liveness probe. |
| probes.readiness.enabled | bool | `true` | Enable the readiness probe. |
| probes.readiness.failureThreshold | int | `3` | Failure threshold for readiness probe. |
| probes.readiness.initialDelaySeconds | int | `5` | Initial delay before the first readiness probe. |
| probes.readiness.periodSeconds | int | `10` | Frequency of readiness probes. |
| probes.readiness.timeoutSeconds | int | `2` | Timeout for readiness probe. |
| redisAddress | string | `"argocd-redis:6379"` | Redis address used by the agent. |
| replicaCount | int | `1` | Number of replicas for the agent Deployment. |
| resources | object | `{"limits":{"cpu":"500m","memory":"512Mi"},"requests":{"cpu":"100m","memory":"128Mi"}}` | Resource requests and limits for the agent Pod. |
| server | string | `"principal.server.address.com"` | Principal server address (hostname or host:port). |
| serverPort | string | `"443"` | Principal server port. |
| service | object | `{"healthz":{"annotations":{},"port":8002,"targetPort":8002},"metrics":{"annotations":{},"port":8181,"targetPort":8181}}` | Service configuration for metrics and healthz endpoints. |
| service.healthz.annotations | object | `{}` | Annotations to add to the healthz Service. |
| service.healthz.port | int | `8002` | Service port for healthz. |
| service.healthz.targetPort | int | `8002` | Target port for healthz. |
| service.metrics.annotations | object | `{}` | Annotations to add to the metrics Service. |
| service.metrics.port | int | `8181` | Service port for metrics. |
| service.metrics.targetPort | int | `8181` | Target port for metrics. |
| serviceAccount | object | `{"annotations":{},"create":true,"name":""}` | ServiceAccount configuration. |
| serviceAccount.annotations | object | `{}` | Annotations to add to the ServiceAccount. |
| serviceAccount.create | bool | `true` | Whether to create the ServiceAccount. |
| serviceAccount.name | string | `""` | Name of the ServiceAccount to use. If empty, a name is generated. |
| tests | object | `{"enabled":"true","image":"bitnamilegacy/kubectl","tag":"1.33.4"}` | Configuration for chart tests. |
| tests.enabled | string | `"true"` | Enable chart tests. |
| tests.image | string | `"bitnamilegacy/kubectl"` | Test image. |
| tests.tag | string | `"1.33.4"` | Test image tag. |
| tlsClientCertPath | string | `""` | File path to the client TLS certificate inside the container (optional). |
| tlsClientInSecure | string | `"false"` | Whether to skip TLS verification for client connections. |
| tlsClientKeyPath | string | `""` | File path to the client TLS key inside the container (optional). |
| tlsRootCAPath | string | `""` | File path to the root CA certificate inside the container (optional). |
| tlsSecretName | string | `"argocd-agent-client-tls"` | Name of the TLS Secret containing client cert/key for mTLS. |
| tolerations | list | `[]` | Tolerations for the agent Pod. |
| userPasswordSecretName | string | `"argocd-agent-agent-userpass"` | Name of the Secret containing agent username/password (if used). |

42 changes: 41 additions & 1 deletion install/helm-repo/argocd-agent-agent/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
Thank you for installing {{ include "argocd-agent-agent.name" . }}!

Your application has been deployed to the {{ include "argocd-agent-agent.namespace" . }} namespace.
Your agent has been deployed to the {{ include "argocd-agent-agent.namespace" . }} namespace.

Release: {{ .Release.Name }}
Namespace: {{ include "argocd-agent-agent.namespace" . }}

Deployment
----------
- Name: argocd-agent-agent
- Replicas: {{ .Values.replicaCount }}
- Image: {{ .Values.image }}:{{ .Values.imageTag }} (pullPolicy: {{ .Values.imagePullPolicy }})

Services
--------
- Metrics Service: argocd-agent-agent-metrics
- Port/TargetPort: {{ .Values.service.metrics.port }} / {{ .Values.service.metrics.targetPort }}
- Healthz Service: argocd-agent-agent-healthz
- Port/TargetPort: {{ .Values.service.healthz.port }} / {{ .Values.service.healthz.targetPort }}

Quick checks
------------
1) Check Deployment rollout
kubectl -n {{ include "argocd-agent-agent.namespace" . }} rollout status deploy/argocd-agent-agent

2) List Services
kubectl -n {{ include "argocd-agent-agent.namespace" . }} get svc argocd-agent-agent-metrics argocd-agent-agent-healthz

3) Port-forward to Metrics and Healthz
# Metrics
kubectl -n {{ include "argocd-agent-agent.namespace" . }} port-forward deploy/argocd-agent-agent 127.0.0.1:{{ .Values.service.metrics.port }}:{{ .Values.service.metrics.targetPort }}
# Healthz
kubectl -n {{ include "argocd-agent-agent.namespace" . }} port-forward deploy/argocd-agent-agent 127.0.0.1:{{ .Values.service.healthz.port }}:{{ .Values.service.healthz.targetPort }}

4) Probe endpoints
curl -sf http://127.0.0.1:{{ .Values.service.healthz.port }}/healthz || true
curl -sf http://127.0.0.1:{{ .Values.service.metrics.port }}/metrics | head -n 20 || true

Configuration overview
----------------------
- Agent mode: {{ .Values.agentMode }}
- Remote server: {{ .Values.server }}:{{ .Values.serverPort }}
- Redis address: {{ .Values.redisAddress }}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
name: argocd-agent-agent
namespace: {{ include "argocd-agent-agent.namespace" . }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app.kubernetes.io/name: argocd-agent-agent
Expand Down Expand Up @@ -117,11 +118,32 @@ spec:
name: argocd-agent-agent
imagePullPolicy: Always
image: "{{ .Values.image }}:{{ .Values.imageTag }}"
imagePullPolicy: {{ .Values.imagePullPolicy }}
ports:
- containerPort: 8000
name: metrics
- containerPort: 8002
name: healthz
{{- if .Values.probes.liveness.enabled }}
livenessProbe:
httpGet:
path: {{ .Values.probes.liveness.httpGet.path }}
port: {{ .Values.probes.liveness.httpGet.port }}
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
timeoutSeconds: {{ .Values.probes.liveness.timeoutSeconds }}
failureThreshold: {{ .Values.probes.liveness.failureThreshold }}
{{- end }}
{{- if .Values.probes.readiness.enabled }}
readinessProbe:
httpGet:
path: {{ .Values.probes.readiness.httpGet.path }}
port: {{ .Values.probes.readiness.httpGet.port }}
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
failureThreshold: {{ .Values.probes.readiness.failureThreshold }}
{{- end }}
securityContext:
capabilities:
drop:
Expand All @@ -131,10 +153,24 @@ spec:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
resources:
{{ toYaml .Values.resources | indent 12 }}
volumeMounts:
- name: userpass-passwd
mountPath: /app/config/creds
serviceAccountName: argocd-agent-agent
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
volumes:
- name: userpass-passwd
secret:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ metadata:
app.kubernetes.io/component: agent
name: argocd-agent-agent-healthz
namespace: {{ include "argocd-agent-agent.namespace" . }}
{{- with .Values.service.healthz.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
ports:
- name: healthz
protocol: TCP
port: 8002
targetPort: 8002
port: {{ .Values.service.healthz.port }}
targetPort: {{ .Values.service.healthz.targetPort }}
selector:
app.kubernetes.io/name: argocd-agent-agent
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ metadata:
app.kubernetes.io/component: agent
name: argocd-agent-agent-metrics
namespace: {{ include "argocd-agent-agent.namespace" . }}
{{- with .Values.service.metrics.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
ports:
- name: metrics
protocol: TCP
port: 8181
targetPort: 8181
port: {{ .Values.service.metrics.port }}
targetPort: {{ .Values.service.metrics.targetPort }}
selector:
app.kubernetes.io/name: argocd-agent-agent
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{{- if .Values.tests.enabled }}
apiVersion: v1
kind: Pod
metadata:
name: "test"
name: "test-configmap"
annotations:
"helm.sh/hook": test
spec:
Expand Down Expand Up @@ -137,4 +138,5 @@ spec:
- name: argocd-agent-params
configMap:
name: argocd-agent-params
restartPolicy: Never
restartPolicy: Never
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.tests.enabled }}
apiVersion: v1
kind: Pod
metadata:
Expand All @@ -8,7 +9,7 @@ spec:
serviceAccountName: argocd-agent-test
containers:
- name: kubectl
image: bitnami/kubectl:latest
image: "{{ .Values.tests.image }}:{{ .Values.tests.tag }}"
command:
- sh
- -c
Expand Down Expand Up @@ -77,3 +78,4 @@ spec:

echo "Deployment configuration verified successfully!"
restartPolicy: Never
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.tests.enabled }}
apiVersion: v1
kind: Pod
metadata:
Expand All @@ -8,7 +9,7 @@ spec:
serviceAccountName: argocd-agent-test
containers:
- name: kubectl
image: bitnami/kubectl:latest
image: "{{ .Values.tests.image }}:{{ .Values.tests.tag }}"
command:
- sh
- -c
Expand Down Expand Up @@ -188,3 +189,4 @@ spec:

echo "All labels and annotations verified successfully!"
restartPolicy: Never
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.tests.enabled }}
apiVersion: v1
kind: Pod
metadata:
Expand All @@ -8,7 +9,7 @@ spec:
serviceAccountName: argocd-agent-test
containers:
- name: kubectl
image: bitnami/kubectl:latest
image: "{{ .Values.tests.image }}:{{ .Values.tests.tag }}"
command:
- sh
- -c
Expand Down Expand Up @@ -147,3 +148,4 @@ spec:
echo "Overall chart installation verified successfully!"
echo "Total resources created: $((DEPLOYMENT_COUNT + SERVICE_COUNT + CONFIGMAP_COUNT + SA_COUNT + ROLE_COUNT + ROLEBINDING_COUNT + CLUSTERROLE_COUNT + CLUSTERROLEBINDING_COUNT))"
restartPolicy: Never
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.tests.enabled }}
apiVersion: v1
kind: Pod
metadata:
Expand All @@ -8,7 +9,7 @@ spec:
serviceAccountName: argocd-agent-test
containers:
- name: kubectl
image: bitnami/kubectl:latest
image: "{{ .Values.tests.image }}:{{ .Values.tests.tag }}"
command:
- sh
- -c
Expand Down Expand Up @@ -125,3 +126,4 @@ spec:

echo "RBAC configuration verified successfully!"
restartPolicy: Never
{{- end }}
Loading
Loading