Uploaded image for project: 'Operator Runtime'
  1. Operator Runtime
  2. OPRUN-4287

Update OLMv1 bundle renderer to support DeploymentConfig

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • None
    • Product / Portfolio Work
    • False
    • Hide

      None

      Show
      None
    • False
    • 3
    • None
    • None
    • Weedle Sprint 283

      Extend the registry+v1 bundle rendering capabilities to support DeploymentConfig behavior following the design laid out in the RFC:

      https://docs.google.com/document/d/18O4qBvu5I4WIJgo5KU1opyUKcrfgk64xsI3tyXxmVEU/edit?tab=t.0#bookmark=kix.99b771noj4ep 

       

      AC: 

      1. Extend render infrastructure:

          - Add DeploymentConfig *DeploymentConfig field to render.Options struct

          - Add WithDeployementConfig(*DeploymentConfig) functional option

          - Unit tests for option application

      2. Implement core application logic:

          - Implement applyCustomConfigToDeployment(deployment *appsv1.Deployment, config *Deployment) error

          - Update BundleCSVDeploymentGenerator to call application logic for each deployment when config is present

          - Handle nil config gracefully (no-op)

        3. Implement all sub-functions following v0 behavior:

          - applyEnvironmentConfig() - merge env vars (SubscriptionConfig values override existing container vars with same name)

          - applyEnvironmentFromConfig() - append envFrom (no duplicates)

          - applyVolumeConfig() - append volumes

          - applyVolumeMountConfig() - append volume mounts

          - applyTolerationsConfig() - append tolerations (no duplicates)

          - applyResourcesConfig() - complete replacement of container resources

          - applyNodeSelectorConfig() - complete replacement of pod nodeSelector

          - applyAffinityConfig() - selective override of non-nil affinity sub-attributes

          - applyAnnotationsConfig() - merge (existing deployment/pod annotations take precedence)

        4. Comprehensive testing:

          - Unit tests for each sub-function individually with various inputs

          - Unit tests for applyCustomConfigToDeployment with complete configs

          - Integration tests for BundleCSVDeploymentGenerator with DeploymentConfig

          - Edge cases: nil values, empty configs, partial configs, conflicts, multiple containers

              anik120 Anik Bhattacharjee
              rh-ee-cchantse Catherine Chan-Tse
              None
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: