Add Private Action Runner feature support#2581
Draft
merchristK wants to merge 3 commits intomainfrom
Draft
Conversation
This commit adds support for the Private Action Runner feature in the
Datadog Operator, allowing users to configure PAR in the cluster agent.
Changes:
- Add PrivateActionRunnerFeatureConfig to v2alpha1 API types
- Implement privateactionrunner feature controller
- Register feature in factory and IDs
- Configure cluster agent with PAR environment variables:
- DD_PRIVATE_ACTION_RUNNER_ENABLED
- DD_PRIVATE_ACTION_RUNNER_SELF_ENROLL
- DD_PRIVATE_ACTION_RUNNER_ACTIONS_ALLOWLIST
- Generate CRDs, deepcopy, and OpenAPI schemas
- Update documentation
Example configuration:
```yaml
apiVersion: datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
name: datadog
spec:
features:
privateActionRunner:
enabled: true
selfEnroll: true
actionsAllowlist:
- com.datadoghq.gitlab.*
- com.datadoghq.script.*
- com.datadoghq.kubernetes.core.*
```
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2581 +/- ##
==========================================
- Coverage 38.03% 37.94% -0.10%
==========================================
Files 303 304 +1
Lines 26091 26153 +62
==========================================
Hits 9924 9924
- Misses 15414 15476 +62
Partials 753 753
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What does this PR do?
This PR adds support for the Private Action Runner (PAR) feature in the Datadog Operator, allowing users to configure PAR in the cluster agent via the DatadogAgent CRD.
Motivation
Currently, the Datadog Operator doesn't support configuring the Private Action Runner feature through the v2alpha1 API. Users who want to enable PAR need to manually override environment variables or use custom configurations. This PR makes PAR a first-class feature in the operator.
Changes
API Types: Added
PrivateActionRunnerFeatureConfigtov2alpha1.DatadogFeaturesenabled: Enable/disable PAR in the cluster agentselfEnroll: Configure automatic enrollment with Datadog backendactionsAllowlist: List of action patterns that PAR is allowed to executeFeature Implementation: Created
privateactionrunnerfeature packageConfigures cluster agent with appropriate environment variables:
DD_PRIVATE_ACTION_RUNNER_ENABLEDDD_PRIVATE_ACTION_RUNNER_SELF_ENROLLDD_PRIVATE_ACTION_RUNNER_ACTIONS_ALLOWLISTRegistration: Added feature to factory and IDs
Generated Files: Updated CRDs, deepcopy, OpenAPI schemas, and documentation
Example Configuration
Testing
make generate,make manifests)go build ./...)Additional Notes
This implementation follows the same pattern as other cluster-level features like
ClusterChecksandAutoscaling.