How to tweak official Helm charts to prevent deploying some of the resources

570 Views Asked by At

I want to deploy Redis in Standalone mode and I believe I don't need a master Service resource type. How can I change default values.yaml to prevent deploying master Service resource? Here is the output of kubectl get all -n redis-ns:

NAME                    READY   STATUS    RESTARTS   AGE
pod/go-redis-master-0   0/1     Running   0          20s

NAME                        TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
service/go-redis-headless   ClusterIP   None            <none>        6379/TCP   20s
service/go-redis-master     ClusterIP   10.97.160.122   <none>        6379/TCP   20s

NAME                               READY   AGE
statefulset.apps/go-redis-master   0/1     20s

recap: I want to change Helm default values to prevent deploying go-redis-master Service. I only need one Headless Service.

1

There are 1 best solutions below

0
khodekazemi On BEST ANSWER

Changing some default values in Redis Helm Chart files:

architecture: replication => architecture: standalone
auth.enabled: true => auth.enabled: false
auth.sentinel: true => auth.sentinel: false

Remove helm-app/templates/master/service.yaml file to deploy Redis with one Headless Service.

Deploy with the command below:

$ helm install go-redis -f helm-folder/redis/values.yaml helm-folder/redis --namespace redis-ns