Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 22 commits into
base: develop
Choose a base branch
from

Conversation

vivekr-splunk
Copy link
Collaborator

@vivekr-splunk vivekr-splunk commented Oct 28, 2024

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:

  • Need: Separate app deployment processes for each custom resource to allow independent deployment at any time during the day, rather than a unified deployment after hours.
  • Solution: A unique ConfigMap per CR instance, allowing isolated manual app deployments through a status field update in the ConfigMap.

Key Changes

  1. Auto-generation of ConfigMaps per CR:

    • Each Custom Resource instance now has a dedicated ConfigMap and field for manual 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 manualUpdate 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 manualUpdate to "off" upon completion.
  3. Fallback Mechanism for Missing CR-Specific ConfigMaps:

    • If a CR-specific ConfigMap do not have entry for manual app management manualUpdate 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

  • Unit Tests: Added unit tests for handling ConfigMap updates, fallback logic, and status monitoring.
  • Integration Tests: Validated app deployment functionality per instance using dedicated ConfigMaps.
  • Customer Scenario Testing: Simulated scenarios based on Schwarz's environment to verify independent app deployments without interference.

Next Steps

  • Migration Considerations: Documentation includes instructions for transitioning existing installations to the new ConfigMap model.
  • Additional Observability: Log outputs confirm whether specific or fallback ConfigMaps are used, providing insights for troubleshooting.

Related Issues

  • Closes: CSPL-2966

Signed-off-by: Vivek Reddy <vivekr@splunk.com>
@vivekr-splunk vivekr-splunk changed the base branch from main to develop October 28, 2024 23:34
@vivekr-splunk vivekr-splunk self-assigned this Oct 28, 2024
Signed-off-by: Vivek Reddy <vivekr@splunk.com>
Signed-off-by: Vivek Reddy <vivekr@splunk.com>
Signed-off-by: Vivek Reddy <vivekr@splunk.com>
Signed-off-by: Vivek Reddy <vivekr@splunk.com>
Signed-off-by: Vivek Reddy <vivekr@splunk.com>
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.

1 participant