splunk / splunk-operator

Splunk Operator for Kubernetes
Other
210 stars 115 forks source link

[Draft]: CSPL-2966: Feature: Manual App Updates per Custom Resource (CR) in Splunk Operator #1395

Open vivekr-splunk opened 3 weeks ago

vivekr-splunk commented 3 weeks ago

Description

This PR introduces a feature allowing for manual app deployment updates on a per-custom-resource (CR) basis for the Splunk Operator. With this enhancement, admins can initiate app deployments for each splunk custom resource instance independently, without impacting other instances. This capability enables more flexible and frequent app deployment schedules, addressing customer requirements for controlled and isolated updates.

Customer Requirement:


Key Changes

  1. Auto-generation of ConfigMaps per CR:

    • Each Custom Resource instance now has a dedicated ConfigMap for app management.
    • ConfigMap is named based on the associated CR type and instance, ensuring clarity and association.
    • ConfigMap is automatically deleted when the corresponding CR is deleted.
  2. Manual Trigger for App Deployment:

    • Admins can set the status to "on" in the ConfigMap to initiate app deployment for a specific CR instance.
    • The Splunk Operator detects this change, executes the app deployment, and resets the status to "off" upon completion.
  3. Fallback Mechanism for Missing CR-Specific ConfigMaps:

    • If a CR-specific ConfigMap is missing, the Splunk Operator falls back to the default ConfigMap for manual updates.
    • Logging has been added to indicate whether a specific or default ConfigMap was used for deployment.
  4. Enable/Disable Automatic Polling:

    • Automatic polling for app updates can be enabled or disabled by adjusting the appsRepoPollIntervalSeconds in each CR.
    • Documentation updates provide examples of enabling/disabling polling and manually updating the ConfigMap.
  5. Comprehensive Testing:

    • Unit tests validate ConfigMap handling and fallback scenarios.
    • Integration tests ensure app deployments function independently across multiple CRs.
    • Customer-specific scenarios simulate multiple CR deployments and isolated app updates.
  6. Documentation:

    • Updated configuration guide to reflect new ConfigMap-based manual app deployment for each CR instance.
    • Added examples for enabling/disabling automatic polling and triggering manual updates.

Testing and Verification


Next Steps


Related Issues