You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/03/30 03:03:49 UTC

[GitHub] [rocketmq-operator] gobbq opened a new pull request #97: [ISSUE 96] Upgrade operator-sdk tool to version 1.16

gobbq opened a new pull request #97:
URL: https://github.com/apache/rocketmq-operator/pull/97


   **upgrade operator-sdk tool to version 1.16**
   
   - update golang sdk version to 1.16
   - keep the golang code and yaml dir structure unchanged
   - using `make` tool to build/install/… the project
   - update CRDs' apiversion to `apiextensions.k8s.io/v1`
   
   issue ref. #96 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-operator] caigy commented on a change in pull request #97: [ISSUE 96] Upgrade operator-sdk tool to version 1.16

Posted by GitBox <gi...@apache.org>.
caigy commented on a change in pull request #97:
URL: https://github.com/apache/rocketmq-operator/pull/97#discussion_r838512215



##########
File path: deploy/role.yaml
##########
@@ -1,74 +1,160 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.

Review comment:
       Please keep license

##########
File path: Dockerfile
##########
@@ -0,0 +1,46 @@
+# Build the manager binary
+FROM golang:1.16 as builder
+
+WORKDIR /workspace
+# Copy the Go Modules manifests
+COPY go.mod go.mod
+COPY go.sum go.sum
+# cache deps before building and copying source so that we don't need to re-download as much
+# and so that source changes don't invalidate our downloaded layer
+RUN go mod download
+
+# Copy the go source
+COPY main.go main.go
+COPY pkg/ pkg/
+
+# Build
+RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager main.go
+
+# Use distroless as minimal base image to package the manager binary
+# Refer to https://github.com/GoogleContainerTools/distroless for more details
+#FROM gcr.io/distroless/static:nonroot
+FROM openjdk:8-alpine
+
+# Install rocketmq release into image
+RUN apk add --no-cache bash gettext nmap-ncat openssl busybox-extras
+ENV ROCKETMQ_HOME  /home/rocketmq
+WORKDIR  ${ROCKETMQ_HOME}
+COPY rocketmq.zip ${ROCKETMQ_HOME}/rocketmq.zip

Review comment:
       It may be better to download from RocketMQ release site

##########
File path: Dockerfile
##########
@@ -0,0 +1,46 @@
+# Build the manager binary
+FROM golang:1.16 as builder
+
+WORKDIR /workspace
+# Copy the Go Modules manifests
+COPY go.mod go.mod
+COPY go.sum go.sum
+# cache deps before building and copying source so that we don't need to re-download as much
+# and so that source changes don't invalidate our downloaded layer
+RUN go mod download
+
+# Copy the go source
+COPY main.go main.go
+COPY pkg/ pkg/
+
+# Build
+RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager main.go
+
+# Use distroless as minimal base image to package the manager binary
+# Refer to https://github.com/GoogleContainerTools/distroless for more details
+#FROM gcr.io/distroless/static:nonroot
+FROM openjdk:8-alpine
+
+# Install rocketmq release into image
+RUN apk add --no-cache bash gettext nmap-ncat openssl busybox-extras
+ENV ROCKETMQ_HOME  /home/rocketmq
+WORKDIR  ${ROCKETMQ_HOME}
+COPY rocketmq.zip ${ROCKETMQ_HOME}/rocketmq.zip
+RUN set -eux; \
+    apk add --virtual .build-deps unzip; \
+    unzip rocketmq.zip; \
+	mv rocketmq-all*/* . ; \
+    chmod a+x * ; \
+	rmdir rocketmq-all* ; \
+	rm rocketmq.zip; \

Review comment:
       Can we also delete files of RocketMQ which will not be necessary in operator in the future?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org