From 5108eb87cb7d59a8080e9471d436d6551e8d4f96 Mon Sep 17 00:00:00 2001 From: Leonardo Luz Almeida Date: Sun, 5 Nov 2023 20:26:22 -0500 Subject: [PATCH] docs: readme file installation instructions (#61) * docs: improve the readme file Signed-off-by: Leonardo Luz Almeida * docs: add argocd-extension-installer patch example Signed-off-by: Leonardo Luz Almeida --------- Signed-off-by: Leonardo Luz Almeida --- README.md | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e224619..c9facce 100644 --- a/README.md +++ b/README.md @@ -17,16 +17,67 @@ This extension is composed by 2 components: ### Install `argocd-metrics-server` +The `manifests` folder in this repo contains an example of how the +`argocd-metrics-server` can be installed. + ```sh git clone https://github.com/argoproj-labs/argocd-extension-metrics.git cd argocd-extension-metrics kustomize build ./manifests | kubectl apply -f - ``` +All graphs are configured in the `argocd-metrics-server-configmap`. +The example configmap provided in the `manifests` defines how to +extract and query Prometheus to display the golden signal metrics in +Argo CD UI. This configmap must be changed depending on the metrics +available in your Prometheus instance. + + ### Install UI extension -TODO +The UI extension needs to be installed by mounting the React component +in Argo CD API server. This process can be automated by using the +[argocd-extension-installer][1]. This installation method will run an +init container that will download, extract and place the file in the +correct location. + +The yaml file below is an example of how to define a kustomize patch +to install this UI extension: + +```yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: argocd-server +spec: + template: + spec: + initContainers: + - name: extension-metrics + image: ext-installer:local + env: + - name: EXTENSION_URL + value: https://github.com/argoproj-labs/argocd-extension-metrics/releases/download/v1.0.0/extension.tar.gz + - name: EXTENSION_CHECKSUM_URL + value: https://github.com/argoproj-labs/argocd-extension-metrics/releases/download/v1.0.0/extension_checksums.txt + volumeMounts: + - name: extensions + mountPath: /tmp/extensions/ + securityContext: + runAsUser: 1000 + allowPrivilegeEscalation: false + containers: + - name: argocd-server + volumeMounts: + - name: extensions + mountPath: /tmp/extensions/ + volumes: + - name: extensions + emptyDir: {} +``` ## Contributing TODO + +[1]: https://github.com/argoproj-labs/argocd-extension-installer