Skip to content

Commit 4526502

Browse files
authored
Added Knative CRDs and Knative CR creation logic (#117)
* Added Knative CRDs and Knative CR creation logic * Added maintanence guide for CRDs, removed annotations * CRD disclaimer * Added Knative CRDs, instructions to update them, and subscription channel * Chart version bump * typos, updated README.tmpl * update github test to installcrds upon upgrade * applying crds from local dir * pre-install hooks for namespaces * adding delete hooks to knative * Added pre-delete hooks for CRDs * changing helm hooks in knative resources
1 parent 0c943cf commit 4526502

8 files changed

Lines changed: 4737 additions & 5 deletions

File tree

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ jobs:
156156
157157
- name: Run chart-testing
158158
run: |
159+
160+
kubectl apply -f charts/orchestrator-infra/crds/knative-eventing/knative-eventing-crd.yaml
161+
kubectl apply -f charts/orchestrator-infra/crds/knative-serving/knative-serving-crd.yaml
162+
159163
ct install \
160164
--debug \
161165
--config ct-install.yaml \

charts/orchestrator-infra/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ maintainers:
1313
type: application
1414
sources:
1515
- https://github.com/redhat-developer/rhdh-chart
16-
version: 0.0.2
16+
version: 0.0.3

charts/orchestrator-infra/README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# Orchestrator Infra Chart for OpenShift (Community Version)
33

4-
![Version: 0.0.2](https://img.shields.io/badge/Version-0.0.2-informational?style=flat-square)
4+
![Version: 0.0.3](https://img.shields.io/badge/Version-0.0.3-informational?style=flat-square)
55
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
66

77
Helm chart to deploy the Orchestrator solution's required infrastructure suite on OpenShift, including OpenShift Serverless Logic Operator and OpenShift Serverless Operator.
@@ -90,7 +90,7 @@ The command removes all the Kubernetes components associated with the chart and
9090
| serverlessLogicOperator.subscription.spec.name | name of the operator package | string | `"logic-operator-rhel8"` |
9191
| serverlessLogicOperator.subscription.spec.source | name of the catalog source | string | `"redhat-operators"` |
9292
| serverlessLogicOperator.subscription.spec.sourceNamespace | | string | `"openshift-marketplace"` |
93-
| serverlessLogicOperator.subscription.spec.startingCSV | The initial version of the operator | string | `"logic-operator-rhel8.v1.35.0"` |
93+
| serverlessLogicOperator.subscription.spec.startingCSV | The initial version of the operator, must match CRDs installed by the chart | string | `"logic-operator-rhel8.v1.35.0"` |
9494
| serverlessOperator.enabled | whether the operator should be deployed by the chart | bool | `true` |
9595
| serverlessOperator.subscription.namespace | namespace where the operator should be deployed | string | `"openshift-serverless"` |
9696
| serverlessOperator.subscription.spec.channel | channel of an operator package to subscribe to | string | `"stable"` |
@@ -101,3 +101,17 @@ The command removes all the Kubernetes components associated with the chart and
101101
| tests.enabled | Whether to create the test pod used for testing the Release using `helm test`. | bool | `true` |
102102
| tests.image | Test pod image | string | `"bitnami/kubectl:latest"` |
103103

104+
### Installing Knative Eventing and Knative Serving CRDs
105+
106+
The orchestrator-infra chart requires several CRDs for Knative Eventing and Knative Serving. These CRDs will be applied prior to installing the chart, ensuring that Knative CRs can be created as part of the chart's deployment process. This approach eliminates the need to wait for the OpenShift Serverless Operator's subscription to install them beforehand.
107+
108+
The KnativeEventing and KnativeServing CRDs are required for this chart to run. These CRDs need to be present under the crds/ directory before running `helm install`.
109+
After installing the openshift-serverless subscription, more Knative CRDs will be installed on the cluster.
110+
111+
The versions of the CRDs present in the chart and the ones in the subscrtiprion must match. In order to verify the correct CRD, use this following command to extract the CRD:
112+
113+
```bash
114+
docker run --rm --entrypoint cat registry.redhat.io/openshift-serverless-1/serverless-operator-bundle:1.35.0 /manifests/operator_v1beta1_knativeeventing_crd.yaml > knative-eventing-crd.yaml
115+
116+
docker run --rm --entrypoint cat registry.redhat.io/openshift-serverless-1/serverless-operator-bundle:1.35.0 /manifests/operator_v1beta1_knativeserving_crd.yaml > knative-serving-crd.yaml
117+
```

charts/orchestrator-infra/README.md.gotmpl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,18 @@ helm uninstall my-orchestrator-infra
7575
The command removes all the Kubernetes components associated with the chart and deletes the release.
7676

7777
{{ template "chart.valuesSection" . }}
78+
79+
### Installing Knative Eventing and Knative Serving CRDs
80+
81+
The orchestrator-infra chart requires several CRDs for Knative Eventing and Knative Serving. These CRDs will be applied prior to installing the chart, ensuring that Knative CRs can be created as part of the chart's deployment process. This approach eliminates the need to wait for the OpenShift Serverless Operator's subscription to install them beforehand.
82+
83+
The KnativeEventing and KnativeServing CRDs are required for this chart to run. These CRDs need to be present under the crds/ directory before running `helm install`.
84+
After installing the openshift-serverless subscription, more Knative CRDs will be installed on the cluster.
85+
86+
The versions of the CRDs present in the chart and the ones in the subscrtiprion must match. In order to verify the correct CRD, use this following command to extract the CRD:
87+
88+
```bash
89+
docker run --rm --entrypoint cat registry.redhat.io/openshift-serverless-1/serverless-operator-bundle:1.35.0 /manifests/operator_v1beta1_knativeeventing_crd.yaml > knative-eventing-crd.yaml
90+
91+
docker run --rm --entrypoint cat registry.redhat.io/openshift-serverless-1/serverless-operator-bundle:1.35.0 /manifests/operator_v1beta1_knativeserving_crd.yaml > knative-serving-crd.yaml
92+
```

0 commit comments

Comments
 (0)