There are many ways of actually controlling Argo-CD. This guide focusses exclusively on raw Kubernetes manifests, which can be a collection in a (git) directory.
kubectl create namespace argocd
kubectl apply -n argocd --server-side --force-conflicts -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
While you can go the quick official way for trying it out, I'd strongly recommend doing it slightly different. Argo-CD is almost completely configured through Kubernetes config maps. That means while there are a few settings you can manage in the GUI, most of of is done through manifests, i.e. yaml files.
Of course you can go and use kubectl to jump through hoops for every change you wanna make. But usually then you make a change, forget to document it and worse, somebody else might have a different though and reconfigures it differently. Thus the recommendation:
--server-side --force-conflicts.From the official documention:
"Why --server-side --force-conflicts?
The --server-side flag is required because some Argo CD CRDs (like ApplicationSet) exceed the 262KB annotation size limit imposed by client-side kubectl apply. Server-side apply avoids this limitation by not storing the last-applied-configuration annotation.
The --force-conflicts flag allows the apply operation to take ownership of fields that may have been previously managed by other tools (such as Helm or a previous kubectl apply). This is safe for fresh installs and necessary for upgrades. Note that any custom modifications you've made to fields that are defined in the Argo CD manifests (like affinity, env, or probes) will be overwritten. However, fields not specified in the manifests (like resources limits/requests or tolerations) will be preserved.
While not necessarily required, the argocd cli sometimes becomes handy and a numer of people out there prefer cli in their CI/CD as well. Checkout the documentation: https://argo-cd.readthedocs.io/en/stable/cli_installation/
On Linux, install with curl:
curl -sSL -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64
sudo install -m 555 argocd-linux-amd64 /usr/local/bin/argocd
rm argocd-linux-amd64
Most of the core configuration is done on Kubernetes level, within the config maps.
There are several config maps available for argo-cd:
argocd-cmargocd-cmd-params-cmargocd-gpg-keys-cmnotifications-controllerargocd-rbac-cmargocd-ssh-known-hosts-cmargocd-tls-certs-cm"...Argo CD Notifications continuously monitors Argo CD applications and provides a flexible way to notify users about important changes in the application state...."
We'll need to install an extension and configure it.
Officially they recommed this way:
kubectl apply -n argocd --server-side --force-conflicts -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/notifications_catalog/install.yaml
Like above I'd strongly recommend downloading and placing the manifest in your control repo and apply it through CI/CD or argo-cd itself to get a stable and git-versioned desired status to refer to and reapply when necessary.
There are several ways of notifications possible [1], We'll focus on email as that seems very common.
---
apiVersion: v1
kind: Secret
metadata:
name: argocd-notifications-secret
namespace: argocd
stringData:
email-username: admin@example.net
email-password: ReplacemeWithaStrongPassword
type: Opaque
Of course you can do it manually, if you do not want this in your statement, or better yet via Vault / OpenBao.
The documentation [1:1] has a specific section for namespaced notifications, make sure to read it!
---
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/component: notifications-controller
app.kubernetes.io/name: argocd-notifications-controller
app.kubernetes.io/part-of: argocd
name: argocd-notifications-cm
data:
service.email.mail: >-
{ username: $email-username, password: $email-password, host:
yourmail.example.net, port: <port>, from: $email-username }
Usual ports are 465, 587. If in doubt, verify with your email provider.
That's it, nothing more in the documentation!
https://argo-cd.readthedocs.io/en/stable/operator-manual/notifications/ - official documentation ↩︎ ↩︎