Skip to content

CNTRLPLANE-1752: Add PKI API to config.openshift.io/v1alpha1 - #2645

Merged
openshift-merge-bot[bot] merged 4 commits into
openshift:masterfrom
sanchezl:pki-config
Mar 5, 2026
Merged

CNTRLPLANE-1752: Add PKI API to config.openshift.io/v1alpha1#2645
openshift-merge-bot[bot] merged 4 commits into
openshift:masterfrom
sanchezl:pki-config

Conversation

@sanchezl

@sanchezlsanchezl commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR introduces the PKI API (config.openshift.io/v1alpha1) behind the ConfigurablePKI feature gate (TechPreview / DevPreview). It provides a cluster-scoped singleton resource that allows administrators to configure the cryptographic parameters (key algorithm, key size, elliptic curve) used for internally-managed certificates — including signer (CA), serving (TLS), and client certificates — with per-category overrides on top of a required set of defaults.

API Structure

graph TD
PKI["<b>PKI</b><br/><i>cluster-scoped singleton</i>"]
PKISpec["<b>spec</b>"]
CertMgmt["<b>certificateManagement</b><br/><i>union</i>"]
Mode["<b>mode</b><br/><i>Unmanaged | Default | Custom</i>"]
Custom["<b>custom</b><br/><i>required when mode=Custom</i>"]
Defaults["<b>defaults</b> <i>(required)</i>"]
Signers["<b>signerCertificates</b> <i>(optional)</i>"]
Serving["<b>servingCertificates</b> <i>(optional)</i>"]
Client["<b>clientCertificates</b> <i>(optional)</i>"]
KeyConfig["<b>key</b><br/><i>union: algorithm</i>"]
RSA["<b>rsa</b><br/>keySize: 2048–8192<br/><i>(multiples of 1024)</i>"]
ECDSA["<b>ecdsa</b><br/>curve: P256 | P384 | P521"]
PKI --> PKISpec --> CertMgmt
CertMgmt --> Mode
CertMgmt --> Custom
Custom --> Defaults
Custom --> Signers
Custom --> Serving
Custom --> Client
Defaults --> KeyConfig
Signers -.->|"optional override"| KeyConfig
Serving -.->|"optional override"| KeyConfig
Client -.->|"optional override"| KeyConfig
KeyConfig --> RSA
KeyConfig --> ECDSA
Loading

Modes

  • Unmanaged — The cluster does not manage certificate parameters; an external system is expected to handle PKI.
  • Default — The cluster uses its built-in default cryptographic settings (current behaviour).
  • Custom — The administrator provides explicit cryptographic parameters via custom. A defaults block is required; optional per-category overrides (signerCertificates, servingCertificates, clientCertificates) take precedence when present.

Example (Custom mode with ECDSA defaults, RSA override for signers)

apiVersion: config.openshift.io/v1alpha1kind: PKImetadata:
name: clusterspec:
certificateManagement:
mode: Customcustom:
defaults:
key:
algorithm: ECDSAecdsa:
curve: P384signerCertificates:
key:
algorithm: RSArsa:
keySize: 4096

Links

@openshift-ci-robot

Copy link
Copy Markdown

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@coderabbitai

coderabbitaiBot commented Jan 12, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a new cluster-scoped PKI custom resource under config/v1alpha1 and registers PKI and PKIList in the scheme. Introduces PKI API types (PKI, PKISpec, PKICertificateManagement, PKIProfile, CustomPKIPolicy, CertificateConfig, KeyConfig with RSA/ECDSA, overrides and enums) and PKIList. Adds autogenerated deepcopy methods, generated Swagger docs, a feature-gated CRD manifest entry for pkis.config.openshift.io (ConfigurablePKI), and test YAML covering ConfigurablePKI create/update cases.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check nameStatusExplanation
Title check✅ PassedThe title clearly and concisely summarizes the main change: adding a new PKI API to the config.openshift.io/v1alpha1 API group, which is the primary purpose of this changeset.
Docstring Coverage✅ PassedDocstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description check✅ PassedThe PR description clearly outlines the PKI API introduction, its structure, modes, and provides concrete examples related to the changeset.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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

@openshift-ciopenshift-ciBot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 12, 2026
@openshift-ci

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci

Copy link
Copy Markdown
Contributor

Hello @sanchezl! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@openshift-ciopenshift-ciBot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jan 12, 2026
@sanchezl

Copy link
Copy Markdown
ContributorAuthor

/test required

@sanchezl

Copy link
Copy Markdown
ContributorAuthor

/test unit
/test verify
/test verify-client-go
/test verify-crd-schema
/test verify-crdify
/test verify-deps
/test verify-feature-promotion

@sanchezlsanchezl changed the title pki configCNTRLPLANE-1752: Add PKI API to config.openshift.io/v1alpha1Jan 13, 2026
@openshift-ci-robotopenshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 13, 2026
@openshift-ci-robot

openshift-ci-robot commented Jan 13, 2026

Copy link
Copy Markdown

@sanchezl: This pull request references CNTRLPLANE-1752 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.22.0" version, but no target version was set.

Details

In response to this:

  • Add PKI API to config.openshift.io/v1alpha1
  • make update

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 openshift-eng/jira-lifecycle-plugin repository.

@sanchezl

Copy link
Copy Markdown
ContributorAuthor

