Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit 81000b4

Browse files
authored
Install the CRD before the helm charts and remove the CRD creation from the operator (#1090)
1 parent f553406 commit 81000b4

3 files changed

Lines changed: 11 additions & 8 deletions

File tree

core/cloudflow-it/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ prepare-cluster:
4646
https://github.com/lightbend/flink-operator/releases/download/v0.8.2/flink-operator-0.8.2.tgz \
4747
--set operatorVersion="v0.5.0" \
4848
--namespace cloudflow)
49+
@echo '****** Installing Cloudflow CRD'
50+
kubectl apply -f ../cloudflow-crd/kubernetes/cloudflow-crd.yaml
4951
@echo '****** Installing Cloudflow Operator'
5052
helm repo add cloudflow-helm-charts https://lightbend.github.io/cloudflow-helm-charts/ | true
5153
helm repo update

core/cloudflow-operator/src/main/scala/cloudflow/operator/Main.scala

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,9 @@ object Main extends {
144144
case Some(crd) if crd.getSpec.getVersion == App.GroupVersion =>
145145
system.log.info(s"CRD found at version ${App.GroupVersion}")
146146
case _ =>
147-
client
148-
.apiextensions()
149-
.v1beta1()
150-
.customResourceDefinitions()
151-
.inNamespace(settings.podNamespace)
152-
.withName(App.ResourceName)
153-
.create(App.Crd)
147+
system.log.error(
148+
s"Cloudflow CRD not found, please install it: 'kubectl apply -f https://raw.githubusercontent.com/lightbend/cloudflow/v${BuildInfo.version}/core/cloudflow-crd/kubernetes/cloudflow-crd.yaml'")
149+
throw new Exception("Cloudflow CRD not found")
154150
}
155151
}
156152

docs/shared-content-source/docs/modules/administration/pages/installing-cloudflow.adoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ It also shows how to install Kafka, Spark, and Flink operators that integrate wi
99
In this guide, we will use Helm to install Cloudflow.
1010
Please see xref:get-started:prepare-development-environment.adoc#_download_and_install_the_cloudflow_cli[Preparing a development environment] for how to download and install the Cloudflow CLI.
1111

12-
The first step is to create the namespace, if it does not exist yet, to install Cloudflow into:
12+
The first step is to create the Cloudflow CRD in the cluster:
13+
14+
[subs="attributes+"]
15+
kubectl apply -f https://raw.githubusercontent.com/lightbend/cloudflow/v{cloudflow-version}/core/cloudflow-crd/kubernetes/cloudflow-crd.yaml
16+
17+
next the namespace, if it does not exist yet, to install Cloudflow into:
1318

1419
kubectl create ns cloudflow
1520

0 commit comments

Comments
 (0)