Skip to content

Conversation

akondur
Copy link
Collaborator

@akondur akondur commented Feb 2, 2021

Changes to avoid pod recycle while scaling up/down for all CRs except SHC.

  • Reverted changes made for CSPL-534
  • Sorting the container ports, tolerations, volumes, volume mounts and env variables before creation of a statefulSet.
  • Avoiding the use of SPLUNK_INDEXER_URL for the indexer CR as it is used only for non-clustering scenarios by standalone, shc CR pod containers
  • Fix/add UT.
  • "make generate" for the develop branch also generated permissions for serviceaccount manipulation for the operator. Reason for this being that "make generate" was not run in this already merged PR for service account configuration.

Short description:

In every reconcile, the statefulSet spec created by the operator is compared against the one stored in etcd. While comparing the two specs, for the fields represented by slices(ports, volume mounts etc..) the order of the elements is important i.e any change in order followed by an update of statefulSet will cause a change in the UpdatedRevision field in the StatefulSpec. This in turn triggers a pod recycle unnecessarily. To avoid the same, sort the slices during the statefulSet creation.

Note: During the update scenario, MergePodUpdates takes care of sorting.

@akondur akondur changed the title Fixes to avoid pod recycle while scaling for all CRs except SHC Avoid pod recycle while scaling for all CRs except SHC Feb 2, 2021
@smohan-splunk smohan-splunk changed the title Avoid pod recycle while scaling for all CRs except SHC CSPL-694: Avoid pod recycle while scaling for all CRs except SHC Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants