Compare commits

...

46 Commits

Author SHA1 Message Date
niusmallnan
f898c559e0 Bump steve and dashboard 2022-12-20 15:16:25 +08:00
niusmallnan
f0effa7f09 Bump upx 4.0.1 2022-12-20 15:12:34 +08:00
niusmallnan
2838ceb34a Add image scan pipeline in drone 2022-12-09 09:29:18 +08:00
niusmallnan
40a972eeef Use BCI minimal image 2022-12-09 08:59:34 +08:00
niusmallnan
88c924a816 Use BCI image 2022-12-09 08:51:39 +08:00
niusmallnan
d24282849f Bump dashboard v2.6.9-kube-explorer-ui-rc2 2022-11-15 13:47:25 +08:00
niusmallnan
92aaca7407 Bump steve and dashboard based on Rancher v2.6.9 2022-10-19 11:58:11 +08:00
niusmallnan
c278dbb810 Bump golang 1.19 2022-10-19 11:57:10 +08:00
niusmallnan
5c2ecdfb97 Bump dashboard v2.6.9-rc4 [CI SKIP] 2022-10-12 15:58:46 +08:00
bagechashu
ecf6faba80 fix: text incorrect at deploy use kubectl
fix text incorrect
2022-10-07 13:24:45 +08:00
niusmallnan
a89b9b46bf Bump dashboard v2.6.9-rc1 [CI SKIP] 2022-09-26 11:10:32 +08:00
niusmallnan
30c0ceef73 Bump dashboard v2.6.8 2022-08-30 17:37:39 +08:00
Yuxing Deng
f6536c289e Update Dockerfile.dapper
Using `$GOPATH` instead of static path `/go`
2022-08-25 15:55:51 +08:00
niusmallnan
5347d02990 Bump dashboard 2022-08-22 13:27:48 +08:00
niusmallnan
663e8d7682 Bump steve [CI SKIP] 2022-08-19 17:30:07 +08:00
niusmallnan
dd8291f9e3 Bump steve and dashboard based on Rancher v2.6.7 2022-08-19 17:13:15 +08:00
niusmallnan
55e5418bd0 Support darwin arm64 binary [CI SKIP] 2022-08-10 10:45:56 +08:00
niusmallnan
7c3f7b5401 Bump steve to clean up resources created by kubectl shell [CI SKIP] 2022-08-09 09:34:39 +08:00
niusmallnan
98ae5fe7c9 Bump ui v2.6.7-rc5-kube-explorer-ui-rc2 [CI SKIP] 2022-08-04 14:50:49 +08:00
niusmallnan
f91c8df6e2 Bump steve and dashboard 2022-08-03 09:54:03 +08:00
niusmallnan
6344c0767a Bump steve to support --insecure-skip-tls-verify like kubectl 2022-07-22 16:49:05 +08:00
niusmallnan
bbb5db5fb5 Update drone CI [CI SKIP] 2022-05-24 12:04:11 +08:00
niusmallnan
a81fc996c9 Bump ui v2.6.5-kube-explorer-ui-rc1 [CI SKIP] 2022-05-17 14:34:58 +08:00
niusmallnan
a0c6f0edb7 Bump ui v2.6.5-kube-explorer-ui-rc1 [CI SKIP] 2022-05-07 14:37:46 +08:00
niusmallnan
e986d891ef Bump steve based on rancher 2.6.5-rc8 2022-05-07 14:12:57 +08:00
niusmallnan
0857f01c77 Bump steve for formatting cluster display name by strings.Title 2022-02-09 16:35:17 +08:00
niusmallnan
ec1152aba1 UPX is not required 2022-02-09 16:28:35 +08:00
niusmallnan
5846ee6155 Bump steve for formatting cluster display name 2022-02-09 16:06:19 +08:00
niusmallnan
3e9b2fe7f5 Update readme [CI SKIP] 2022-02-08 17:59:10 +08:00
niusmallnan
c4e05aa13d Add GIF record [CI SKIP] 2022-02-07 14:35:15 +08:00
niusmallnan
ae72fa4141 Enable tags in drone ci triggers [CI SKIP] 2022-01-21 17:32:52 +08:00
niusmallnan
3cfd0e2a32 Bump ui v2.6.3-kube-explorer-ui-rc2 2022-01-21 17:20:12 +08:00
niusmallnan
179d7aa95e Enable drone CI 2022-01-21 16:05:02 +08:00
niusmallnan
c29a7505b2 Bump golangci-lint 2022-01-21 14:58:25 +08:00
niusmallnan
71ace76cf7 Bump steve 2021-12-24 15:51:50 +08:00
niusmallnan
57d6d420b8 Bump ke dashboard 2.6.3-rc1 2021-12-24 15:16:16 +08:00
niusmallnan
b46ddc4c8e Bump dashboard 2021-11-15 20:05:01 +08:00
niusmallnan
b5200596f9 Update README 2021-10-15 13:37:09 +08:00
niusmallnan
a90dd6cafc Update README 2021-10-15 13:30:58 +08:00
niusmallnan
b227ab5257 Bump dashboard and steve 2021-10-15 13:16:59 +08:00
niusmallnan
db3c9e207d Bump dashboard 2021-09-07 17:17:18 +08:00
niusmallnan
ac0ab3d84c Bump dashboard 2021-09-06 16:08:34 +08:00
niusmallnan
41cfdac948 Bump dashboard 2021-08-24 15:24:35 +08:00
niusmallnan
4549f4bf30 Bump steve and dashboard ui 2021-08-23 16:21:46 +08:00
niusmallnan
32a422d532 Remove windows support 2021-08-06 17:30:31 +08:00
niusmallnan
db9fafa217 Bump UI and steve to 2.6 baseline 2021-08-06 15:24:20 +08:00
12 changed files with 381 additions and 28 deletions

