How do you specific GKE resource requests for Argo CD?

8/19/2021

I am trying to set up Argo CD on Google Kubernetes Engine Autopilot and each pod/container is defaulting to the default resource request (0.5 vCPU and 2 GB RAM per container). This is way more than the pods need and is going to be too expensive (13GB of memory reserved in my cluster just for Argo CD). I am following the Getting Started guide for Argo CD and am running the following command to add Argo CD to my cluster:

kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

How do I specify the resources for each pod when I am using someone else's yaml template? The only way I have found to set resource requests is with my own yaml file like this:

  apiVersion: v1
  kind: Pod
  metadata:
    name: memory-demo
    namespace: mem-example
  spec:
    containers:
    - name: memory-demo-ctr
      image: polinux/stress
      resources:
        limits:
          memory: "200Mi"
        requests:
          memory: "100Mi"

But I don't understand how to apply this type of configuration to Argo CD.

Thanks!

-- u2m4c6
argocd
google-kubernetes-engine
kubectl
kubernetes

2 Answers

9/7/2021

You can dump the yaml of argocd, then customize your resource request, and then apply the modified yaml.

$ kubectl get deployment -n argocd -o yaml > argocd_deployment.yaml
$ kubectl get sts -n argocd -o yaml > argocd_statefulset.yaml
$ # modify resource
$ vim argocd_deployment.yaml
$ vim argocd_statefulset.yaml
$ kubectl apply -f argocd_deployment.yaml
$ kubectl apply -f argocd_statefulset.yaml

Or modify deplopyment and statefulset directly by kubectl edit

$ kubectl edit deployment -n argocd
$ kubectl edit sts -n argocd
-- ice coffee
Source: StackOverflow

8/19/2021

So right now you are just using kubectl with the manifest from github and you cannot edit it. What you need to do is

1 Download the file with wget https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

2 Use an editor like nano or vim to edit the file with requests as explained in my comments above.

3 Then use kubectl apply -f newfile.yaml

-- dany L
Source: StackOverflow