-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from wanjunlei/master
add adapter sink
- Loading branch information
Showing
22 changed files
with
1,109 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright 2018 The KubeSphere Authors. All rights reserved. | ||
# Use of this source code is governed by a Apache license | ||
# that can be found in the LICENSE file. | ||
|
||
# Copyright 2018 The KubeSphere Authors. All rights reserved. | ||
# Use of this source code is governed by a Apache license | ||
# that can be found in the LICENSE file. | ||
|
||
FROM golang:1.13 as notification-adapter | ||
|
||
COPY cmd/main.go / | ||
COPY cmd/types.go / | ||
WORKDIR / | ||
ENV GOPROXY=https://goproxy.io | ||
RUN CGO_ENABLED=0 GO111MODULE=on go build -i -ldflags '-w -s' -o notification-adapter main.go types.go | ||
|
||
FROM alpine:3.9 | ||
|
||
COPY --from=notification-adapter /notification-adapter /usr/local/bin/ | ||
|
||
RUN adduser -D -g kubesphere -u 1002 kubesphere && \ | ||
chown -R kubesphere:kubesphere /usr/local/bin/notification-adapter && \ | ||
apk add libcap && \ | ||
setcap 'CAP_NET_BIND_SERVICE=+ep' /usr/local/bin/notification-adapter | ||
|
||
USER kubesphere | ||
CMD ["sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright 2018 The KubeSphere Authors. All rights reserved. | ||
# Use of this source code is governed by a Apache license | ||
# that can be found in the LICENSE file. | ||
|
||
IMG ?= kubespheredev/notification-adapter:v0.1.0 | ||
AMD64 ?= -amd64 | ||
|
||
all: docker-build | ||
|
||
# Build kube-audit-operator binary | ||
notification-adapter: | ||
go build -o notification-adapter cmd/main.go | ||
|
||
# Build the docker image | ||
docker-build: | ||
docker buildx build --platform linux/amd64,linux/arm64 --push -f Dockerfile -t ${IMG} . | ||
|
||
# Build the docker image for arm64 | ||
docker-build-amd64: | ||
docker build -f Dockerfile -t ${IMG}${AMD64} . | ||
|
||
# Push the docker image | ||
push-amd64: | ||
docker push ${IMG}${AMD64} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# notification-adapter | ||
|
||
Notification-adapter receive notifications from notifcation manager and export with the socket. |
Oops, something went wrong.