Skip to content

Create a simple k8s job that can install or upgrade Gateway API CRDs #2678

@robscott

Description

@robscott

What would you like to be added:
We could create a simple Kubernetes Job that could be bundled with implementations to install Gateway API CRDs if they don't already exist. This job would have the following configuration:

  • Desired bundle version
  • Desired release channel
  • Optional: Desired subset of CRDs

This would need to have the following logic for each Gateway API CRD:

  1. If Gateway API CRD exists:
    a. Skip or error if existing CRD is from a different release channel or does not have expected bundle version or release channel labels
    b. Upgrade to configured bundle version if existing CRD has older version
    c. Skip if existing CRD has version >= to version configured by job
  2. If Gateway API CRD does not exist in cluster, install it.

All of this could theoretically be built with the registry.k8s.io/kubectl image.

Why this is needed:
Many implementations want to have an easy way to bundle CRDs with their installation, but they also don't want to conflict with other installations of Gateway API in the cluster. This could provide a reasonably safe mechanism to ensure that CRDs were present and at a min version. This could also be bundled in a Helm chart #1590 to bypass some of the limitations of including CRDs directly in a Helm chart.

Note: This is not ready to work on yet. We first need to get some feedback on this idea to ensure that it actually makes sense before starting any development.

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions