diff --git a/install/helm-repo/argocd-agent-agent/Chart.yaml b/install/helm-repo/argocd-agent-agent/Chart.yaml index 6062f931..ebcbd453 100644 --- a/install/helm-repo/argocd-agent-agent/Chart.yaml +++ b/install/helm-repo/argocd-agent-agent/Chart.yaml @@ -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" diff --git a/install/helm-repo/argocd-agent-agent/README.md b/install/helm-repo/argocd-agent-agent/README.md new file mode 100644 index 00000000..241c325a --- /dev/null +++ b/install/helm-repo/argocd-agent-agent/README.md @@ -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:** + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| Argo Project Maintainers | | | + +## Source Code + +* + +## 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). | + diff --git a/install/helm-repo/argocd-agent-agent/templates/NOTES.txt b/install/helm-repo/argocd-agent-agent/templates/NOTES.txt index 8ef5f67e..7ddf0ffc 100644 --- a/install/helm-repo/argocd-agent-agent/templates/NOTES.txt +++ b/install/helm-repo/argocd-agent-agent/templates/NOTES.txt @@ -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 }} diff --git a/install/helm-repo/argocd-agent-agent/templates/agent-deployment.yaml b/install/helm-repo/argocd-agent-agent/templates/agent-deployment.yaml index a41f57cd..cd0c5e79 100644 --- a/install/helm-repo/argocd-agent-agent/templates/agent-deployment.yaml +++ b/install/helm-repo/argocd-agent-agent/templates/agent-deployment.yaml @@ -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 @@ -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: @@ -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: diff --git a/install/helm-repo/argocd-agent-agent/templates/agent-healthz-service.yaml b/install/helm-repo/argocd-agent-agent/templates/agent-healthz-service.yaml index 485fddc3..4e7d0355 100644 --- a/install/helm-repo/argocd-agent-agent/templates/agent-healthz-service.yaml +++ b/install/helm-repo/argocd-agent-agent/templates/agent-healthz-service.yaml @@ -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 \ No newline at end of file diff --git a/install/helm-repo/argocd-agent-agent/templates/agent-metrics-service.yaml b/install/helm-repo/argocd-agent-agent/templates/agent-metrics-service.yaml index 615494b1..cb437d77 100644 --- a/install/helm-repo/argocd-agent-agent/templates/agent-metrics-service.yaml +++ b/install/helm-repo/argocd-agent-agent/templates/agent-metrics-service.yaml @@ -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 \ No newline at end of file diff --git a/install/helm-repo/argocd-agent-agent/templates/tests/test-configMap.yaml b/install/helm-repo/argocd-agent-agent/templates/tests/test-configMap.yaml index f779ea25..5ded3c35 100644 --- a/install/helm-repo/argocd-agent-agent/templates/tests/test-configMap.yaml +++ b/install/helm-repo/argocd-agent-agent/templates/tests/test-configMap.yaml @@ -1,7 +1,8 @@ +{{- if .Values.tests.enabled }} apiVersion: v1 kind: Pod metadata: - name: "test" + name: "test-configmap" annotations: "helm.sh/hook": test spec: @@ -137,4 +138,5 @@ spec: - name: argocd-agent-params configMap: name: argocd-agent-params - restartPolicy: Never \ No newline at end of file + restartPolicy: Never +{{- end }} \ No newline at end of file diff --git a/install/helm-repo/argocd-agent-agent/templates/tests/test-deployment.yaml b/install/helm-repo/argocd-agent-agent/templates/tests/test-deployment.yaml index a2b43b97..50880301 100644 --- a/install/helm-repo/argocd-agent-agent/templates/tests/test-deployment.yaml +++ b/install/helm-repo/argocd-agent-agent/templates/tests/test-deployment.yaml @@ -1,3 +1,4 @@ +{{- if .Values.tests.enabled }} apiVersion: v1 kind: Pod metadata: @@ -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 @@ -77,3 +78,4 @@ spec: echo "Deployment configuration verified successfully!" restartPolicy: Never +{{- end }} \ No newline at end of file diff --git a/install/helm-repo/argocd-agent-agent/templates/tests/test-labels.yaml b/install/helm-repo/argocd-agent-agent/templates/tests/test-labels.yaml index c39647e8..a02a6512 100644 --- a/install/helm-repo/argocd-agent-agent/templates/tests/test-labels.yaml +++ b/install/helm-repo/argocd-agent-agent/templates/tests/test-labels.yaml @@ -1,3 +1,4 @@ +{{- if .Values.tests.enabled }} apiVersion: v1 kind: Pod metadata: @@ -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 @@ -188,3 +189,4 @@ spec: echo "All labels and annotations verified successfully!" restartPolicy: Never +{{- end }} \ No newline at end of file diff --git a/install/helm-repo/argocd-agent-agent/templates/tests/test-overall.yaml b/install/helm-repo/argocd-agent-agent/templates/tests/test-overall.yaml index 52514e94..4380511d 100644 --- a/install/helm-repo/argocd-agent-agent/templates/tests/test-overall.yaml +++ b/install/helm-repo/argocd-agent-agent/templates/tests/test-overall.yaml @@ -1,3 +1,4 @@ +{{- if .Values.tests.enabled }} apiVersion: v1 kind: Pod metadata: @@ -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 @@ -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 }} \ No newline at end of file diff --git a/install/helm-repo/argocd-agent-agent/templates/tests/test-rbac.yaml b/install/helm-repo/argocd-agent-agent/templates/tests/test-rbac.yaml index a5b9705d..99c18206 100644 --- a/install/helm-repo/argocd-agent-agent/templates/tests/test-rbac.yaml +++ b/install/helm-repo/argocd-agent-agent/templates/tests/test-rbac.yaml @@ -1,3 +1,4 @@ +{{- if .Values.tests.enabled }} apiVersion: v1 kind: Pod metadata: @@ -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 @@ -125,3 +126,4 @@ spec: echo "RBAC configuration verified successfully!" restartPolicy: Never +{{- end }} \ No newline at end of file diff --git a/install/helm-repo/argocd-agent-agent/templates/tests/test-sa.yaml b/install/helm-repo/argocd-agent-agent/templates/tests/test-sa.yaml index 4680a545..0cab24dc 100644 --- a/install/helm-repo/argocd-agent-agent/templates/tests/test-sa.yaml +++ b/install/helm-repo/argocd-agent-agent/templates/tests/test-sa.yaml @@ -1,3 +1,4 @@ +{{- if .Values.tests.enabled }} apiVersion: v1 kind: ServiceAccount metadata: @@ -5,7 +6,6 @@ metadata: namespace: {{ include "argocd-agent-agent.namespace" . }} labels: app.kubernetes.io/name: argocd-agent-agent - app.kubernetes.io/component: test --- apiVersion: rbac.authorization.k8s.io/v1 @@ -15,7 +15,6 @@ metadata: namespace: {{ include "argocd-agent-agent.namespace" . }} labels: app.kubernetes.io/name: argocd-agent-agent - app.kubernetes.io/component: test rules: - apiGroups: [""] @@ -35,7 +34,6 @@ metadata: namespace: {{ include "argocd-agent-agent.namespace" . }} labels: app.kubernetes.io/name: argocd-agent-agent - app.kubernetes.io/component: test roleRef: apiGroup: rbac.authorization.k8s.io @@ -70,7 +68,6 @@ metadata: name: argocd-agent-test labels: app.kubernetes.io/name: argocd-agent-agent - app.kubernetes.io/component: test roleRef: apiGroup: rbac.authorization.k8s.io @@ -80,3 +77,4 @@ subjects: - kind: ServiceAccount name: argocd-agent-test namespace: {{ include "argocd-agent-agent.namespace" . }} +{{- end }} \ No newline at end of file diff --git a/install/helm-repo/argocd-agent-agent/templates/tests/test-service.yaml b/install/helm-repo/argocd-agent-agent/templates/tests/test-service.yaml deleted file mode 100644 index 74badb56..00000000 --- a/install/helm-repo/argocd-agent-agent/templates/tests/test-service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# apiVersion: v1 -# kind: Pod -# metadata: -# name: "test-1" -# # annotations: -# # "helm.sh/hook": test -# spec: -# containers: -# - name: wget -# image: busybox -# command: ['wget'] -# args: ['argocd-agent-agent-metrics:{{ .Values.metrics }}/metrics'] -# volumeMounts: -# - name: argocd-agent-params -# mountPath: /etc/config -# volumes: -# - name: argocd-agent-params -# configMap: -# name: argocd-agent-params -# restartPolicy: Never \ No newline at end of file diff --git a/install/helm-repo/argocd-agent-agent/templates/tests/test-services.yaml b/install/helm-repo/argocd-agent-agent/templates/tests/test-services.yaml index 02733f38..08ff7475 100644 --- a/install/helm-repo/argocd-agent-agent/templates/tests/test-services.yaml +++ b/install/helm-repo/argocd-agent-agent/templates/tests/test-services.yaml @@ -1,3 +1,4 @@ +{{- if .Values.tests.enabled }} apiVersion: v1 kind: Pod metadata: @@ -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 @@ -88,3 +89,4 @@ spec: echo "Services configuration verified successfully!" restartPolicy: Never +{{- end }} \ No newline at end of file diff --git a/install/helm-repo/argocd-agent-agent/values.schema.json b/install/helm-repo/argocd-agent-agent/values.schema.json new file mode 100644 index 00000000..11610874 --- /dev/null +++ b/install/helm-repo/argocd-agent-agent/values.schema.json @@ -0,0 +1,227 @@ +{ + "$schema": "https://json-schema.org/draft-07/schema#", + "$id": "https://argoproj-labs.github.io/argocd-agent/values.schema.json", + "title": "argocd-agent-agent chart values", + "type": "object", + "additionalProperties": true, + "properties": { + "namespaceOverride": { + "type": "string", + "description": "Override namespace to deploy the agent into" + }, + + "tlsSecretName": { + "type": "string", + "description": "Secret name containing client TLS cert/key for agent" + }, + "userPasswordSecretName": { + "type": "string", + "description": "Secret name containing optional user/password credentials" + }, + + "image": { + "type": "string", + "description": "Container image repository for the agent" + }, + "imageTag": { + "type": "string", + "description": "Container image tag" + }, + "imagePullPolicy": { + "type": "string", + "enum": ["Always", "IfNotPresent", "Never"], + "description": "Image pull policy" + }, + + "replicaCount": { + "type": "integer", + "minimum": 0, + "description": "Number of replicas for the Deployment" + }, + + "resources": { + "type": "object", + "description": "Container resource requests/limits", + "additionalProperties": true, + "properties": { + "limits": { + "type": "object", + "additionalProperties": true, + "properties": { + "cpu": { "type": "string" }, + "memory": { "type": "string" } + } + }, + "requests": { + "type": "object", + "additionalProperties": true, + "properties": { + "cpu": { "type": "string" }, + "memory": { "type": "string" } + } + } + } + }, + + "nodeSelector": { + "type": "object", + "additionalProperties": { "type": "string" }, + "description": "Node selector for pod scheduling" + }, + "affinity": { + "type": "object", + "additionalProperties": true, + "description": "Pod affinity/anti-affinity rules" + }, + "tolerations": { + "type": "array", + "items": { "type": "object" }, + "description": "Tolerations for tainted nodes" + }, + + "podAnnotations": { + "type": "object", + "additionalProperties": { "type": "string" }, + "description": "Annotations to add to the pod" + }, + "podLabels": { + "type": "object", + "additionalProperties": { "type": "string" }, + "description": "Labels to add to the pod" + }, + + "priorityClassName": { + "type": "string", + "description": "PriorityClass name for the pod" + }, + + "serviceAccount": { + "type": "object", + "description": "ServiceAccount configuration", + "additionalProperties": false, + "properties": { + "create": { "type": "boolean", "default": true }, + "name": { "type": "string" }, + "annotations": { "type": "object", "additionalProperties": { "type": "string" } } + } + }, + + "agentMode": { + "type": "string", + "description": "Agent mode (e.g., 'autonomous' or 'managed')" + }, + "auth": { + "type": "string", + "description": "Authentication mode (e.g., 'mtls:any')" + }, + "logLevel": { + "type": "string", + "description": "Log level (debug, info, warn, error)" + }, + "server": { + "type": "string", + "description": "Remote principal server address" + }, + "serverPort": { + "type": "string", + "pattern": "^[0-9]+$", + "description": "Remote principal server port" + }, + "metricsPort": { + "type": "string", + "pattern": "^[0-9]+$", + "description": "Agent metrics port (env/config value)" + }, + "tlsClientInSecure": { + "type": "string", + "enum": ["true", "false"], + "description": "Whether to skip TLS verification for client (string)" + }, + "healthzPort": { + "type": "string", + "pattern": "^[0-9]+$", + "description": "Agent healthz port (env/config value)" + }, + "redisAddress": { + "type": "string", + "description": "Redis address (host:port)" + }, + "tlsClientKeyPath": { "type": "string", "description": "Path to client key inside container" }, + "tlsClientCertPath": { "type": "string", "description": "Path to client cert inside container" }, + "tlsRootCAPath": { "type": "string", "description": "Path to Root CA inside container" }, + + "service": { + "type": "object", + "description": "Service configuration for metrics and healthz", + "additionalProperties": false, + "properties": { + "metrics": { + "type": "object", + "additionalProperties": false, + "properties": { + "port": { "type": "integer", "minimum": 1, "maximum": 65535 }, + "targetPort": { "type": "integer", "minimum": 1, "maximum": 65535 }, + "annotations": { "type": "object", "additionalProperties": { "type": "string" } } + } + }, + "healthz": { + "type": "object", + "additionalProperties": false, + "properties": { + "port": { "type": "integer", "minimum": 1, "maximum": 65535 }, + "targetPort": { "type": "integer", "minimum": 1, "maximum": 65535 }, + "annotations": { "type": "object", "additionalProperties": { "type": "string" } } + } + } + } + }, + + "probes": { + "type": "object", + "description": "Liveness and readiness probe configuration", + "additionalProperties": false, + "properties": { + "liveness": { + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": { "type": "boolean" }, + "httpGet": { + "type": "object", + "additionalProperties": false, + "properties": { + "path": { "type": "string" }, + "port": { "type": ["string", "integer"] } + } + }, + "initialDelaySeconds": { "type": "integer", "minimum": 0 }, + "periodSeconds": { "type": "integer", "minimum": 1 }, + "timeoutSeconds": { "type": "integer", "minimum": 1 }, + "failureThreshold": { "type": "integer", "minimum": 1 } + } + }, + "readiness": { + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": { "type": "boolean" }, + "httpGet": { + "type": "object", + "additionalProperties": false, + "properties": { + "path": { "type": "string" }, + "port": { "type": ["string", "integer"] } + } + }, + "initialDelaySeconds": { "type": "integer", "minimum": 0 }, + "periodSeconds": { "type": "integer", "minimum": 1 }, + "timeoutSeconds": { "type": "integer", "minimum": 1 }, + "failureThreshold": { "type": "integer", "minimum": 1 } + } + } + } + } + } +} + + diff --git a/install/helm-repo/argocd-agent-agent/values.yaml b/install/helm-repo/argocd-agent-agent/values.yaml index df6d0ea0..8e13b6da 100644 --- a/install/helm-repo/argocd-agent-agent/values.yaml +++ b/install/helm-repo/argocd-agent-agent/values.yaml @@ -2,25 +2,140 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. -# Override Namespace to deploy your agent +## @section Global +# -- Override namespace to deploy the agent into. Leave empty to use the release namespace. namespaceOverride: "" -# Secret names for argo-agent deployment -tlsSecretName: "argocd-agent-client-tls" -userPasswordSecretName: "argocd-agent-agent-userpass" +## @section Image +# -- Container image repository for the agent. image: "ghcr.io/argoproj-labs/argocd-agent/argocd-agent" +# -- Container image tag for the agent. imageTag: "latest" +# -- Image pull policy for the agent container. +imagePullPolicy: "Always" + +## @section Deployment +# -- Number of replicas for the agent Deployment. +replicaCount: 1 +# -- Name of the TLS Secret containing client cert/key for mTLS. +tlsSecretName: "argocd-agent-client-tls" +# -- Name of the Secret containing agent username/password (if used). +userPasswordSecretName: "argocd-agent-agent-userpass" +# -- Resource requests and limits for the agent Pod. +resources: + limits: + cpu: 500m + memory: 512Mi + requests: + cpu: 100m + memory: 128Mi -# config-map to config parameters for argocd-agent +## @section ServiceAccount +# -- ServiceAccount configuration. +serviceAccount: + # -- Whether to create the ServiceAccount. + create: true + # -- Name of the ServiceAccount to use. If empty, a name is generated. + name: "" + # -- Annotations to add to the ServiceAccount. + annotations: {} + +## @section Pod Scheduling and Metadata +# -- Node selector for scheduling the agent Pod. +nodeSelector: {} +# -- Affinity rules for the agent Pod. +affinity: {} +# -- Tolerations for the agent Pod. +tolerations: [] +# -- Additional annotations to add to the agent Pod. +podAnnotations: {} +# -- Additional labels to add to the agent Pod. +podLabels: {} +# -- PriorityClassName for the agent Pod. +priorityClassName: "" + +## @section Probes +# -- Liveness and readiness probe configuration. +probes: + liveness: + # -- Enable the liveness probe. + enabled: true + httpGet: + path: /healthz + port: healthz + # -- Initial delay before the first liveness probe. + initialDelaySeconds: 10 + # -- Frequency of liveness probes. + periodSeconds: 10 + # -- Timeout for liveness probe. + timeoutSeconds: 2 + # -- Failure threshold for liveness probe. + failureThreshold: 3 + readiness: + # -- Enable the readiness probe. + enabled: true + httpGet: + path: /healthz + port: healthz + # -- Initial delay before the first readiness probe. + initialDelaySeconds: 5 + # -- Frequency of readiness probes. + periodSeconds: 10 + # -- Timeout for readiness probe. + timeoutSeconds: 2 + # -- Failure threshold for readiness probe. + failureThreshold: 3 + +## @section Agent Parameters +# -- Agent mode of operation. agentMode: "autonomous" +# -- Authentication mode for connecting to the principal. auth: "mtls:any" +# -- Log level for the agent. logLevel: "info" -server: "principal.server.address.com" +# -- Principal server address (hostname or host:port). +server: "principal.server.address.com" +# -- Principal server port. serverPort: "443" +# -- Metrics server port exposed by the agent. metricsPort: "8181" +# -- Whether to skip TLS verification for client connections. tlsClientInSecure: "false" +# -- Healthz server port exposed by the agent. healthzPort: "8002" +# -- Redis address used by the agent. redisAddress: "argocd-redis:6379" +# -- File path to the client TLS key inside the container (optional). tlsClientKeyPath: "" +# -- File path to the client TLS certificate inside the container (optional). tlsClientCertPath: "" -tlsRootCAPath: "" \ No newline at end of file +# -- File path to the root CA certificate inside the container (optional). +tlsRootCAPath: "" + +## @section Services +# -- Service configuration for metrics and healthz endpoints. +service: + metrics: + # -- Service port for metrics. + port: 8181 + # -- Target port for metrics. + targetPort: 8181 + # -- Annotations to add to the metrics Service. + annotations: {} + healthz: + # -- Service port for healthz. + port: 8002 + # -- Target port for healthz. + targetPort: 8002 + # -- Annotations to add to the healthz Service. + annotations: {} + +## @section Tests +# -- Configuration for chart tests. +tests: + # -- Enable chart tests. + enabled: "true" + # -- Test image. + image: bitnamilegacy/kubectl + # -- Test image tag. + tag: "1.33.4" \ No newline at end of file diff --git a/install/helm-repo/doc/install.md b/install/helm-repo/docs/install-agent.md similarity index 100% rename from install/helm-repo/doc/install.md rename to install/helm-repo/docs/install-agent.md