Compare commits

..

13 Commits

Author SHA1 Message Date
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
Jacie
e977f787be bump up dashboard ui version 2021-07-23 09:43:31 +08:00
niusmallnan
801ddc8307 Update README 2021-05-06 17:33:40 +08:00
niusmallnan
9ce49f47d4 Bump UI v2.5.8 2021-05-06 16:56:26 +08:00
niusmallnan
e979672125 Compress binary more 2021-04-19 11:25:19 +08:00
niusmallnan
a0a6974500 Add publish to github tools 2021-04-17 12:45:22 +08:00
6 changed files with 66 additions and 22 deletions

View File

@@ -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" \
ENV GIT_COMMIT="9a95cd2eae9c4a3effa12fb13826cee48c40e26a" \
GIT_BRANCH="ke/v0.2" \
GIT_SOURCE="/go/src/github.com/rancher/steve" \
CATTLE_DASHBOARD_UI_VERSION=v2.5.8-rc3
CATTLE_DASHBOARD_UI_VERSION=v2.6.1-kube-explorer-ui-rc1
ENV DAPPER_ENV REPO TAG DRONE_TAG CROSS
ENV DAPPER_SOURCE /opt/kube-explorer

View File

@@ -1 +1,31 @@
# kube-explorer
# kube-explorer
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).
To run an HTTP only server:
```
./kube-explorer --kubeconfig=xxxx --http-listen-port=9898 --https-listen-port=0
```
Then, open the browser to visit http://x.x.x.x:9898 .
## Build ✅
To debug on an AMD64 Linux host:
```
make
```
To build all cross-platform binaries:
```
CROSS=1 make
```

View File

@@ -4,7 +4,6 @@ set -e
source $(dirname $0)/version
OS_ARCH_ARG_LINUX="amd64 arm arm64"
OS_ARCH_ARG_WINDOWS="amd64"
OS_ARCH_ARG_DARWIN="amd64"
LD_INJECT_VALUES="-X github.com/rancher/steve/pkg/version.Version=$VERSION
@@ -14,27 +13,13 @@ LD_INJECT_VALUES="-X github.com/rancher/steve/pkg/version.Version=$VERSION
pushd $GIT_SOURCE
CGO_ENABLED=0 go build -tags embed \
-ldflags \
"$LD_INJECT_VALUES $LINKFLAGS" \
-o bin/kube-explorer
if [ -n "$CROSS" ]; then
for ARCH in ${OS_ARCH_ARG_LINUX}; do
OUTPUT_BIN="bin/kube-explorer-linux-$ARCH"
echo "Building binary for linux/$ARCH..."
GOARCH=$ARCH GOOS=linux CGO_ENABLED=0 go build -tags embed \
-ldflags \
"$LD_INJECT_VALUES" \
-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" \
"$LD_INJECT_VALUES $LINKFLAGS" \
-o ${OUTPUT_BIN}
done
@@ -46,6 +31,12 @@ if [ -n "$CROSS" ]; then
"$LD_INJECT_VALUES" \
-o ${OUTPUT_BIN}
done
else
# only build one for current platform
CGO_ENABLED=0 go build -tags embed \
-ldflags \
"$LD_INJECT_VALUES $LINKFLAGS" \
-o bin/kube-explorer
fi
for f in $(ls ./bin/); do

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://releases.rancher.com/dashboard/${CATTLE_DASHBOARD_UI_VERSION}.tar.gz | tar xvzf - --strip-components=2
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
cp index.html ../index.html
popd

View File

@@ -5,7 +5,13 @@ source $(dirname $0)/version
pushd $DAPPER_SOURCE
cp bin/kube-explorer package/
if [ -f bin/kube-explorer-linux-${ARCH} ]; then
# For cross mode
cp bin/kube-explorer-linux-${ARCH} package/kube-explorer
else
# For common mode
cp bin/kube-explorer package/
fi
cd package
docker build -f Dockerfile -t niusmallnan/kube-explorer:$VERSION .

17
scripts/tools/publish.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
echo "basedir: $1, version: $2"
echo "to publish release to github, run push-github.sh"
echo "#!/bin/bash"> push-github.sh
echo "#"
echo "# GITHUB_TOKEN=xxx ./push-github.sh"
echo "#"
echo "pushd $1"
#echo "hub release create -t ${COMMIT} -m v${RELEASE_VERSION} v${RELEASE_VERSION}" >> dist/publish.sh
echo "for f in \$(ls $1/bin/) ; do" >> push-github.sh
echo " hub release edit -m $2 -a $1/bin/\${f} $2" >> push-github.sh
echo "done" >> push-github.sh
echo "popd"
chmod +x push-github.sh