-
Notifications
You must be signed in to change notification settings - Fork 6
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 #2 from panzhen6668/main
Feat add webserver and front-end code
- Loading branch information
Showing
22 changed files
with
3,338 additions
and
0 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,22 @@ | ||
--- | ||
name: Bug Report | ||
about: Report a bug encountered while using KubeEye. | ||
labels: kind/bug | ||
|
||
--- | ||
|
||
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks! | ||
--> | ||
|
||
|
||
**What happened**: | ||
|
||
**What you expected to happen**: | ||
|
||
**How to reproduce it (as minimally and precisely as possible)**: | ||
|
||
**Anything else we need to know?**: | ||
|
||
**Environment**: | ||
- Kubeeye version: | ||
- Others: |
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,11 @@ | ||
--- | ||
name: Enhancement Request | ||
about: Suggest an enhancement to the project | ||
labels: kind/feature | ||
|
||
--- | ||
<!-- Please only use this template for submitting enhancement requests --> | ||
|
||
**What would you like to be added**: | ||
|
||
**Why is this needed**: |
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,14 @@ | ||
--- | ||
name: Question | ||
about: Question relating to KubeEye. | ||
labels: kind/question | ||
|
||
--- | ||
|
||
**Please provide an in-depth description of the question you have**: | ||
|
||
**What do you think about this question?**: | ||
|
||
**Environment**: | ||
- KubeEye version: | ||
- Others: |
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,16 @@ | ||
approvers: | ||
- pixiake | ||
- zheng1 | ||
- rayzhou2017 | ||
- LinuxSuRen | ||
|
||
reviewers: | ||
- pixiake | ||
- zheng1 | ||
- rayzhou2017 | ||
- zryfish | ||
- benjaminhuo | ||
- calvinyv | ||
- FeynmanZhou | ||
- wansir | ||
- LinuxSuRen |
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,14 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
pull-request-branch-name: | ||
separator: "-" | ||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
pull-request-branch-name: | ||
separator: "-" |
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,41 @@ | ||
# Configuration for Release Drafter: https://github.com/toolmantim/release-drafter | ||
name-template: 'v$NEXT_PATCH_VERSION 🌈' | ||
tag-template: 'v$NEXT_PATCH_VERSION' | ||
version-template: $MAJOR.$MINOR.$PATCH | ||
# Emoji reference: https://gitmoji.carloscuesta.me/ | ||
categories: | ||
- title: '🚀 Features' | ||
labels: | ||
- 'feature' | ||
- 'enhancement' | ||
- 'kind/feature' | ||
- title: '🐛 Bug Fixes' | ||
labels: | ||
- 'fix' | ||
- 'bugfix' | ||
- 'bug' | ||
- 'regression' | ||
- 'kind/bug' | ||
- title: 📝 Documentation updates | ||
labels: | ||
- 'documentation' | ||
- 'kind/documentation' | ||
- title: 👻 Maintenance | ||
labels: | ||
- chore | ||
- dependencies | ||
- 'kind/cleanup' | ||
- title: 🚦 Tests | ||
labels: | ||
- test | ||
- tests | ||
exclude-labels: | ||
- reverted | ||
- no-changelog | ||
- skip-changelog | ||
- invalid | ||
change-template: '* $TITLE (#$NUMBER) @$AUTHOR' | ||
template: | | ||
## What’s Changed | ||
$CHANGES |
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,29 @@ | ||
repository: | ||
name: kubeeye-console | ||
description: "kubeeye-console of KubeEye aims to better find various problems on Kubernetes, such as application misconfiguration, unhealthy cluster components and node problems." | ||
homepage: https://kubesphere.io/ | ||
private: false | ||
has_issues: true | ||
has_wiki: false | ||
has_downloads: false | ||
default_branch: main | ||
allow_squash_merge: true | ||
allow_merge_commit: true | ||
allow_rebase_merge: true | ||
branches: | ||
- name: main | ||
protection: | ||
required_pull_request_reviews: | ||
required_approving_review_count: 1 | ||
dismiss_stale_reviews: true | ||
require_code_owner_reviews: true | ||
dismissal_restrictions: | ||
users: [] | ||
teams: [] | ||
required_status_checks: | ||
strict: true | ||
contexts: [] | ||
enforce_admins: false | ||
restrictions: | ||
users: [] | ||
teams: [] |
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,66 @@ | ||
name: e2e-TEST | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
pull_request: | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
build-test: | ||
name: build-test | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'kubesphere/kubeeye-console' | ||
env: | ||
GO111MODULE: on | ||
steps: | ||
- name: Set up Go 1.17 | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Downloading go dependencies | ||
run: go mod tidy | ||
|
||
- name: Build command-line tool | ||
run: go install -v ./cmd/... | ||
|
||
- name: Creating kind cluster | ||
uses: helm/[email protected] | ||
|
||
- name: Run kubeeye-console | ||
run: | | ||
ke-manager | ||
push-image-to-dockerhub: | ||
runs-on: ubuntu-latest | ||
needs: [build-test] | ||
if: github.event_name == 'push' | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
with: | ||
platforms: all | ||
|
||
- name: Set up Docker buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
|
||
- name: Push image | ||
run: | | ||
REPO=kubesphere make container-cross-push |
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,14 @@ | ||
name: Release Drafter | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
update_release_draft: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: release-drafter/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,59 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Unshallow | ||
run: git fetch --prune --unshallow | ||
|
||
- name: Set up Go 1.17 | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
|
||
- name: Run GoReleaser | ||
uses: goreleaser/[email protected] | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
push-image-to-dockerhub: | ||
runs-on: ubuntu-latest | ||
needs: [goreleaser] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Get Version | ||
id: get_version | ||
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
with: | ||
platforms: all | ||
|
||
- name: Set up Docker buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
|
||
- name: Push image | ||
run: | | ||
REPO=kubesphere TAG=${{ steps.get_version.outputs.VERSION }} make container-cross-push |
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 @@ | ||
# Build the manager binary | ||
FROM golang:1.17 as builder | ||
|
||
WORKDIR /workspace | ||
COPY web/ web/ | ||
|
||
# Copy the Go Modules manifests | ||
# Use the proxy goproxy.cn in CN | ||
ENV GOPROXY https://goproxy.cn,direct | ||
COPY go.mod go.mod | ||
COPY go.sum go.sum | ||
|
||
ENV CGO_ENABLED=0 | ||
|
||
# Build | ||
RUN go install -v ./web/... | ||
|
||
FROM alpine:3.15 | ||
WORKDIR / | ||
COPY --from=builder /go/bin/web . | ||
RUN addgroup -S kubeeye -g 1000 && adduser -S kubeeye -G kubeeye -u 1000 | ||
USER 1000:1000 | ||
|
||
ENTRYPOINT ["/web"] |
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,53 @@ | ||
module github.com/kubesphere/kubeeye-console | ||
|
||
go 1.17 | ||
|
||
require ( | ||
k8s.io/apimachinery v0.23.5 | ||
k8s.io/apiserver v0.23.5 | ||
k8s.io/client-go v0.23.5 | ||
k8s.io/klog v1.0.0 | ||
) | ||
|
||
require ( | ||
github.com/beorn7/perks v1.0.1 // indirect | ||
github.com/blang/semver v3.5.1+incompatible // indirect | ||
github.com/cespare/xxhash/v2 v2.1.1 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/emicklei/go-restful v2.9.5+incompatible // indirect | ||
github.com/go-logr/logr v1.2.0 // indirect | ||
github.com/gogo/protobuf v1.3.2 // indirect | ||
github.com/golang/protobuf v1.5.2 // indirect | ||
github.com/google/go-cmp v0.5.5 // indirect | ||
github.com/google/gofuzz v1.1.0 // indirect | ||
github.com/google/uuid v1.1.2 // indirect | ||
github.com/imdario/mergo v0.3.5 // indirect | ||
github.com/json-iterator/go v1.1.12 // indirect | ||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect | ||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
github.com/modern-go/reflect2 v1.0.2 // indirect | ||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect | ||
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect | ||
github.com/prometheus/client_golang v1.11.0 // indirect | ||
github.com/prometheus/client_model v0.2.0 // indirect | ||
github.com/prometheus/common v0.28.0 // indirect | ||
github.com/prometheus/procfs v0.6.0 // indirect | ||
github.com/spf13/pflag v1.0.5 // indirect | ||
golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect | ||
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect | ||
golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e // indirect | ||
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect | ||
golang.org/x/text v0.3.7 // indirect | ||
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect | ||
google.golang.org/appengine v1.6.7 // indirect | ||
google.golang.org/protobuf v1.27.1 // indirect | ||
gopkg.in/inf.v0 v0.9.1 // indirect | ||
gopkg.in/yaml.v2 v2.4.0 // indirect | ||
k8s.io/api v0.23.5 // indirect | ||
k8s.io/component-base v0.23.5 // indirect | ||
k8s.io/klog/v2 v2.30.0 // indirect | ||
k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect | ||
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect | ||
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect | ||
sigs.k8s.io/yaml v1.2.0 // indirect | ||
) |
Oops, something went wrong.