Add config-as-code Secret template to Helm chart - #357
openshift-merge-bot[bot] merged 1 commit into
Conversation
|
Warning Review limit reached
More reviews will be available in 45 minutes and 9 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository: osac-project/coderabbit/.coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (2)
WalkthroughA new Helm template Config-as-Code Secret
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 10 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (10 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@charts/aap/values.yaml`:
- Around line 26-28: The default values for projectGitUri and projectGitBranch
are currently empty strings, which when configAsCode.eeImage is enabled, will
render empty environment variables AAP_PROJECT_GIT_URI and
AAP_PROJECT_GIT_BRANCH that override Ansible's intended fallback defaults.
Replace the empty string defaults for projectGitUri and projectGitBranch with
non-empty placeholder or fallback values that prevent these environment
variables from being set to empty strings in the generated Secret, ensuring
Ansible's default behavior is preserved when these values are not explicitly
configured.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: b6b47a94-304c-43cb-a223-3fc5cd02e099
📒 Files selected for processing (2)
charts/aap/templates/config-as-code-secret.yamlcharts/aap/values.yaml
| eeImage: "" | ||
| projectGitUri: "" | ||
| projectGitBranch: "" |
There was a problem hiding this comment.
Set non-empty defaults for Git URI/branch to avoid overriding runtime defaults with empty env vars.
With current defaults, enabling configAsCode.eeImage can render a Secret that sets AAP_PROJECT_GIT_URI and AAP_PROJECT_GIT_BRANCH to empty strings, which may bypass Ansible’s intended fallback defaults and break project sync.
Suggested fix
configAsCode:
manifestSecret: "config-as-code-manifest-ig"
secret: "config-as-code-ig"
eeImage: ""
- projectGitUri: ""
- projectGitBranch: ""
+ projectGitUri: "https://github.com/osac-project/osac-aap.git"
+ projectGitBranch: "main"Evidence: collections/ansible_collections/osac/config_as_code/playbooks/vars/config.yml:11-15 defines defaults for these env vars only when they are not set.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| eeImage: "" | |
| projectGitUri: "" | |
| projectGitBranch: "" | |
| eeImage: "" | |
| projectGitUri: "https://github.com/osac-project/osac-aap.git" | |
| projectGitBranch: "main" |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@charts/aap/values.yaml` around lines 26 - 28, The default values for
projectGitUri and projectGitBranch are currently empty strings, which when
configAsCode.eeImage is enabled, will render empty environment variables
AAP_PROJECT_GIT_URI and AAP_PROJECT_GIT_BRANCH that override Ansible's intended
fallback defaults. Replace the empty string defaults for projectGitUri and
projectGitBranch with non-empty placeholder or fallback values that prevent
these environment variables from being set to empty strings in the generated
Secret, ensuring Ansible's default behavior is preserved when these values are
not explicitly configured.
Creates the config-as-code-ig Secret from values (eeImage, projectGitUri, projectGitBranch) when eeImage is set. This secret is consumed by prepare-fulfillment-service.sh to sync the AAP project to the correct git branch. Guarded by eeImage being set so kustomize-path users are unaffected. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6f51b31 to
2160ec4
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jhernand, omer-vishlitzky The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Summary
charts/aap/templates/config-as-code-secret.yaml— creates theconfig-as-code-igSecret from Helm valuesAAP_EE_IMAGE,AAP_PROJECT_GIT_URI,AAP_PROJECT_GIT_BRANCHwhichprepare-fulfillment-service.shreads to sync the AAP projectconfigAsCode.eeImagebeing set — kustomize-path users (where the secret is created bysecretGenerator) are unaffectedeeImage,projectGitUri,projectGitBranchtocharts/aap/values.yamlunderconfigAsCodeNeeded for the Helm-based CI deployment path (osac-project/osac-installer#296).
🤖 Generated with Claude Code
Summary by CodeRabbit