You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by GitBox <gi...@apache.org> on 2018/11/05 13:27:36 UTC

[GitHub] nicolaferraro closed pull request #202: Fix compatibility with operator sdk 0.0.7

nicolaferraro closed pull request #202: Fix compatibility with operator sdk 0.0.7
URL: https://github.com/apache/camel-k/pull/202
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.gitignore b/.gitignore
index 10611df8..871a20b8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
 # Binary files
-/camel-k-operator
+/camel-k
 /kamel
 
 # Released Packages
diff --git a/build/Makefile b/build/Makefile
index f087869b..bfd12c1f 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -3,7 +3,7 @@ build: build-runtime build-operator build-kamel build-compile-integration-tests
 build-go: build-embed-resources build-operator build-kamel
 
 build-operator: build-embed-resources
-	go build -o camel-k-operator ./cmd/camel-k-operator/*.go
+	go build -o camel-k ./cmd/camel-k/*.go
 
 build-kamel:
 	go build -o kamel ./cmd/kamel/*.go
@@ -42,7 +42,7 @@ generate:
 clean:
 	./mvnw clean -f ./runtime/pom.xml
 	go clean
-	rm -f camel-k-operator
+	rm -f camel-k
 	rm -f kamel
 	rm -rf tmp/_maven_output
 
diff --git a/build/travis_build.sh b/build/travis_build.sh
index 83e5d127..e7897b4e 100755
--- a/build/travis_build.sh
+++ b/build/travis_build.sh
@@ -56,7 +56,7 @@ echo "Adding maven artifacts to the image context"
 
 echo "Copying binary file to docker dir"
 mkdir -p ./tmp/_output/bin
-cp ./camel-k-operator ./tmp/_output/bin/
+cp ./camel-k ./tmp/_output/bin/
 
 echo "Building the images"
 export IMAGE=docker.io/apache/camel-k:$(./build/get_version.sh)
diff --git a/cmd/camel-k-operator/camel_k_operator.go b/cmd/camel-k/main.go
similarity index 100%
rename from cmd/camel-k-operator/camel_k_operator.go
rename to cmd/camel-k/main.go
diff --git a/cmd/kamel/kamel.go b/cmd/kamel/main.go
similarity index 100%
rename from cmd/kamel/kamel.go
rename to cmd/kamel/main.go
diff --git a/config/config.yaml b/config/config.yaml
index 71ecb897..45de9133 100644
--- a/config/config.yaml
+++ b/config/config.yaml
@@ -1,3 +1,3 @@
 apiVersion: camel.apache.org/v1alpha1
 kind: Integration
-projectName: camel-k-operator
+projectName: camel-k
diff --git a/deploy/operator-deployment-kubernetes.yaml b/deploy/operator-deployment-kubernetes.yaml
index 608f596f..c41f155b 100644
--- a/deploy/operator-deployment-kubernetes.yaml
+++ b/deploy/operator-deployment-kubernetes.yaml
@@ -24,7 +24,7 @@ spec:
           - containerPort: 60000
             name: metrics
           command:
-          - camel-k-operator
+          - camel-k
           imagePullPolicy: IfNotPresent
           env:
             - name: WATCH_NAMESPACE
@@ -32,7 +32,7 @@ spec:
                 fieldRef:
                   fieldPath: metadata.namespace
             - name: OPERATOR_NAME
-              value: "camel-k-operator"
+              value: "camel-k"
           volumeMounts:
           - mountPath: /workspace
             name: camel-k-builder
diff --git a/deploy/operator-deployment-openshift.yaml b/deploy/operator-deployment-openshift.yaml
index 58cea8a6..da0a9018 100644
--- a/deploy/operator-deployment-openshift.yaml
+++ b/deploy/operator-deployment-openshift.yaml
@@ -24,7 +24,7 @@ spec:
           - containerPort: 60000
             name: metrics
           command:
-          - camel-k-operator
+          - camel-k
           imagePullPolicy: IfNotPresent
           env:
             - name: WATCH_NAMESPACE
@@ -32,4 +32,4 @@ spec:
                 fieldRef:
                   fieldPath: metadata.namespace
             - name: OPERATOR_NAME
-              value: "camel-k-operator"
+              value: "camel-k"
diff --git a/deploy/resources.go b/deploy/resources.go
index a00e23ca..f370a581 100644
--- a/deploy/resources.go
+++ b/deploy/resources.go
@@ -2234,7 +2234,7 @@ spec:
           - containerPort: 60000
             name: metrics
           command:
-          - camel-k-operator
+          - camel-k
           imagePullPolicy: IfNotPresent
           env:
             - name: WATCH_NAMESPACE
@@ -2242,7 +2242,7 @@ spec:
                 fieldRef:
                   fieldPath: metadata.namespace
             - name: OPERATOR_NAME
-              value: "camel-k-operator"
+              value: "camel-k"
           volumeMounts:
           - mountPath: /workspace
             name: camel-k-builder
@@ -2280,7 +2280,7 @@ spec:
           - containerPort: 60000
             name: metrics
           command:
-          - camel-k-operator
+          - camel-k
           imagePullPolicy: IfNotPresent
           env:
             - name: WATCH_NAMESPACE
@@ -2288,7 +2288,7 @@ spec:
                 fieldRef:
                   fieldPath: metadata.namespace
             - name: OPERATOR_NAME
-              value: "camel-k-operator"
+              value: "camel-k"
 
 `
 	Resources["operator-role-binding.yaml"] =
diff --git a/docs/developers.adoc b/docs/developers.adoc
index ee329bde..80c29cdf 100644
--- a/docs/developers.adoc
+++ b/docs/developers.adoc
@@ -15,7 +15,7 @@ In order to build the project, you need to comply with the following requirement
 
 * **Go version 1.10+**: needed to compile and test the project. Refer to the https://golang.org/[Go website] for the installation.
 * **Dep version 0.5.0**: for managing dependencies. You can find installation instructions in the https://github.com/golang/dep[dep GitHub repository].
-* **Operator SDK v0.0.6+**: used to build the operator and the Docker images. Instructions in the https://github.com/operator-framework/operator-sdk[Operator SDK website].
+* **Operator SDK v0.0.7+**: used to build the operator and the Docker images. Instructions in the https://github.com/operator-framework/operator-sdk[Operator SDK website] (binary downloads available in the release page).
 * **GNU Make**: used to define composite build actions. This should be already installed or available as package if you have a good OS (https://www.gnu.org/software/make/).
 
 [[checking-out]]
@@ -39,7 +39,7 @@ This is a high level overview of the project structure:
 [options="header"]
 |=======================
 | Path						| Content
-| link:/cmd[/cmd]			| Contains the entry points (the *main* functions) for the **camel-k-operator** binary and the **kamel** client tool.
+| link:/cmd[/cmd]			| Contains the entry points (the *main* functions) for the **camel-k** binary and the **kamel** client tool.
 | link:/build[/build]		| Contains scripts used during make operations for building the project.
 | link:/deploy[/deploy]		| Contains Kubernetes resource files that are used by the **kamel** client during installation. The `/deploy/resources.go` file is kept in sync with the content of the directory (`make build-embed-resources`), so that resources can be used from within the go code.
 | link:/docs[/docs]			| Contains this documentation.
@@ -148,7 +148,7 @@ Sometimes it's useful to debug the code from the IDE when troubleshooting.
 
 .**Debugging the `kamel` binary**
 
-It should be straightforward: just execute the link:/cmd/kamel/kamel.go[/cmd/kamel/kamel.go] file from the IDE (e.g. Goland) in debug mode.
+It should be straightforward: just execute the link:/cmd/kamel/main.go[/cmd/kamel/main.go] file from the IDE (e.g. Goland) in debug mode.
 
 .**Debugging the operator**
 
@@ -163,13 +163,13 @@ oc scale deployment/camel-k-operator --replicas 0
 
 You can scale it back to 1 when you're done and you have updated the operator image.
 
-You can setup the IDE (e.g. Goland) to execute the link:/cmd/camel-k-operator/camel_k_operator.go[/cmd/camel-k-operator/camel_k_operator.go] file in debug mode.
+You can setup the IDE (e.g. Goland) to execute the link:/cmd/camel-k/main.go[/cmd/camel-k/main.go] file in debug mode.
 
 When configuring the IDE task, make sure to add all required environment variables in the *IDE task configuration screen*:
 
 * Set the `KUBERNETES_CONFIG` environment variable to point to your Kubernetes configuration file (usually `<homedir>/.kube/config`).
 * Set the `WATCH_NAMESPACE` environment variable to a Kubernetes namespace you have access to.
-* Set the `OPERATOR_NAME` environment variable to `camel-k-operator`.
+* Set the `OPERATOR_NAME` environment variable to `camel-k`.
 
 After you setup the IDE task, you can run and debug the operator process.
 
diff --git a/tmp/build/Dockerfile b/tmp/build/Dockerfile
index cbd151da..f0952d44 100644
--- a/tmp/build/Dockerfile
+++ b/tmp/build/Dockerfile
@@ -1,11 +1,11 @@
 FROM fabric8/s2i-java:2.3
 
-#RUN adduser -D camel-k-operator
-#USER camel-k-operator
+#RUN adduser -D camel-k
+#USER camel-k
 
 ADD tmp/_maven_output /tmp/artifacts/m2
 
-ADD tmp/_output/bin/camel-k-operator /usr/local/bin/camel-k-operator
+ADD tmp/_output/bin/camel-k /usr/local/bin/camel-k
 
 USER 0
 RUN chgrp -R 0 /tmp/artifacts/m2 \
diff --git a/tmp/build/build.sh b/tmp/build/build.sh
index 4b3d4338..6755c89f 100755
--- a/tmp/build/build.sh
+++ b/tmp/build/build.sh
@@ -11,7 +11,7 @@ fi
 
 BIN_DIR="$(pwd)/tmp/_output/bin"
 mkdir -p ${BIN_DIR}
-PROJECT_NAME="camel-k-operator"
+PROJECT_NAME="camel-k"
 REPO_PATH="github.com/apache/camel-k"
 BUILD_PATH="${REPO_PATH}/cmd/${PROJECT_NAME}"
 echo "building "${PROJECT_NAME}"..."


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services