Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redis service still exposes exporter port after disabling exporter #474

Closed
hoyhbx opened this issue Mar 29, 2023 · 0 comments · Fixed by #484
Closed

redis service still exposes exporter port after disabling exporter #474

hoyhbx opened this issue Mar 29, 2023 · 0 comments · Fixed by #484
Labels
bug Something isn't working

Comments

@hoyhbx
Copy link
Contributor

hoyhbx commented Mar 29, 2023

What version of redis operator are you using?

redis-operator version: We are using redis-operator built from the HEAD

Does this issue reproduce with the latest release?
no tested

What operating system and processor architecture are you using (kubectl version)?

kubectl version Output
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.1", GitCommit:"3ddd0f45aa91e2f30c70734b175631bec5b5825a", GitTreeState:"clean", BuildDate:"2022-05-24T12:26:19Z", GoVersion:"go1.18.2", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.4
Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.9", GitCommit:"6df4433e288edc9c40c2e344eb336f63fad45cd2", GitTreeState:"clean", BuildDate:"2022-05-19T19:53:08Z", GoVersion:"go1.16.15", Compiler:"gc", Platform:"linux/amd64"}

What did you do?

We created the Redis cluster with exporter functionality enabled.
Then we disabled the exporter functionality by setting spec.redisExporter.enabled to false.
But we found that the service objects for both RedisLeader and RedisFollowers still have the exporter port open.

  1. First deploy with exporter enabled
apiVersion: redis.redis.opstreelabs.in/v1beta1
kind: RedisCluster
metadata:
  name: test-cluster
spec:
  clusterSize: 3
  kubernetesConfig:
    image: quay.io/opstree/redis:v6.2.5
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 101m
        memory: 128Mi
      requests:
        cpu: 101m
        memory: 128Mi
  redisExporter:
    enabled: true
    image: quay.io/opstree/redis-exporter:1.0
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 100m
        memory: 128Mi
      requests:
        cpu: 100m
        memory: 128Mi
  1. Disable the exporter
apiVersion: redis.redis.opstreelabs.in/v1beta1
kind: RedisCluster
metadata:
  name: test-cluster
spec:
  clusterSize: 3
  kubernetesConfig:
    image: quay.io/opstree/redis:v6.2.5
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 101m
        memory: 128Mi
      requests:
        cpu: 101m
        memory: 128Mi
  redisExporter:
    enabled: false
    image: quay.io/opstree/redis-exporter:1.0
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 100m
        memory: 128Mi
      requests:
        cpu: 100m
        memory: 128Mi

What did you expect to see?

All exporter related functionalities are removed, and the exporter port no longer exposed

What did you see instead?

The service objects still have exporter port open

│   - name: redis-exporter                                                                                                                                                                                │
│     port: 9121                                                                                                                                                                                          │
│     protocol: TCP                                                                                                                                                                                       │
│     targetPort: 9121
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant