Skip to content

Commit ac5b27c

Browse files
committed
Add experimental manifest
This adds `manifests/experimental.yaml` The difference between the experimental manifest and the standard manifest is the presence of the experimental CRD vs the standard CRD (as of right now there is only a difference in annotations), and the feature-gated components. This change supports defining feature components in _exactly_ one place: * GA'd features are put into `components/base/common` * Feature-Gated/Experimental/TechPreview features are put into `components/base/experimental` This adds new components to make constructing the overlays easier: `components/base/common` includes everything but CRDs and experimental features: * `base/catalog` (but not CRDs) * `base/operator-controller` (but not CRDs) * `base/common` * GA'd features (currently none) `components/base/standard` adds the standard CRD: * `component/base/common` component * standard CRDs `components/base/experimental` includes the experimental CRDs and features: * `component/base/common` component * experimental CRDs * experimental (non-GA'd) features: - `components/features/synthetic-user-permissions` - `components/features/webhook-provider-certmanager` - `components/features/webhook-provider-openshift-serviceca` By necessity, this removes the crd from the `config/base/.../kustomization.yaml` files. These `kustomization.yaml` files define the namespace and prefix for resources, so we need to continue to reference them. Since the CRDs do not have a namespace, and do not use the prefix, the `crd` directory can be removed. Fix the basic-olm overlay to use the new standard component This is part of the feature-gated API functionality. Signed-off-by: Todd Short <tshort@redhat.com>
1 parent 8228000 commit ac5b27c

File tree

11 files changed

+1956
-15
lines changed

11 files changed

+1956
-15
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ endif
7373

7474
KUSTOMIZE_STANDARD_OVERLAY := config/overlays/standard
7575
KUSTOMIZE_STANDARD_E2E_OVERLAY := config/overlays/standard-e2e
76+
KUSTOMIZE_EXPERIMENTAL_OVERLAY := config/overlays/experimental
7677

7778
export RELEASE_MANIFEST := operator-controller.yaml
7879
export RELEASE_INSTALL := install.sh
@@ -82,6 +83,7 @@ export RELEASE_CATALOGS := default-catalogs.yaml
8283
MANIFEST_HOME := ./manifests
8384
STANDARD_MANIFEST := ./manifests/standard.yaml
8485
STANDARD_E2E_MANIFEST := ./manifests/standard-e2e.yaml
86+
EXPERIMENTAL_MANIFEST := ./manifests/experimental.yaml
8587
CATALOGS_MANIFEST := ./manifests/default-catalogs.yaml
8688

8789
# Manifest used by kind-deploy, which may be overridden by other targets
@@ -154,6 +156,7 @@ manifests: $(CONTROLLER_GEN) $(KUSTOMIZE) #EXHELP Generate WebhookConfiguration,
154156
mkdir -p $(MANIFEST_HOME)
155157
$(KUSTOMIZE) build $(KUSTOMIZE_STANDARD_OVERLAY) > $(STANDARD_MANIFEST)
156158
$(KUSTOMIZE) build $(KUSTOMIZE_STANDARD_E2E_OVERLAY) > $(STANDARD_E2E_MANIFEST)
159+
$(KUSTOMIZE) build $(KUSTOMIZE_EXPERIMENTAL_OVERLAY) > $(EXPERIMENTAL_MANIFEST)
157160

158161
.PHONY: generate
159162
generate: $(CONTROLLER_GEN) #EXHELP Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
# Does not include the CRD, which must be added separately (it's non-namespaced)
12
apiVersion: kustomize.config.k8s.io/v1beta1
23
kind: Kustomization
34
namespace: olmv1-system
45
namePrefix: catalogd-
56
resources:
6-
- crd
77
- rbac
88
- manager
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1+
# Does not include the CRD, which must be added separately (it's non-namespaced)
12
apiVersion: kustomize.config.k8s.io/v1beta1
23
kind: Kustomization
34
namespace: olmv1-system
45
namePrefix: operator-controller-
56
resources:
6-
- crd
77
- rbac
88
- manager
9-
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: kustomize.config.k8s.io/v1alpha1
2+
kind: Component
3+
# resources contains the minimal required base, EXCEPT CRDs
4+
resources:
5+
- ../../../base/catalogd
6+
- ../../../base/operator-controller
7+
- ../../../base/common
8+
# components should include any GA'd features (none as of now)
9+
components:
10+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: kustomize.config.k8s.io/v1alpha1
2+
kind: Component
3+
# Pull in the experimental CRDs
4+
resources:
5+
- ../../../base/catalogd/crd/experimental
6+
- ../../../base/operator-controller/crd/experimental
7+
# Pull in the component(s) common to standard and experimental
8+
components:
9+
- ../common
10+
# EXPERIMENTAL FEATURES ARE LISTED HERE
11+
- ../../features/synthetic-user-permissions
12+
- ../../features/webhook-provider-certmanager
13+
- ../../features/webhook-provider-openshift-serviceca
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: kustomize.config.k8s.io/v1alpha1
2+
kind: Component
3+
# Pull in the standard CRDs
4+
resources:
5+
- ../../../base/catalogd/crd/standard
6+
- ../../../base/operator-controller/crd/standard
7+
# Pull in the component(s) common to standard and experimental
8+
components:
9+
- ../common
10+
# GA'D FEATURES ARE LISTED HERE

config/overlays/basic-olm/kustomization.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@
22
# DO NOT ADD A NAMESPACE HERE
33
apiVersion: kustomize.config.k8s.io/v1beta1
44
kind: Kustomization
5-
resources:
6-
- ../../base/catalogd
7-
- ../../base/operator-controller
8-
- ../../base/common
5+
components:
6+
- ../../components/base/standard
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# kustomization file for secure OLMv1
2+
# DO NOT ADD A NAMESPACE HERE
3+
apiVersion: kustomize.config.k8s.io/v1beta1
4+
kind: Kustomization
5+
components:
6+
- ../../components/base/experimental
7+
# This must be last due to namespace overwrite issues of the ca
8+
- ../../components/cert-manager

config/overlays/standard-e2e/kustomization.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@
22
# DO NOT ADD A NAMESPACE HERE
33
apiVersion: kustomize.config.k8s.io/v1beta1
44
kind: Kustomization
5-
resources:
6-
- ../../base/catalogd
7-
- ../../base/operator-controller
8-
- ../../base/common
95
components:
6+
- ../../components/base/standard
107
- ../../components/e2e
118
# This must be last due to namespace overwrite issues of the ca
129
- ../../components/cert-manager

config/overlays/standard/kustomization.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
# DO NOT ADD A NAMESPACE HERE
33
apiVersion: kustomize.config.k8s.io/v1beta1
44
kind: Kustomization
5-
resources:
6-
- ../../base/catalogd
7-
- ../../base/operator-controller
8-
- ../../base/common
95
components:
6+
- ../../components/base/standard
107
# This must be last due to namespace overwrite issues of the ca
118
- ../../components/cert-manager

0 commit comments

Comments
 (0)