OT-CONTAINER-KIT / helm-charts

A repository which that will contain helm charts with best and security practices.
https://ot-container-kit.github.io/helm-charts
49 stars 84 forks source link

Missing serviceMonitor in redis-sentinel chart #180

Closed vramperez closed 1 month ago

vramperez commented 8 months ago

Does this issue reproduce with the latest release? Yes

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

kubectl version v1.28.2
$ kubectl version

What did you do? I am deploying the helm-charts of redis-operator, redis-replication and redis-sentinel, activating the exporter and serviceMonitor of redis-replication and redis-sentinel. More specifically, I am using these values:

# redis-operator
affinity:
  nodeAffinity:
    preferredDuringSchedulingIgnoredDuringExecution:
    - preference:
        matchExpressions:
        - key: ghale.help/type
          operator: In
          values:
          - application
      weight: 100
tolerations:
- effect: NoExecute
  key: node.kubernetes.io/not-ready
  operator: Equal
  tolerationSeconds: 5
- effect: NoExecute
  key: node.kubernetes.io/unreachable
  operator: Equal
  tolerationSeconds: 5
# redis-replication
affinity:
  nodeAffinity:
    preferredDuringSchedulingIgnoredDuringExecution:
    - preference:
        matchExpressions:
        - key: ghale.help/type
          operator: In
          values:
          - application
      weight: 100
redisExporter:
  enabled: true
redisReplication:
  clusterSize: 3
  tag: latest
serviceMonitor:
  enabled: true
  namespace: internal-develop-ci
tolerations:
- effect: NoExecute
  key: node.kubernetes.io/not-ready
  operator: Equal
  tolerationSeconds: 5
- effect: NoExecute
  key: node.kubernetes.io/unreachable
  operator: Equal
  tolerationSeconds: 5
# redis-sentinel
affinity:
  nodeAffinity:
    preferredDuringSchedulingIgnoredDuringExecution:
    - preference:
        matchExpressions:
        - key: ghale.help/type
          operator: In
          values:
          - application
      weight: 100
redisExporter:
  enabled: true
redisSentinel:
  clusterSize: 3
redisSentinelConfig:
  masterGroupName: mymaster
  redisReplicationName: redis-replication
serviceMonitor:
  enabled: true
  namespace: internal-develop-ci
tolerations:
- effect: NoExecute
  key: node.kubernetes.io/not-ready
  operator: Equal
  tolerationSeconds: 5
- effect: NoExecute
  key: node.kubernetes.io/unreachable
  operator: Equal
  tolerationSeconds: 5

What did you expect to see? When I enabled the serviceMonitor for redis-sentinel, I expected to have a serviceMonitor for Sentinel, as the values in the chart suggest that it does. Also, the configuration is very similar to redis-replication, and this chart does display the serviceMonitor.

What did you see instead? There is no serviceMonitor for the redis-sentinel chart, despite having the chart values set to enable it. I don't know if it's a bug in the redis-sentinel chart values, or if the serviceMonitor resource is missing. If it is the latter, if you confirm me that this is the case, I could do the PR by adding it, following the example of the redis-replication chart.

vramperez commented 1 month ago

Moved to https://github.com/OT-CONTAINER-KIT/redis-operator/issues/1042