apache / solr-operator

Official Kubernetes operator for Apache Solr
https://solr.apache.org/operator
Apache License 2.0
243 stars 112 forks source link

Adding ObservedGeneration in the CRD #650

Open Shashankft9 opened 8 months ago

Shashankft9 commented 8 months ago

Currently, its hard to tell if solr cloud deployment has changed from "x" to "y" state, or if it has changed at all after I have done some changes in the CR. Perhaps if we can add Observed Generator field and/or something like "LastTransitionTime", the CR could tell more about the current state of the solr cloud? This could be a good basis for a requirement we have, where we are tracking the transition of solr from "x" to "y".

Expected status:

status:
  backupRestoreReady: false
  internalCommonAddress: http://test-solrcloud-common.solr-cluster
  podSelector: solr-cloud=test,technology=solr-cloud
  readyReplicas: 3
  replicas: 3
  **observedGeneration: 1**
  solrNodes:
  - internalAddress: http://test-solrcloud-0.test-solrcloud-headless.solr-cluster:8983
    name: test-solrcloud-0
    nodeName: gccdelinttexw2
    ready: true
    specUpToDate: true
    version: 9.2.0
    **lastTransitionTime: 2023-10-27T12:53:56.989Z**
  - internalAddress: http://test-solrcloud-1.test-solrcloud-headless.solr-cluster:8983
    name: test-solrcloud-1
    nodeName: gccdelinttexw3
    ready: true
    specUpToDate: true
    version: 9.2.0
    **lastTransitionTime: 2023-10-27T12:54:56.989Z**
  - internalAddress: http://test-solrcloud-2.test-solrcloud-headless.solr-cluster:8983
    name: test-solrcloud-2
    nodeName: gccdelinttexw1
    ready: true
    specUpToDate: true
    version: 9.2.0
    **lastTransitionTime: 2023-10-27T12:55:56.989Z**
  upToDateNodes: 3
  version: 9.2.0
  zookeeperConnectionInfo:
    chroot: /test
    externalConnectionString: N/A
    internalConnectionString: test-solrcloud-zookeeper-0.test-solrcloud-zookeeper-headless.solr-cluster.svc.cluster.local:2181,test-solrcloud-zookeeper-1.test-solrcloud-zookeeper-headless.solr-cluster.svc.cluster.local:2181,test-solrcloud-zookeeper-2.test-solrcloud-zookeeper-headless.solr-cluster.svc.cluster.local:2181