OT-CONTAINER-KIT / redis-operator

A golang based redis operator that will make/oversee Redis standalone/cluster/replication/sentinel mode setup on top of the Kubernetes.
https://ot-redis-operator.netlify.app/
Apache License 2.0
781 stars 216 forks source link

Clusters getting started is example is outdated in multiple places. #676

Open atropos112 opened 11 months ago

atropos112 commented 11 months ago

Which document needs to be updated? https://ot-redis-operator.netlify.app/docs/getting-started/cluster/

Expected changes Current yaml example there is

---
apiVersion: redis.redis.opstreelabs.in/v1beta1
kind: RedisCluster
metadata:
  name: redis-cluster
spec:
  clusterSize: 3
  clusterVersion: v7
  securityContext:
    runAsUser: 1000
    fsGroup: 1000
  persistenceEnabled: true
  kubernetesConfig:
    image: quay.io/opstree/redis:v7.0.5
    imagePullPolicy: Always
  storage:
    volumeClaimTemplate:
      spec:
        accessModes: ["ReadWriteOnce"]
        resources:
          requests:
            storage: 1Gi
  1. v7.0.5 is not matching the latest version that is expected to be ran (according to other part of docs) which is v7.0.12
  2. apiVersion: redis.redis.opstreelabs.in/v1beta1 is outdated and will fail with
    Error from server: error when creating "redis.yaml": conversion webhook for redis.redis.opstreelabs.in/v1beta1, Kind=RedisCluster failed: Post "https://webhook-service.redis-operator.svc:443/convert?timeout=30s": service "webhook-service" not found

unless you are running in the same namespace as where the operator is (which often is not the case surely)

  1. If you update to apiVersion: redis.redis.opstreelabs.in/v1beta1 to apiVersion: redis.redis.opstreelabs.in/v1beta2 one also needs to adjust securityContext to podSecurityContext as otherwise you will get

    ...
    strict decoding error: unknown field "spec.securityContext"
  2. It would be much appreciated to outline that v7.0.5 or v7.0.12 will not work with ARM64 devices (entrypoint.sh can't be exec'd by this arch) and if the individual is to have hope here they should use latest tag.

What version of redis-operator are you using?

redis-operator version: 0.15.9

Additional context I would appreciate re-deployment of the latest tag of quay.io/opstree/redis with a version tag to allow people with arm64 devices to not have to stick with the ever changing latest tag. I realise this is not this repo's issue, I can raise it there if needs be.

waza-ari commented 10 months ago

Thank you so much for this issue, I was affected by exactly those issues and was scratching my head for a while

arusa commented 9 months ago

Thanks a lot for the details. You saved me a lot of time! This needs to be fixed urgently!

puppetmaster commented 5 months ago

Here we use Flux2 and reconciliation failed because of :

  securityContext:
     ...
     fsGroup: 1000

This "field" does not exist in the API. After removing it from our kustomization, everything fell into place.