splunk / splunk-operator

Splunk Operator for Kubernetes
Other
206 stars 114 forks source link

Splunk Operator: Indexer Clusters - Decreasing replica count does not shutdown the indexer pods #1131

Open gjanders opened 1 year ago

gjanders commented 1 year ago

Please select the type of request

Bug

Tell us more

Describe the request

Expected behavior

Splunk setup on K8S helm chart overrides:

splunk-operator:
  enabled: false

indexerCluster:
  enabled: true
  name: mobiles-idxc-site1
  replicaCount: 2
  etcVolumeStorageConfig:
    ephemeralStorage: false
    storageCapacity: 5Gi
  # storageClassName: gp2

  varVolumeStorageConfig:
    ephemeralStorage: false
    storageCapacity: 1000Gi
  # storageClassName: gp2
  resources:
     requests:
       memory: "40Gi"
       cpu: "20"
     limits:
       memory: "62Gi"
       cpu: "32"
  clusterManagerRef:
    name: mobiles-cm
  defaults:
    splunk:
      multisite_master: splunk-mobiles-cm-cluster-manager-service
      site: site1
  serviceTemplate:
    spec:
      ports:
      - name: tls-s2s
        port: 9998
        protocol: TCP
        targetPort: 9998
      - name: https-hec
        port: 8087
        protocol: TCP
        targetPort: 8087
  affinity:
    ## Example: schedule Splunk instance pod on a node in zone-1a
    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
        - matchExpressions:
          - key: mobile-iot-site
            operator: In
            values:
            - "1"

Reproduction/Testing steps

K8s environment

K8s collector data(optional)

Additional context(optional)

gjanders commented 1 year ago

If I check the indexercluster CRD it says replicas "2": kubectl edit indexercluster -n mobiles ...

But when I check the statefulset it has 4 replicas, so perhaps that is why they failed to decommission as expected? Because the statefulset did not match the indexercluster CRD? (which is managed by the operator)

gjanders commented 2 months ago

FYI this is still an issue in 2.5.2. Any updates on this issue?