/retest-required

Comment threadconfig/v1alpha1/types_pki.go Outdated
Comment threadconfig/v1alpha1/types_pki.go
Comment threadconfig/v1alpha1/types_pki.go Outdated
Comment threadconfig/v1alpha1/types_pki.go Outdated
Comment threadconfig/v1alpha1/types_pki.go Outdated
Comment threadconfig/v1alpha1/types_pki.go Outdated
Comment threadconfig/v1alpha1/types_pki.go Outdated
Comment threadconfig/v1alpha1/types_pki.go Outdated
Comment threadconfig/v1alpha1/types_pki.go Outdated
Comment threadconfig/v1alpha1/types_pki.go Outdated
Comment threadconfig/v1alpha1/types_pki.go
Comment threadconfig/v1alpha1/manifests/pki-certificate-override-validation.yaml Outdated
Comment threadconfig/v1alpha1/manifests/pki-certificate-override-validation.yaml Outdated
Comment threadconfig/v1alpha1/manifests/pki-certificate-override-validation.yaml Outdated
Comment threadconfig/v1alpha1/manifests/pki-certificate-override-validation.yaml Outdated
Comment threadconfig/v1alpha1/manifests/pki-certificate-override-validation.yaml Outdated
Comment threadconfig/v1alpha1/manifests/pki-certificate-override-validation.yaml Outdated
Comment threadconfig/v1alpha1/types_pki.go Outdated
Comment threadconfig/v1alpha1/types_pki.go
Comment threadconfig/v1alpha1/types_pkicertificatedefinition.go Outdated
Comment threadconfig/v1alpha1/types_pkicertificatedefinition.go Outdated
Comment threadconfig/v1alpha1/types_pkicertificatedefinition.go Outdated
Comment threadconfig/v1alpha1/types_pkicertificatedefinition.go Outdated
Comment threadconfig/v1alpha1/types_pkicertificatedefinition.go Outdated
Comment threadconfig/v1alpha1/types_pkicertificatedefinition.go Outdated
Comment threadconfig/v1alpha1/types_pkicertificatedefinition.go Outdated
Comment threadconfig/v1alpha1/types_pki.go Outdated
Comment threadconfig/v1alpha1/types_pki.go Outdated
Comment threadconfig/v1alpha1/types_pki.go Outdated
Comment threadconfig/v1alpha1/types_pki.go Outdated
Comment threadconfig/v1alpha1/types_pki.go Outdated
Comment threadconfig/v1alpha1/types_pki.go Outdated
Comment threadconfig/v1alpha1/types_pki.go Outdated
@sanchezl
sanchezl marked this pull request as ready for review February 24, 2026 21:30
@openshift-ciopenshift-ciBot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 24, 2026
@sanchezl

Copy link
Copy Markdown
ContributorAuthor

/verified by CI

@openshift-ci-robotopenshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Feb 27, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@sanchezl: This PR has been marked as verified by CI.

Details

In response to this:

/verified by CI

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 openshift-eng/jira-lifecycle-plugin repository.

@sanchezl

Copy link
Copy Markdown
ContributorAuthor

/retest required

@sanchezl

Copy link
Copy Markdown
ContributorAuthor

/retest

@everettraven

Copy link
Copy Markdown
Contributor

@sanchezl It looks like the 1.35 rebase cause some minor updates that need to be made here for verify to pass.

Rebasing on the master branch latest changes and then running PROTO_OPTIONAL=true make update should fix this up

@openshift-ciopenshift-ciBot removed the lgtm Indicates that a PR is ready to be merged. label Mar 4, 2026
@openshift-ci-robotopenshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Mar 4, 2026

@everettraveneverettraven left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm

@openshift-ciopenshift-ciBot added the lgtm Indicates that a PR is ready to be merged. label Mar 4, 2026
@openshift-ci-robot

Copy link
Copy Markdown

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aws-ovn
/test e2e-aws-ovn-hypershift
/test e2e-aws-ovn-hypershift-conformance
/test e2e-aws-ovn-techpreview
/test e2e-aws-serial-1of2
/test e2e-aws-serial-2of2
/test e2e-aws-serial-techpreview-1of2
/test e2e-aws-serial-techpreview-2of2
/test e2e-azure
/test e2e-gcp
/test e2e-upgrade
/test e2e-upgrade-out-of-change
/test minor-e2e-upgrade-minor

@openshift-ci

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: everettraven

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

@sanchezl

Copy link
Copy Markdown
ContributorAuthor

/verified by CI

@openshift-ci-robotopenshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Mar 4, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@sanchezl: This PR has been marked as verified by CI.

Details

In response to this:

/verified by CI

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 openshift-eng/jira-lifecycle-plugin repository.

@sanchezl

Copy link
Copy Markdown
ContributorAuthor

/retest

1 similar comment
@sanchezl

Copy link
Copy Markdown
ContributorAuthor

/retest

@openshift-ci

Copy link
Copy Markdown
Contributor

@sanchezl: 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by an approver from all required OWNERS files.jira/valid-referenceIndicates that this PR references a valid Jira ticket of any type.lgtmIndicates that a PR is ready to be merged.size/XXLDenotes a PR that changes 1000+ lines, ignoring generated files.verifiedSignifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@sanchezl@openshift-ci-robot@everettraven@JoelSpeed