309
.drone.yml Normal file
View File

@@ -0,0 +1,309 @@
---
kind: pipeline
name: default-amd64
platform:
os: linux
arch: amd64
steps:
- name: build
pull: default
image: rancher/dapper:v0.5.8
commands:
- dapper ci
privileged: true
volumes:
- name: docker
path: /var/run/docker.sock
when:
ref:
include:
- "refs/heads/main"
- "refs/heads/v*"
event:
- push
- pull_request
- name: release
pull: default
image: rancher/dapper:v0.5.8
commands:
- dapper ci
privileged: true
environment:
CROSS: 1
volumes:
- name: docker
path: /var/run/docker.sock
when:
event:
- tag
- name: stage-binaries-head
image: rancher/dapper:v0.5.8
commands:
- "cp -r ./bin/kube-explorer ./package/"
when:
ref:
include:
- "refs/heads/main"
- "refs/heads/v*"
event:
- push
- name: stage-binaries
image: rancher/dapper:v0.5.8
commands:
- "cp -r ./bin/kube-explorer-linux-amd64 ./package/kube-explorer"
when:
event:
- tag
- name: github_binary_release
pull: default
image: plugins/github-release
settings:
api_key:
from_secret: github_token
checksum:
- sha256
files:
- "bin/*"
title: "${DRONE_TAG}"
overwrite: true
when:
event:
- tag
- name: docker-publish-head
pull: default
image: plugins/docker
settings:
dockerfile: package/Dockerfile
context: package/
password:
from_secret: docker_password
repo: cnrancher/kube-explorer
tag: head-linux-amd64
username:
from_secret: docker_username
when:
ref:
include:
- "refs/heads/main"
- "refs/heads/v*"
event:
- push
- name: image-scan-head
image: aquasec/trivy
commands:
- trivy image --no-progress --ignore-unfixed --severity HIGH,CRITICAL --security-checks vuln --exit-code 1 cnrancher/kube-explorer:head-linux-amd64
volumes:
- name: docker
path: /var/run/docker.sock
when:
ref:
include:
- "refs/heads/main"
- "refs/heads/v*"
event:
- push
- name: docker-publish
pull: default
image: plugins/docker
settings:
dockerfile: package/Dockerfile
context: package/
password:
from_secret: docker_password
repo: cnrancher/kube-explorer
tag: ${DRONE_TAG}-linux-amd64
username:
from_secret: docker_username
when:
event:
- tag
volumes:
- name: docker
host:
path: /var/run/docker.sock
node:
instance: agent-amd64
trigger:
ref:
include:
- "refs/heads/main"
- "refs/heads/v*"
- "refs/tags/*"
event:
exclude:
- promote
---
kind: pipeline
name: default-arm64
platform:
os: linux
arch: arm64
steps:
- name: build
pull: default
image: rancher/dapper:v0.5.8
commands:
- dapper ci
privileged: true
volumes:
- name: docker
path: /var/run/docker.sock
when:
ref:
include:
- "refs/heads/main"
- "refs/heads/v*"
- "refs/tags/*"
event:
- push
- tag
- name: stage-binaries
image: rancher/dapper:v0.5.8
commands:
- "cp -r ./bin/* ./package/"
when:
ref:
include:
- "refs/heads/main"
- "refs/heads/v*"
- "refs/tags/*"
event:
- push
- tag
- name: docker-publish-head
pull: default
image: plugins/docker
settings:
build_args:
- ARCH=arm64
dockerfile: package/Dockerfile
context: package/
password:
from_secret: docker_password
repo: cnrancher/kube-explorer
tag: head-linux-arm64
username:
from_secret: docker_username
when:
ref:
include:
- "refs/heads/main"
- "refs/heads/v*"
event:
- push
- name: docker-publish
pull: default
image: plugins/docker
settings:
build_args:
- ARCH=arm64
dockerfile: package/Dockerfile
context: package/
password:
from_secret: docker_password
repo: cnrancher/kube-explorer
tag: ${DRONE_TAG}-linux-arm64
username:
from_secret: docker_username
when:
event:
- tag
volumes:
- name: docker
host:
path: /var/run/docker.sock
trigger:
ref:
include:
- "refs/heads/main"
- "refs/heads/v*"
- "refs/tags/*"
event:
exclude:
- promote
node:
instance: agent-arm64
---
kind: pipeline
name: manifest
platform:
os: linux
arch: amd64
steps:
- name: push-manifest-head
image: plugins/manifest
settings:
ignore_missing: true
username:
from_secret: docker_username
password:
from_secret: docker_password
spec: manifest-head.tmpl
when:
ref:
include:
- "refs/heads/main"
- "refs/heads/v*"
event:
- push
- name: push-manifest
image: plugins/manifest
settings:
ignore_missing: true
username:
from_secret: docker_username
password:
from_secret: docker_password
spec: manifest.tmpl
when:
event:
- tag
volumes:
- name: docker
host:
path: /var/run/docker.sock
node:
instance: agent-amd64
trigger:
ref:
include:
- "refs/heads/main"
- "refs/heads/v*"
- "refs/tags/*"
event:
exclude:
- promote
depends_on:
- default-amd64
- default-arm64
...

