Skip to content

Commit

Permalink
fix: Add ability to disable the commit-server
Browse files Browse the repository at this point in the history
Signed-off-by: Marco Maurer <mkilchhofer@users.noreply.github.com>
  • Loading branch information
mkilchhofer committed Feb 4, 2025
1 parent cd53240 commit 3363e40
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 4 deletions.
9 changes: 8 additions & 1 deletion charts/argo-cd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1621,7 +1621,11 @@ If you use an External Redis (See Option 3 above), this Job is not deployed.
| notifications.topologySpreadConstraints | list | `[]` (defaults to global.topologySpreadConstraints) | Assign custom [TopologySpreadConstraints] rules to the application controller |
| notifications.triggers | object | `{}` | The trigger defines the condition when the notification should be sent |

## Commit server
## Commit server (Manifest Hydrator)

The Argo CD Commit Server provides push access to git repositories for hydrated manifests.

To read more about this component, please read [Argo CD Manifest Hydrator] and [Manifest Hydrator].

| Key | Type | Default | Description |
|-----|------|---------|-------------|
Expand All @@ -1632,6 +1636,7 @@ If you use an External Redis (See Option 3 above), this Job is not deployed.
| commitServer.deploymentStrategy | object | `{}` | Deployment strategy to be added to the commit server Deployment |
| commitServer.dnsConfig | object | `{}` | [DNS configuration] |
| commitServer.dnsPolicy | string | `"ClusterFirst"` | Alternative DNS policy for commit server pods |
| commitServer.enabled | bool | `true` | Enable commit server |
| commitServer.extraArgs | list | `[]` | commit server command line flags |
| commitServer.extraEnv | list | `[]` | Environment variables to pass to the commit server |
| commitServer.extraEnvFrom | list | `[]` (See [values.yaml]) | envFrom to pass to the commit server |
Expand Down Expand Up @@ -1699,3 +1704,5 @@ Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/
[Applications in any namespace]: https://argo-cd.readthedocs.io/en/stable/operator-manual/app-any-namespace/#applications-in-any-namespace
[Argo CD Extensions]: https://github.com/argoproj-labs/argocd-extensions?tab=readme-ov-file#deprecation-notice
[Argo CD Extension Installer]: https://github.com/argoproj-labs/argocd-extension-installer
[Argo CD Manifest Hydrator]: https://argo-cd.readthedocs.io/en/stable/proposals/manifest-hydrator/
[Manifest Hydrator]: https://github.com/argoproj/argo-cd/blob/master/docs/proposals/manifest-hydrator.md
8 changes: 7 additions & 1 deletion charts/argo-cd/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,11 @@ If you use an External Redis (See Option 3 above), this Job is not deployed.
{{- end }}
{{- end }}

## Commit server
## Commit server (Manifest Hydrator)

The Argo CD Commit Server provides push access to git repositories for hydrated manifests.

To read more about this component, please read [Argo CD Manifest Hydrator] and [Manifest Hydrator].

| Key | Type | Default | Description |
|-----|------|---------|-------------|
Expand Down Expand Up @@ -855,3 +859,5 @@ Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/
[Applications in any namespace]: https://argo-cd.readthedocs.io/en/stable/operator-manual/app-any-namespace/#applications-in-any-namespace
[Argo CD Extensions]: https://github.com/argoproj-labs/argocd-extensions?tab=readme-ov-file#deprecation-notice
[Argo CD Extension Installer]: https://github.com/argoproj-labs/argocd-extension-installer
[Argo CD Manifest Hydrator]: https://argo-cd.readthedocs.io/en/stable/proposals/manifest-hydrator/
[Manifest Hydrator]: https://github.com/argoproj/argo-cd/blob/master/docs/proposals/manifest-hydrator.md
2 changes: 2 additions & 0 deletions charts/argo-cd/templates/argocd-commit-server/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.commitServer.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -229,3 +230,4 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
dnsPolicy: {{ .Values.commitServer.dnsPolicy }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.global.networkPolicy.create }}
{{- if and .Values.commitServer.enabled .Values.global.networkPolicy.create }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
Expand Down
2 changes: 2 additions & 0 deletions charts/argo-cd/templates/argocd-commit-server/service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.commitServer.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand Down Expand Up @@ -26,3 +27,4 @@ spec:
targetPort: 8087
selector:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.commitServer.name) | nindent 4 }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{- if .Values.commitServer.serviceAccount.create }}
{{- if and .Values.commitServer.enabled .Values.commitServer.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
automountServiceAccountToken: {{ .Values.commitServer.serviceAccount.automountServiceAccountToken }}
metadata:
name: {{ include "argo-cd.commitServer.serviceAccountName" . }}
namespace: {{ include "argo-cd.namespace" . }}
Expand Down
3 changes: 3 additions & 0 deletions charts/argo-cd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3752,6 +3752,9 @@ notifications:
# - on-sync-status-unknown

commitServer:
# -- Enable commit server
enabled: true

# -- Commit server name
name: commit-server

Expand Down

0 comments on commit 3363e40

Please sign in to comment.