Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@ else
$(warning Could not find docker or podman in path! This may result in targets requiring a container runtime failing!)
endif

KUSTOMIZE_STANDARD_OVERLAY := config/overlays/standard
KUSTOMIZE_STANDARD_E2E_OVERLAY := config/overlays/standard-e2e
KUSTOMIZE_EXPERIMENTAL_OVERLAY := config/overlays/experimental
KUSTOMIZE_EXPERIMENTAL_E2E_OVERLAY := config/overlays/experimental-e2e

export STANDARD_RELEASE_MANIFEST := operator-controller.yaml
export STANDARD_RELEASE_INSTALL := install.sh
export EXPERIMENTAL_RELEASE_MANIFEST := operator-controller-experimental.yaml
Expand Down Expand Up @@ -204,8 +199,8 @@ bingo-upgrade: $(BINGO) #EXHELP Upgrade tools
.PHONY: verify-crd-compatibility
CRD_DIFF_ORIGINAL_REF := git://main?path=
CRD_DIFF_UPDATED_REF := file://
CRD_DIFF_OPCON_SOURCE := config/base/operator-controller/crd/standard/olm.operatorframework.io_clusterextensions.yaml
CRD_DIFF_CATD_SOURCE := config/base/catalogd/crd/standard/olm.operatorframework.io_clustercatalogs.yaml
CRD_DIFF_OPCON_SOURCE := helm/olmv1/base/operator-controller/crd/standard/olm.operatorframework.io_clusterextensions.yaml
CRD_DIFF_CATD_SOURCE := helm/olmv1/base/catalogd/crd/standard/olm.operatorframework.io_clustercatalogs.yaml
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we actually need the base?
It feels more like a kustomize-style layout.

Since everything is already managed under Helm, why wouldn’t those manifests live under templates instead?
Also, I noticed we have CRDs under templates — shouldn’t this be consistent?

Copy link
Contributor Author

@tmshort tmshort Sep 23, 2025

Choose a reason for hiding this comment

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

The base directory is storing the output of the CRDs - these is the "raw" CRDs. This is kept outside of the templates directory and is purposely not put into a crds directory.

Because the CRDs are be conditionally included into the manifest (i.e. standard vs experimental), and because they are autogenerated, and because we don't want to go through a messy process of post-processing them to include Helm directives, they are put into that base directory.

So, the CRDs are not under templates directory, but instead those files in the templates/crds directory conditionally include CRDs from the base directory:

{{- if .Values.options.catalogd.enabled }}
{{- if (eq .Values.options.featureSet "standard") }}
{{ tpl (.Files.Get "base/catalogd/crd/standard/olm.operatorframework.io_clustercatalogs.yaml") . }}
{{- else if (eq .Values.options.featureSet "experimental") }}
{{ tpl (.Files.Get "base/catalogd/crd/experimental/olm.operatorframework.io_clustercatalogs.yaml") . }}
{{- else }}
{{- fail "options.featureSet must be set to one of: {standard,experimental}" }}
{{- end }}
{{- end }}

{{- if .Values.options.operatorController.enabled }}
{{- if (eq .Values.options.featureSet "standard") }}
{{- /* Add when GA: tpl (.Files.Get "base/operator-controller/crd/standard/olm.operatorframework.io_clusterextensionrevisionss.yaml") . */}}
{{- else if (eq .Values.options.featureSet "experimental") }}
{{ tpl (.Files.Get "base/operator-controller/crd/experimental/olm.operatorframework.io_clusterextensionrevisions.yaml") . }}
{{- else }}
{{- fail "options.featureSet must be set to one of: {standard,experimental}" }}
{{- end }}
{{- end }}

