argoproj-labs / argocd-operator

A Kubernetes operator for managing Argo CD clusters.
https://argocd-operator.readthedocs.io
Apache License 2.0
646 stars 735 forks source link

Problem with redis and docker.io limits. How to overwrite redis image url in 0.4.0? #1562

Open doman18 opened 1 week ago

doman18 commented 1 week ago

I did not install this operator. I just got a task to upgrade whole OKD cluster. Upgrades go well but redis got stuck during redeployment because default redis image is set to docker.io repository (unlike other images from this operator which are set to quay.io).

https://github.com/argoproj-labs/argocd-operator/blob/master/common/defaults.go

And docker.io has pull limits.

https://docs.docker.com/docker-hub/download-rate-limit/

I would prefer to point to other image (like to quay.io or our own registry). How to do that? I don't see anything related in documentation

https://argocd-operator.readthedocs.io/en/latest/

svghadi commented 1 week ago

You can set ARGOCD_REDIS_IMAGE in operator subscription with your image. This will make the changes at global level, i.e all ArgoCD instances will use the new image.

apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: argocd-operator
spec:
  config:
    env:
      - name: ARGOCD_REDIS_IMAGE
         value: 'public.ecr.aws/docker/library/redis:5'

Alternatively, you can modify .spec.redis.image & .spec.redis.version in ArgoCD CR. This will make the changes at instance level.

apiVersion: argoproj.io/v1alpha1
kind: ArgoCD
metadata:
  name: example-argocd
spec:
  redis:
    image: public.ecr.aws/docker/library/redis
    version: 5

Docs:

  1. https://argocd-operator.readthedocs.io/en/stable/usage/environment_variables/
  2. https://argocd-operator.readthedocs.io/en/latest/reference/argocd/#redis-options