Skip to content

feat: add helm values template to solar as well as solar-discovery#70

Open
olzemal wants to merge 1 commit into
mainfrom
feature/solar-helm-values-template
Open

feat: add helm values template to solar as well as solar-discovery#70
olzemal wants to merge 1 commit into
mainfrom
feature/solar-helm-values-template

Conversation

@olzemal
Copy link
Copy Markdown
Contributor

@olzemal olzemal commented May 21, 2026

What

Add helm values template to solar as well as solar-discovery.

Why

The helm values template was not implemented yet.

Testing

# setup cluster with zot registry
kind create cluster
helm repo add project-zot http://zotregistry.dev/helm-charts && helm repo update
helm install zot project-zot/zot -n zot --create-namespace

NODEPORT=$(kubectl get svc -n zot zot -ojsonpath='{.spec.ports[0].nodePort}')
kubectl port-forward -n zot svc/zot $NODEPORT:5000 &

cd solution-arsenal
ocm add componentversion --version 0.2.0 --create --file ./ctf component-constructor.yaml
ocm transfer ctf --copy-resources ./ctf http://localhost:$NODEPORT/odc
ocm-kit http://localhost:$NODEPORT/odc//opendefense.cloud/solution-arsenal:0.2.0
# validate values get rendered

cd solution-arsenal-discovery
ocm add componentversion --version 0.2.0 --create --file ./ctf component-constructor.yaml
ocm transfer ctf --copy-resources ./ctf http://localhost:$NODEPORT/odc
ocm-kit http://localhost:$NODEPORT/odc//opendefense.cloud/solution-arsenal-discovery:0.2.0
# validate values get rendered

Checklist

  • Tests added/updated
  • No breaking changes (or upgrade path documented above)
  • Readable commit history (squashed and cleaned up as desired)
  • AI code review considered and comments resolved

Summary by CodeRabbit

  • Chores
    • Enhanced configuration management for solution-arsenal-discovery and solution-arsenal deployments with improved dynamic templating support.
    • Improved container image version and repository configuration across multiple service components, providing more granular control.
    • Streamlined deployment processes with centralized configuration templates, enabling more flexible and maintainable deployment management across various operational environments.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

📝 Walkthrough

Walkthrough

This change introduces Helm values template resources to two components—solution-arsenal-discovery and solution-arsenal—enabling container image repositories and tags to be dynamically populated from OCI resource metadata at chart rendering time, eliminating static image configuration.

Changes

Helm Values Templates for OCI Image Configuration

Layer / File(s) Summary
solution-arsenal-discovery helm values template
solution-arsenal-discovery/component-constructor.yaml, solution-arsenal-discovery/values.yaml.tpl
Registers a helm-values-template resource for solution-arsenal-discovery-chart and implements a Helm template that sources the discovery service image repository and tag from .OCIResources["solution-arsenal-discovery-image"].
solution-arsenal helm values template
solution-arsenal/component-constructor.yaml, solution-arsenal/values.yaml.tpl
Registers a solution-arsenal-helm-values-template resource for solution-arsenal-chart and implements a Helm template that dynamically populates image settings for four services (apiserver, renderer, controller, etcd) by looking up their OCI resources and extracting host, repository, and tag fields.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

Poem

🐇 Templates now flow from resources so bright,
OCI images configured just right,
Discovery and Arsenal aligned as one,
No static paths—let OCI run!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding Helm values templates to both the solar and solar-discovery components.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The PR description covers the main requirements (What, Why, Testing, Checklist) but lacks detail on why the helm values template is necessary and what specific problems it solves.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/solar-helm-values-template

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 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 `@solution-arsenal-discovery/component-constructor.yaml`:
- Line 23: The resource name "helm-values-template" in
component-constructor.yaml does not follow the required OCM prefix; update the
name to include the opendefense.cloud/<component> prefix (e.g., change
"helm-values-template" to "opendefense.cloud/<component>/helm-values-template"
or the project-specific opendefense.cloud/<component> format) so the entry for
the resource (the name field referencing helm-values-template) conforms to the
"opendefense.cloud/<component>" naming guideline.

In `@solution-arsenal/component-constructor.yaml`:
- Line 23: The resource name "solution-arsenal-helm-values-template" in
component-constructor.yaml must be prefixed with the OCM namespace; update the
name to follow the required pattern by changing it to
"opendefense.cloud/solution-arsenal-helm-values-template" (i.e., prefix with
"opendefense.cloud/<component>" where <component> is solution-arsenal) so the
entry complies with the naming guideline.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7716e423-ab5b-4ef9-8b9e-680582c02ae0

📥 Commits

Reviewing files that changed from the base of the PR and between 264f0e8 and e39249a.

📒 Files selected for processing (4)
  • solution-arsenal-discovery/component-constructor.yaml
  • solution-arsenal-discovery/values.yaml.tpl
  • solution-arsenal/component-constructor.yaml
  • solution-arsenal/values.yaml.tpl

Comment thread solution-arsenal-discovery/component-constructor.yaml
Comment thread solution-arsenal/component-constructor.yaml
Copy link
Copy Markdown
Contributor

@yocaba yocaba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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.

3 participants