View File

@@ -1,4 +1,4 @@
FROM golang:1.16
FROM golang:1.19
ARG DAPPER_HOST_ARCH
ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH}
@@ -6,11 +6,11 @@ ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH}
RUN apt-get update && \
apt-get install -y ca-certificates git wget curl xz-utils && \
rm -f /bin/sh && ln -s /bin/bash /bin/sh && \
curl -sL https://github.com/upx/upx/releases/download/v3.96/upx-3.96-${ARCH}_linux.tar.xz | tar xvJf - --strip-components=1 -C /tmp && \
curl -sL https://github.com/upx/upx/releases/download/v4.0.1/upx-4.0.1-${ARCH}_linux.tar.xz | tar xvJf - --strip-components=1 -C /tmp && \
mv /tmp/upx /usr/bin/
RUN if [ "${ARCH}" == "amd64" ]; then \
curl -sL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.27.0; \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.49.0; \
fi
ENV DOCKER_URL_amd64=https://get.docker.com/builds/Linux/x86_64/docker-1.10.3 \
@@ -19,10 +19,10 @@ ENV DOCKER_URL_amd64=https://get.docker.com/builds/Linux/x86_64/docker-1.10.3 \
DOCKER_URL=DOCKER_URL_${ARCH}
RUN wget -O - ${!DOCKER_URL} > /usr/bin/docker && chmod +x /usr/bin/docker
ENV GIT_COMMIT="327be56d3a6a2b85cf4751148f6834402e8211d5" \
GIT_BRANCH="kube-explorer" \
GIT_SOURCE="/go/src/github.com/rancher/steve" \
CATTLE_DASHBOARD_UI_VERSION=v2.5.8-cn
ENV GIT_COMMIT="4bcc9108508cd8112a28903f76bfca2fdd0bfc9d" \
GIT_BRANCH="ke/v0.3" \
GIT_SOURCE=${GOPATH}/src/github.com/rancher/steve \
CATTLE_DASHBOARD_UI_VERSION="v2.7.0-kube-explorer-ui-rc1"
ENV DAPPER_ENV REPO TAG DRONE_TAG CROSS
ENV DAPPER_SOURCE /opt/kube-explorer

View File

