mirror of
https://github.com/cnrancher/kube-explorer.git
synced 2025-09-03 07:25:03 +00:00
Compare commits
20 Commits
v0.2.1
...
v0.2.9-rc2
Author | SHA1 | Date | |
---|---|---|---|
|
a0c6f0edb7 | ||
|
e986d891ef | ||
|
0857f01c77 | ||
|
ec1152aba1 | ||
|
5846ee6155 | ||
|
3e9b2fe7f5 | ||
|
c4e05aa13d | ||
|
ae72fa4141 | ||
|
3cfd0e2a32 | ||
|
179d7aa95e | ||
|
c29a7505b2 | ||
|
71ace76cf7 | ||
|
57d6d420b8 | ||
|
b46ddc4c8e | ||
|
b5200596f9 | ||
|
a90dd6cafc | ||
|
b227ab5257 | ||
|
db3c9e207d | ||
|
ac0ab3d84c | ||
|
41cfdac948 |
292
.drone.yml
Normal file
292
.drone.yml
Normal file
@@ -0,0 +1,292 @@
|
|||||||
|
---
|
||||||
|
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/*"
|
||||||
|
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: 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
|
||||||
|
|
||||||
|
...
|
@@ -1,4 +1,4 @@
|
|||||||
FROM golang:1.16
|
FROM golang:1.17
|
||||||
|
|
||||||
ARG DAPPER_HOST_ARCH
|
ARG DAPPER_HOST_ARCH
|
||||||
ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH}
|
ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH}
|
||||||
@@ -10,7 +10,7 @@ RUN apt-get update && \
|
|||||||
mv /tmp/upx /usr/bin/
|
mv /tmp/upx /usr/bin/
|
||||||
|
|
||||||
RUN if [ "${ARCH}" == "amd64" ]; then \
|
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.43.0; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ENV DOCKER_URL_amd64=https://get.docker.com/builds/Linux/x86_64/docker-1.10.3 \
|
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}
|
DOCKER_URL=DOCKER_URL_${ARCH}
|
||||||
RUN wget -O - ${!DOCKER_URL} > /usr/bin/docker && chmod +x /usr/bin/docker
|
RUN wget -O - ${!DOCKER_URL} > /usr/bin/docker && chmod +x /usr/bin/docker
|
||||||
|
|
||||||
ENV GIT_COMMIT="68b9d2e74a0ab2053ae2a0a50e1476db96653225" \
|
ENV GIT_COMMIT="62d6de019d8e82af5194c2e810e336eb03aa1bd6" \
|
||||||
GIT_BRANCH="ke/v0.2" \
|
GIT_BRANCH="ke/v0.2" \
|
||||||
GIT_SOURCE="/go/src/github.com/rancher/steve" \
|
GIT_SOURCE="/go/src/github.com/rancher/steve" \
|
||||||
CATTLE_DASHBOARD_UI_VERSION=v2.6.0-rc5-kube-explorer-ui-rc1
|
CATTLE_DASHBOARD_UI_VERSION=v2.6.5-rc7-kube-explorer-ui-rc1
|
||||||
|
|
||||||
ENV DAPPER_ENV REPO TAG DRONE_TAG CROSS
|
ENV DAPPER_ENV REPO TAG DRONE_TAG CROSS
|
||||||
ENV DAPPER_SOURCE /opt/kube-explorer
|
ENV DAPPER_SOURCE /opt/kube-explorer
|
||||||
|
28
README.md
28
README.md
@@ -1,12 +1,12 @@
|
|||||||
# kube-explorer
|
# 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.
|
It integrates the Rancher steve framework and its dashboard, and is recompiled, packaged, compressed, and provides an almost completely stateless Kubernetes resource manager.
|
||||||
|
|
||||||
## Usage ✅
|
## 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:
|
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 .
|
Then, open the browser to visit http://x.x.x.x:9898 .
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## 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
|
||||||
|
```
|
||||||
|
@@ -18,7 +18,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
serviceAccountName: kube-explorer
|
serviceAccountName: kube-explorer
|
||||||
containers:
|
containers:
|
||||||
- image: niusmallnan/kube-explorer
|
- image: cnrancher/kube-explorer
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
name: kube-explorer
|
name: kube-explorer
|
||||||
ports:
|
ports:
|
||||||
|
BIN
docs/assets/kube-explorer-record.gif
Normal file
BIN
docs/assets/kube-explorer-record.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1006 KiB |
12
manifest-head.tmpl
Normal file
12
manifest-head.tmpl
Normal 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
12
manifest.tmpl
Normal 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
|
@@ -40,7 +40,13 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
for f in $(ls ./bin/); do
|
for f in $(ls ./bin/); do
|
||||||
upx -o $DAPPER_SOURCE/bin/$f bin/$f
|
upx -o $DAPPER_SOURCE/bin/$f bin/$f || true
|
||||||
|
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
|
done
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
@@ -10,7 +10,7 @@ git reset --hard ${GIT_COMMIT}
|
|||||||
|
|
||||||
mkdir -p pkg/ui/ui/dashboard
|
mkdir -p pkg/ui/ui/dashboard
|
||||||
cd pkg/ui/ui/dashboard
|
cd pkg/ui/ui/dashboard
|
||||||
curl -sL https://rancher-dashboard-ui.s3.ap-southeast-2.amazonaws.com/release-2.6-cn/kube-explorer-ui/${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.6-cn/kube-explorer-ui/${CATTLE_DASHBOARD_UI_VERSION}.tar.gz | tar xvzf - --strip-components=2
|
||||||
cp index.html ../index.html
|
cp index.html ../index.html
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
@@ -13,6 +13,6 @@ else
|
|||||||
cp bin/kube-explorer package/
|
cp bin/kube-explorer package/
|
||||||
fi
|
fi
|
||||||
cd package
|
cd package
|
||||||
docker build -f Dockerfile -t niusmallnan/kube-explorer:$VERSION .
|
docker build -f Dockerfile -t cnrancher/kube-explorer:$VERSION .
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
Reference in New Issue
Block a user