(i.e. We don't want to do any post-processing of the CRDs to include the above.)

This PR, because it's removing the config directory, is merely changing the location of where the "raw" CRDs live. It is NOT changing the process of how they are generated nor included into the Helm manifest.

CRD_DIFF_CONFIG := crd-diff-config.yaml
verify-crd-compatibility: $(CRD_DIFF) manifests
$(CRD_DIFF) --config="${CRD_DIFF_CONFIG}" "${CRD_DIFF_ORIGINAL_REF}${CRD_DIFF_OPCON_SOURCE}" ${CRD_DIFF_UPDATED_REF}${CRD_DIFF_OPCON_SOURCE}
Expand Down
2 changes: 1 addition & 1 deletion api/v1/clustercatalog_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"sigs.k8s.io/yaml"
)

const crdFilePath = "../../config/base/catalogd/crd/standard/olm.operatorframework.io_clustercatalogs.yaml"
const crdFilePath = "../../helm/olmv1/base/catalogd/crd/standard/olm.operatorframework.io_clustercatalogs.yaml"

func TestImageSourceCELValidationRules(t *testing.T) {
validators := fieldValidatorsFromFile(t, crdFilePath)
Expand Down
84 changes: 1 addition & 83 deletions config/README.md
Original file line number Diff line number Diff line change
@@ -1,87 +1,5 @@
# OPERATOR-CONTROLLER CONFIGURATION

The main kustomize targets are all located in the `config/overlays` directory. These are the directories that should be passed to kustomize:

e.g.
```
kustomize build config/overlays/standard > standard.yaml
```

# Overlays

All other directories are in support of of these overlays.

## config/overlays/basic-olm

This includes basic support for an insecure (non-TLS) OLMv1 deployment.

## config/overlays/standard

This includes support for a secure (i.e. with TLS) configuration of OLMv1. This configuration requires cert-manager.

This configuration is used to generate `manifests/standard.yaml`.

## config/overlays/standard-e2e

This provides additional configuration support for end-to-end testing, including code coverage. This configuration requires cert-manager.

This configuration is used to generate `manifests/standard-e2e.yaml`.

## config/overlays/prometheus

Overlay containing manifest files which enable prometheus scraping of the catalogd and operator-controller pods. Used during e2e runs to measure performance over the lifetime of the test.

These manifests will not end up in the `manifests/` folder, as they must be applied in two distinct steps to avoid issues with applying prometheus CRDs and CRs simultaneously.

Performance alert settings can be found in: `config/overlays/prometheus/prometheus_rule.yaml`

## config/overlays/experimental

This provides additional configuration used to support experimental features, including CRDs. This configuration requires cert-manager.

This configuration is used to generate `manifests/experimental.yaml`.

## config/overlays/experimental-e2e

This provides experimental configuration and support for end-to-end testing, includng code coverage. This configuration requires cert-manager.

This configuration is used to generate `manifests/experimental-e2e.yaml`.

## config/overlays/tilt-local-dev

This provides configuration for Tilt debugging support.

# Components

Components are the kustomize configuration building blocks.

## config/components/base

This directory provides multiple configurations for organizing the base configuration into standard and experimental configurations.

:bangbang: *The following rules should be followed when configurating a feature:*

* Feature components that are GA'd and should be part of the standard manifest should be listed in `config/components/base/common/kustomization.yaml`. This `commmon` kustomization file is included by *both* the **standard** and **experimental** configurations.
* Feature components that are still experimental and should be part of the standard manifest should be listed only in `config/components/base/experimental/kustomization.yaml`.

## config/components/features

This directory contains contains configuration for features (experimental or otherwise).

:bangbang: *Feature configuration should be placed into a subdirectory here.*

## config/components/cert-manager

This directory provides configuration for using cert-manager with OLMv1.

## config/components/e2e

This directory provides configuration for end-to-end testing of OLMv1.

# Base Configuration

The `config/base` directory contains the base kubebuilder-generated configuration, along with CRDs.

# Samples
## Samples

The `config/samples` directory contains example ClusterCatalog and ClusterExtension resources.
2 changes: 0 additions & 2 deletions config/base/catalogd/crd/OWNERS

This file was deleted.

2 changes: 0 additions & 2 deletions config/base/catalogd/crd/experimental/kustomization.yaml

This file was deleted.

Loading
Loading