@@ -1,12 +1,12 @@
# kube-explorer
kube-explorer is portable explorer for Kubernetes, without any dependency.
kube-explorer is a portable explorer for Kubernetes without any dependency.
It integrates the Rancher steve framework and its dashboard, and is recompiled, packaged, compressed, and provides an almost completely stateless Kubernetes resource manager.
## Usage ✅
Please download the binary from the [release page](https://github.com/niusmallnan/kube-explorer/releases).
Please download the binary from the [release page](https://github.com/cnrancher/kube-explorer/releases).
To run an HTTP only server:
@@ -15,3 +15,27 @@ To run an HTTP only server:
```
Then, open the browser to visit http://x.x.x.x:9898 .
![](docs/assets/kube-explorer-record.gif)
## Build ✅
To debug on an AMD64 Linux host:
```
make dev
# $basedir=/opt/ui/dist/
# prepare the file trees like this
# $basedir/dashboard/
# $basedir/index.html
# good to go!
./kube-explorer --debug --ui-path /opt/ui/dist/ --http-listen-port=9898 --https-listen-port=0
```
To build all cross-platform binaries:
```
CROSS=1 make
```

View File

@@ -18,7 +18,7 @@ spec:
spec:
serviceAccountName: kube-explorer
containers:
- image: niusmallnan/kube-explorer
- image: cnrancher/kube-explorer
imagePullPolicy: IfNotPresent
name: kube-explorer
ports:

View File

@@ -1,4 +1,4 @@
## Traefik Auth
## Ingress-Nginx Basic Auth
This can be used in the cluster which uses the nginx-ingress.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1006 KiB

12
manifest-head.tmpl Normal file
View File

@@ -0,0 +1,12 @@
image: cnrancher/kube-explorer:latest
manifests:
-
image: cnrancher/kube-explorer:head-linux-amd64
platform:
architecture: amd64
os: linux
-
image: cnrancher/kube-explorer:head-linux-arm64
platform:
architecture: arm64
os: linux

12
manifest.tmpl Normal file
View File

@@ -0,0 +1,12 @@
image: cnrancher/kube-explorer:{{build.tag}}
manifests:
-
image: cnrancher/kube-explorer:{{build.tag}}-linux-amd64
platform:
architecture: amd64
os: linux
-
image: cnrancher/kube-explorer:{{build.tag}}-linux-arm64
platform:
architecture: arm64
os: linux

View File

@@ -1,6 +1,4 @@
FROM alpine:3.13
FROM registry.suse.com/bci/bci-minimal:15.4
COPY kube-explorer entrypoint.sh /usr/bin/
# Hack to make golang do files,dns search order
ENV LOCALDOMAIN=""
ENTRYPOINT ["entrypoint.sh"]

View File

@@ -4,8 +4,7 @@ set -e
source $(dirname $0)/version
OS_ARCH_ARG_LINUX="amd64 arm arm64"
OS_ARCH_ARG_WINDOWS="amd64"
OS_ARCH_ARG_DARWIN="amd64"
OS_ARCH_ARG_DARWIN="amd64 arm64"
LD_INJECT_VALUES="-X github.com/rancher/steve/pkg/version.Version=$VERSION
-X github.com/rancher/steve/pkg/version.GitCommit=$COMMIT"
@@ -24,15 +23,6 @@ if [ -n "$CROSS" ]; then
-o ${OUTPUT_BIN}
done
for ARCH in ${OS_ARCH_ARG_WINDOWS}; do
OUTPUT_BIN="bin/kube-explorer-windows-$ARCH.exe"
echo "Building binary for windows/$ARCH..."
GOARCH=$ARCH GOOS=windows CGO_ENABLED=0 go build -tags embed \
-ldflags \
"$LD_INJECT_VALUES $LINKFLAGS" \
-o ${OUTPUT_BIN}
done
for ARCH in ${OS_ARCH_ARG_DARWIN}; do
OUTPUT_BIN="bin/kube-explorer-darwin-$ARCH"
echo "Building binary for darwin/$ARCH..."
@@ -50,7 +40,15 @@ else
fi
for f in $(ls ./bin/); do
upx -o $DAPPER_SOURCE/bin/$f bin/$f
if [[ $f != *darwin-arm64 ]]; then
upx -o $DAPPER_SOURCE/bin/$f bin/$f || true
fi
if [ -f $DAPPER_SOURCE/bin/$f ]; then
echo "UPX done!"
else
echo "Copy origin file as UPX failed!!!"
cp bin/$f $DAPPER_SOURCE/bin/$f
fi
done
popd

View File

@@ -10,7 +10,7 @@ git reset --hard ${GIT_COMMIT}
mkdir -p pkg/ui/ui/dashboard
cd pkg/ui/ui/dashboard
curl -sL https://rancher-dashboard-ui.s3.ap-southeast-2.amazonaws.com/release-2.5/${CATTLE_DASHBOARD_UI_VERSION}.tar.gz | tar xvzf - --strip-components=2
curl -sL https://pandaria-dashboard-ui.s3.ap-southeast-2.amazonaws.com/release-2.7-cn/kube-explorer-ui/${CATTLE_DASHBOARD_UI_VERSION}.tar.gz | tar xvzf - --strip-components=2
cp index.html ../index.html
popd

View File

@@ -13,6 +13,6 @@ else
cp bin/kube-explorer package/
fi
cd package
docker build -f Dockerfile -t niusmallnan/kube-explorer:$VERSION .
docker build -f Dockerfile -t cnrancher/kube-explorer:$VERSION .
popd