Skip to content

Commit

Permalink
[ISSUE apache#4042] eventmesh operator (apache#4476)
Browse files Browse the repository at this point in the history
* operator init

* delete MD

* update

* add spec status controller

* update eventmesh-operator.md

* connectors operator

* update

* update controller

* update

* fix bug and test controller

* update

* add eventmesh_v1_runtime.yaml eventmesh_v1_connectors_rocketmq.yaml eventmesh_v1_runtime_cluster.yaml

* delete unnecessary files

* add license and add README.md

* update

* update

* update go.sum

* update

* update

* update

* update README.md and merge command

* update README.md and merge command
  • Loading branch information
Alonexc authored Dec 5, 2023
1 parent 2a46b82 commit 34c803b
Show file tree
Hide file tree
Showing 53 changed files with 16,507 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ header:
copyright-owner: Apache Software Foundation

paths-ignore:
- 'eventmesh-operator/config/crd/bases'
- 'eventmesh-operator/config/rbac'
- '.github/PULL_REQUEST_TEMPLATE'
- '.gitmodules'
- '**/.gitkeep'
Expand Down
4 changes: 4 additions & 0 deletions eventmesh-operator/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
# Ignore build and test binaries.
bin/
testbin/
26 changes: 26 additions & 0 deletions eventmesh-operator/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
bin
testbin/*
Dockerfile.cross

# Test binary, build with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Kubernetes Generated files - skip generated files, except for vendored files

!vendor/**/zz_generated.*

# editor and IDE paraphernalia
.idea
*.swp
*.swo
*~
50 changes: 50 additions & 0 deletions eventmesh-operator/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#
# 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.
#

# Build the manager binary
FROM golang:1.19 as builder
ARG TARGETOS
ARG TARGETARCH

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 api/ api/
COPY controllers/ controllers/

# Build
# the GOARCH has not a default value to allow the binary be built according to the host where the command
# was called. For example, if we call make docker-build in a local env which has the Apple Silicon M1 SO
# the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore,
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} 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
WORKDIR /
COPY --from=builder /workspace/manager .
USER 65532:65532

ENTRYPOINT ["/manager"]
Loading

0 comments on commit 34c803b

Please sign in to comment.