Skip to content

Instantly share code, notes, and snippets.

View lioneltchami's full-sized avatar
🏠
Working from home

Lionel Tchami lioneltchami

🏠
Working from home
View GitHub Profile
> argocd cluster list
SERVER NAME VERSION STATUS MESSAGE
https://kubeapi.kar.int kerch-kube-cluster 1.23 Successful
https://kubernetes.default.svc in-cluster 1.21 Successful
> argocd repo add [email protected]:elatov/k8s-prometheus.git --ssh-private-key-path /data/local/ssh-keys/argocd --name prometheus
Repository '[email protected]:elatov/k8s-prometheus.git' added
> argocd repo list
TYPE NAME REPO INSECURE OCI LFS CREDS STATUS MESSAGE
git prometheus [email protected]:elatov/k8s-prometheus.git false false false false Successful
> argocd app create prometheus --repo [email protected]:elatov/k8s-prometheus.git --path overlays/gcp --dest-server https://kubernetes.default.svc --dest-namespace default --sync-policy auto
> argocd app list
NAME CLUSTER NAMESPACE PROJECT STATUS HEALTH SYNCPOLICY CONDITIONS REPO PATH TARGET
prometheus https://kubernetes.default.svc default default Synced Healthy Auto <none> [email protected]:elatov/k8s-prometheus.git overlays/gcp
> kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj-labs/argocd-notifications/v1.1.0/manifests/install.yaml
> kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj-labs/argocd-notifications/v1.1.0/catalog/install.yaml
> k get pods -l app.kubernetes.io/name=argocd-notifications-controller -n argocd
NAME READY STATUS RESTARTS AGE
argocd-notifications-controller-5c548f8dc9-rgx5n 1/1 Running 0 104s
> kubectl patch cm argocd-notifications-cm -n argocd --type merge -p '{"data": {"service.slack": "{ token: $slack-token }" }}'
> kubectl patch app prometheus -n argocd -p '{"metadata": {"annotations": {"notifications.argoproj.io/subscribe.on-sync-succeeded.slack":"general"}}}' --type merge
application.argoproj.io/prometheus patched