Skip to content

Add PKO (Package Operator) deployment manifests#286

Open
anispate wants to merge 2 commits intoopenshift:mainfrom
anispate:add-pko-manifests
Open

Add PKO (Package Operator) deployment manifests#286
anispate wants to merge 2 commits intoopenshift:mainfrom
anispate:add-pko-manifests

Conversation

@anispate
Copy link
Contributor

@anispate anispate commented Mar 4, 2026

Summary

This PR adds Package Operator (PKO) deployment configuration to migrate osd-metrics-exporter from OLM (Operator Lifecycle Manager) to PKO.

PKO is a more lightweight deployment model that packages all operator manifests into a container image, deployed via a ClusterPackage custom resource.

Changes

Generated via boilerplate PKO migration script:

  • .tekton/osd-metrics-exporter-pko-*.yaml - Konflux build pipelines for PKO image
  • build/Dockerfile.pko - Dockerfile to build PKO package image
  • deploy_pko/ - PKO manifests (RBAC, Deployment, PackageManifest)
  • deploy_pko/Cleanup-OLM-Job.yaml - Job to clean up old OLM resources
  • hack/pko/clusterpackage.yaml - ClusterPackage template for deployment

Manual fixes applied (same as aws-vpce-operator SREP-3729):

  1. Added OPERATOR_IMAGE parameter and config.image to ClusterPackage template
  2. Fixed manifest.yaml schema (type: object was incorrectly nested inside properties)
  3. Added Namespace resource (was not in deploy/ directory, required for PKO)

Migration Path

  1. This PR: Add PKO manifests to the repository
  2. Konflux: Register PKO component and update ReleasePlanAdmission in konflux-release-data
  3. App-Interface: Create PKO SAAS file for deployment tracking
  4. Integration Testing: Deploy to integration environment (hivei01ue1)
  5. Gradual Rollout: Deploy to stage, then production
  6. OLM Cleanup: Deploy Cleanup-OLM-Job to remove old OLM resources

Testing Plan

After this PR merges and subsequent MRs are deployed:

1. Verify Konflux PKO Image Build

# Check that PKO package image builds successfully
# Expected image: quay.io/redhat-services-prod/openshift/osd-metrics-exporter-pko

2. Integration Deployment Validation (hivei01ue1)

# Verify ClusterPackage is created
oc get ClusterPackage -A | grep osd-metrics-exporter

# Check operator pods are running
oc get pods -n openshift-osd-metrics-exporter

# Verify deployment is healthy
oc get deployment -n openshift-osd-metrics-exporter osd-metrics-exporter -o yaml

# Check operator logs for errors
oc logs -n openshift-osd-metrics-exporter -l name=osd-metrics-exporter

3. Functional Validation

# Verify operator is collecting metrics
oc get --raw /metrics | grep osd_

# Check SelectorSyncSets are being created (if applicable)
oc get SelectorSyncSet | grep osd-metrics-exporter

4. Compare PKO vs OLM

  • Ensure PKO deployment provides same functionality as OLM
  • No service disruption during migration
  • Same resource limits and configurations

Related

  • Reference: SREP-3729 (aws-vpce-operator PKO migration)
  • Parent: SREP-3265 (osd-metrics-exporter Konflux migration Phase 2)
  • Epic: SREP-3260 (OSD operators Konflux migration)

Follow-up MRs

After this merges:

  1. konflux-release-data: Register osd-metrics-exporter-pko component
  2. app-interface: Create PKO SAAS file for integration deployment
  3. app-interface: Add stage deployment targets
  4. app-interface: Add production deployment targets

Generated with Claude Code

This commit adds Package Operator (PKO) deployment configuration to migrate
osd-metrics-exporter from OLM (Operator Lifecycle Manager) to PKO.

PKO is a more lightweight deployment model that packages all operator manifests
into a container image, deployed via a ClusterPackage custom resource.

Added files:
- .tekton/osd-metrics-exporter-pko-*.yaml: Konflux build pipelines for PKO image
- build/Dockerfile.pko: Dockerfile to build PKO package image
- deploy_pko/: PKO manifests (RBAC, Deployment, PackageManifest)
- deploy_pko/Cleanup-OLM-Job.yaml: Job to clean up old OLM resources
- hack/pko/clusterpackage.yaml: ClusterPackage template for deployment

Related: SREP-3729
@openshift-ci openshift-ci bot requested review from Mhodesty and ritmun March 4, 2026 19:09
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 4, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: anispate

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 4, 2026
@codecov-commenter
Copy link

codecov-commenter commented Mar 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 45.36%. Comparing base (79d05f6) to head (d9d1ee2).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #286   +/-   ##
=======================================
  Coverage   45.36%   45.36%           
=======================================
  Files          13       13           
  Lines         690      690           
=======================================
  Hits          313      313           
  Misses        363      363           
  Partials       14       14           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Applied the same manual fixes that were needed for aws-vpce-operator (SREP-3729):

1. Add OPERATOR_IMAGE parameter to clusterpackage.yaml template
   - Required to pass operator image to PKO deployment
   - Added config.image field in ClusterPackage spec

2. Fix manifest.yaml schema
   - Move 'type: object' to correct level (was incorrectly nested inside properties)
   - Ensures proper OpenAPI v3 schema validation

3. Add Namespace resource
   - deploy_pko/Namespace-openshift-osd-metrics-exporter.yaml
   - Includes cluster-monitoring label and PKO phase annotation
   - Was not in original deploy/ directory, added manually like AVO

These fixes ensure PKO deployment works correctly following the proven
aws-vpce-operator migration pattern.
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 4, 2026

@anispate: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants