Skip to content

Add solar OCM components#39

Merged
yocaba merged 3 commits into
mainfrom
feat/add-solar
Apr 29, 2026
Merged

Add solar OCM components#39
yocaba merged 3 commits into
mainfrom
feat/add-solar

Conversation

@yocaba
Copy link
Copy Markdown
Contributor

@yocaba yocaba commented Apr 24, 2026

Adds solar and solar-discovery following the guidance in the repo.

@yocaba yocaba marked this pull request as ready for review April 24, 2026 13:58
Copy link
Copy Markdown
Contributor

@olzemal olzemal left a comment

Choose a reason for hiding this comment

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

This might be user error but i get this error message when trying to deploy:

$ k apply -f bootstrap-test.yaml
namespace/ocm-system unchanged
resource mapping not found for name: "solution-arsenal-minimal" namespace: "default" from "bootstrap-test.yaml": no matches for kind "SolutionArsenalBootstrap" in version "v1alpha1"
ensure CRDs are installed first
Error from server (BadRequest): error when creating "bootstrap-test.yaml": Repository in version "v1alpha1" cannot be handled as a Repository: strict decoding error: unknown field "spec.url"
Error from server (BadRequest): error when creating "bootstrap-test.yaml": Component in version "v1alpha1" cannot be handled as a Component: strict decoding error: unknown field "spec.repository", unknown field "spec.version"
Error from server (BadRequest): error when creating "bootstrap-test.yaml": Resource in version "v1alpha1" cannot be handled as a Resource: strict decoding error: unknown field "spec.component"
Error from server (BadRequest): error when creating "bootstrap-test.yaml": Deployer in version "v1alpha1" cannot be handled as a Deployer: strict decoding error: unknown field "spec.resource"

Reproduce:

kind create cluster
helm install kro oci://registry.k8s.io/kro/charts/kro   --namespace kro-system   --create-namespace
flux install
helm install ocm-k8s-toolkit "oci://ghcr.io/open-component-model/kubernetes/controller/chart:0.5.0-rc.1"   --namespace ocm-k8s-toolkit-system   --create-namespace
k apply -f bootstrap-test.yaml
# bootstrap-test.yaml
---
# Bootstrap configuration for SolutionArsenal component deployment
# This file uses OCM K8s Toolkit to fetch and deploy the ResourceGraphDefinition
# from the OCM component, enabling self-contained deployment with automatic
# image localization when components are transferred between registries.

apiVersion: v1
kind: Namespace
metadata:
  name: ocm-system
---
# Optional: Secret for private registry access
# Uncomment and configure if using a private OCI registry
# apiVersion: v1
# kind: Secret
# metadata:
#   name: ocm-registry-credentials
#   namespace: ocm-system
# type: kubernetes.io/dockerconfigjson
# data:
#   .dockerconfigjson: <base64-encoded-docker-config>
---
# OCM Repository - Points to the OCI registry containing OCM components
apiVersion: delivery.ocm.software/v1alpha1
kind: Repository
metadata:
  name: solution-arsenal-repo
  namespace: ocm-system
spec:
  # Replace with your OCM registry URL
  url: oci://ghcr.io/olzemal/ocm-components
  # Optional: Reference secret for private registry access
  # secretRef:
  #   name: ocm-registry-credentials
---
# OCM Component - References the specific SolutionArsenal component
apiVersion: delivery.ocm.software/v1alpha1
kind: Component
metadata:
  name: solution-arsenal-component
  namespace: ocm-system
spec:
  component: opendefense.cloud/solution-arsenal
  version: 0.1.0
  repository:
    name: solution-arsenal-repo
  # Optional: Reference secret for private registry access
  # secretRef:
  #   name: ocm-registry-credentials
---
# OCM Resource - Fetches the ResourceGraphDefinition from the component
apiVersion: delivery.ocm.software/v1alpha1
kind: Resource
metadata:
  name: solution-arsenal-rgd
  namespace: ocm-system
spec:
  resource: solution-arsenal-rgd
  component:
    name: solution-arsenal-component
  # Optional: Reference secret for private registry access
  # secretRef:
  #   name: ocm-registry-credentials
---
# OCM Deployer - Applies the RGD content to the cluster
# Note: This is a cluster-scoped operation that creates the RGD CRD
apiVersion: delivery.ocm.software/v1alpha1
kind: Deployer
metadata:
  name: solution-arsenal-rgd-deployer
  namespace: ocm-system
spec:
  resource:
    name: solution-arsenal-rgd
  # Optional: Reference secret for private registry access
  # secretRef:
  #   name: ocm-registry-credentials
---
# Example SolutionArsenal Bootstrap instance - Minimal configuration
# This creates an actual deployment using the RGD
apiVersion: v1alpha1
kind: SolutionArsenalBootstrap
metadata:
  name: solution-arsenal-minimal
  namespace: default
spec:
  # Registry configuration
  registry:
    url: ghcr.io  # Replace with your registry if using a private one

  # Component reference
  componentName: opendefense.cloud/solution-arsenal
  componentVersion: 0.1.0

  # Deployment configuration
  namespace: solar-system

  # Use minimal profile for development/testing
  deploymentProfile: minimal

  # Replica configuration for minimal setup
  apiServerReplicas: 1
  controllerReplicas: 1
  etcdReplicas: 1

  # etcd storage configuration
  etcdStorageSize: 1Gi
  # etcdStorageClass: ""  # Leave empty to use default storage class

  # cert-manager required for TLS
  certManagerEnabled: true

  # Monitoring disabled for minimal profile
  metricsEnabled: false
  prometheusEnabled: false

  # Optional: Reference to OCM config secret for private registries
  # ocmConfigSecretName: ocm-registry-credentials

@yocaba
Copy link
Copy Markdown
Contributor Author

yocaba commented Apr 29, 2026

Thanks for double-checking. You are right, the kro RGD template in this PR was broken. (And it is for other components like artifact-conduit as well.) Since we don't need the kro RGD template for now, I've removed it completely. We add one once we need it. I'll remove the RGD template for artifact-conduit is a separate PR.

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