Skip to content

Commit

Permalink
release-v1.1.0 modify shell (#32)
Browse files Browse the repository at this point in the history
* release:v1.1.0 auth-proxy
* release:v1.1.0 split rbac rule
* release:v1.1.0 optimize manifest name
* release:v1.1.0 modify shell
  • Loading branch information
weilaaa authored Dec 20, 2021
1 parent b1a0509 commit b667e16
Show file tree
Hide file tree
Showing 50 changed files with 357 additions and 253 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ follow [doc](https://www.kubecube.io/docs/installation-guide/)
set version

```bash
KUBECUBE_VERSION=v1.0
KUBECUBE_VERSION=v1.1
```

### All in one install
Expand Down Expand Up @@ -45,4 +45,9 @@ os_arch=amd64

```bash
/bin/bash offline_pkg_download.sh ${k8s_version} ${os_arch}
```

### Build dependence image
```bash
docker build -f ./dependence.Dockerfile -t hub.c.163.com/kubecube/warden-dependence:latest .
```
2 changes: 1 addition & 1 deletion audit/audit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
spec:
containers:
- name: kubecube-audit
image: hub.c.163.com/kubecube/audit:v1.0.1
image: hub.c.163.com/kubecube/audit:v1.1.0
ports:
- containerPort: 8888
env:
Expand Down
9 changes: 4 additions & 5 deletions cleanup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env bash

set -o errexit
set -o nounset
set -o pipefail

Expand All @@ -9,12 +8,12 @@ OPT=$1
function kubecube_uninstall() {
clog info "uninstalling kubecube"

clog debug "uninstall kubecueb helm chart release"
helm uninstall kubecube

clog debug "remove kubecube files"
rm -rf /etc/kubecube

clog debug "uninstall kubecueb helm chart release"
helm uninstall kubecube || true

clog info "kubecube uninstall success"
}

Expand All @@ -35,7 +34,7 @@ function kubernetes_uninstall() {
rm /usr/local/bin/kubeadm
rm /usr/local/bin/kubectl
rm /usr/local/bin/kubelet
rm /usr/local/bin/helm
rm /usr/local/bin/helm || true

clog info "kubernetes uninstall success"
}
Expand Down
32 changes: 32 additions & 0 deletions dependence.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#Copyright 2021 KubeCube Authors
#
#Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#Unless required by applicable law or agreed to in writing, software
#distributed under the License is distributed on an "AS IS" BASIS,
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#See the License for the specific language governing permissions and
#limitations under the License.

FROM busybox

# kubectl info
ARG arch=amd64
ARG kubectl_version=v1.22.2

# load dependces into image
COPY hnc/hnc.yaml /etc/kubecube/manifests/hnc/hnc.yaml
COPY ingress-controller/ingress-controller.yaml /etc/kubecube/manifests/ingress-controller/ingress-controller.yaml
COPY local-path-storage/local-path-storage.yaml /etc/kubecube/manifests/local-path-storage/local-path-storage.yaml
COPY metrics-server/metrics-server.yaml /etc/kubecube/manifests/metrics-server/metrics-server.yaml
COPY install_third_dependence.sh install_third_dependence.sh

# downloads kubectl
RUN wget https://storage.googleapis.com/kubernetes-release/release/${kubectl_version}/bin/linux/${arch}/kubectl --no-check-certificate
RUN chmod +x kubectl && mv kubectl /bin/kubectl

CMD ["/bin/sh","install_third_dependence.sh"]
2 changes: 1 addition & 1 deletion entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ if [ -e "./manifests" ]; then
echo -e "$(date +'%Y-%m-%d %H:%M:%S') \033[32mINFO\033[0m manifests already exist"
else
echo -e "$(date +'%Y-%m-%d %H:%M:%S') \033[32mINFO\033[0m downloading manifests for kubecube"
wget https://kubecube.nos-eastchina1.126.net/kubecube-installer/v1.0/manifests.tar.gz -O manifests.tar.gz
wget https://kubecube.nos-eastchina1.126.net/kubecube-installer/v1.1/manifests.tar.gz -O manifests.tar.gz

tar -xzvf manifests.tar.gz > /dev/null
fi
Expand Down
2 changes: 1 addition & 1 deletion frontend/frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ spec:
spec:
containers:
- name: nginx
image: hub.c.163.com/kubecube/frontend:v1.0.2
image: hub.c.163.com/kubecube/frontend:v1.1.0
lifecycle:
preStop:
exec:
Expand Down
18 changes: 18 additions & 0 deletions images/cube-member/images.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
hub.c.163.com/kubecube/warden:v1.1.0
hub.c.163.com/kubecube/warden-init:v1.1.0
hub.c.163.com/kubecube/warden-dependence:v1.1.0
hub.c.163.com/kubecube/prometheus-config-reloader:v0.47.0
hub.c.163.com/kubecube/k8s-sidecar:1.10.7
hub.c.163.com/kubecube/kube-state-metrics:v1.9.8
hub.c.163.com/kubecube/prometheus-operator:v0.47.0
hub.c.163.com/kubecube/node-exporter:v1.1.2
hub.c.163.com/kubecube/prometheus:v2.26.1
hub.c.163.com/kubecube/thanos:v0.22.0
hub.c.163.com/kubecube/kubectl-tools:1.21.0
hub.c.163.com/kubecube/hnc/hnc-manager:v0.8.0-kubecube.1.1
hub.c.163.com/kubecube/ingress-nginx/controller:v0.46.0-m
hub.c.163.com/kubecube/jettech/kube-webhook-certgen:v1.5.1-m
hub.c.163.com/kubecube/carlosedp/kube-rbac-proxy:v0.4.1-m
hub.c.163.com/kubecube/rancher/local-path-provisioner:v0.0.19-m
hub.c.163.com/kubecube/rancher/metrics-server:v0.4.1-m
hub.c.163.com/kubecube/busybox:latest-m
25 changes: 25 additions & 0 deletions images/cube-pivot/images.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
hub.c.163.com/kubecube/audit:v1.1.0
hub.c.163.com/kubecube/cloudshell:v1.1.0
hub.c.163.com/kubecube/webconsole:v1.1.0
hub.c.163.com/kubecube/frontend:v1.1.0
hub.c.163.com/kubecube/cube:v1.1.0
hub.c.163.com/kubecube/warden:v1.1.0
hub.c.163.com/kubecube/warden-init:v1.1.0
hub.c.163.com/kubecube/warden-dependence:v1.1.0
hub.c.163.com/kubecube/alertmanager:v0.21.0
hub.c.163.com/kubecube/prometheus-config-reloader:v0.47.0
hub.c.163.com/kubecube/k8s-sidecar:1.10.7
hub.c.163.com/kubecube/grafana:7.5.5
hub.c.163.com/kubecube/kube-state-metrics:v1.9.8
hub.c.163.com/kubecube/prometheus-operator:v0.47.0
hub.c.163.com/kubecube/node-exporter:v1.1.2
hub.c.163.com/kubecube/prometheus:v2.26.1
hub.c.163.com/kubecube/thanos:v0.22.0
hub.c.163.com/kubecube/kubectl-tools:1.21.0
hub.c.163.com/kubecube/hnc/hnc-manager:v0.8.0-kubecube.1.1
hub.c.163.com/kubecube/ingress-nginx/controller:v0.46.0-m
hub.c.163.com/kubecube/jettech/kube-webhook-certgen:v1.5.1-m
hub.c.163.com/kubecube/carlosedp/kube-rbac-proxy:v0.4.1-m
hub.c.163.com/kubecube/rancher/local-path-provisioner:v0.0.19-m
hub.c.163.com/kubecube/rancher/metrics-server:v0.4.1-m
hub.c.163.com/kubecube/busybox:latest-m
11 changes: 11 additions & 0 deletions images/k8s/v1.18.20/images.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
hub.c.163.com/kubecube/calico/node:v3.19.1-m
hub.c.163.com/kubecube/calico/cni:v3.19.1-m
hub.c.163.com/kubecube/calico/pod2daemon-flexvol:v3.19.1-m
hub.c.163.com/kubecube/calico/kube-controllers:v3.19.1-m
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver:v1.18.20
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-manager:v1.18.20
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler:v1.18.20
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-proxy:v1.18.20
registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.2
registry.cn-hangzhou.aliyuncs.com/google_containers/etcd:3.4.3-0
registry.cn-hangzhou.aliyuncs.com/google_containers/coredns:1.6.7
11 changes: 11 additions & 0 deletions images/k8s/v1.19.13/images.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
hub.c.163.com/kubecube/calico/node:v3.19.1-m
hub.c.163.com/kubecube/calico/cni:v3.19.1-m
hub.c.163.com/kubecube/calico/pod2daemon-flexvol:v3.19.1-m
hub.c.163.com/kubecube/calico/kube-controllers:v3.19.1-m
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver:v1.19.15
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-manager:v1.19.15
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler:v1.19.15
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-proxy:v1.19.15
registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.2
registry.cn-hangzhou.aliyuncs.com/google_containers/etcd:3.4.13-0
registry.cn-hangzhou.aliyuncs.com/google_containers/coredns:1.7.0
11 changes: 11 additions & 0 deletions images/k8s/v1.20.9/images.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
hub.c.163.com/kubecube/calico/node:v3.19.1-m
hub.c.163.com/kubecube/calico/cni:v3.19.1-m
hub.c.163.com/kubecube/calico/pod2daemon-flexvol:v3.19.1-m
hub.c.163.com/kubecube/calico/kube-controllers:v3.19.1-m
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver:v1.20.9
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-manager:v1.20.9
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler:v1.20.9
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-proxy:v1.20.9
registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.2
registry.cn-hangzhou.aliyuncs.com/google_containers/etcd:3.4.13-0
registry.cn-hangzhou.aliyuncs.com/google_containers/coredns:1.7.0
11 changes: 11 additions & 0 deletions images/k8s/v1.21.2/images.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
hub.c.163.com/kubecube/calico/node:v3.19.1-m
hub.c.163.com/kubecube/calico/cni:v3.19.1-m
hub.c.163.com/kubecube/calico/pod2daemon-flexvol:v3.19.1-m
hub.c.163.com/kubecube/calico/kube-controllers:v3.19.1-m
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver:v1.21.5
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-manager:v1.21.5
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler:v1.21.5
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-proxy:v1.21.5
registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.4.1
registry.cn-hangzhou.aliyuncs.com/google_containers/etcd:3.4.13-0
registry.cn-hangzhou.aliyuncs.com/google_containers/coredns:v1.8.0
11 changes: 11 additions & 0 deletions images/k8s/v1.22.2/images.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
hub.c.163.com/kubecube/calico/node:v3.19.1-m
hub.c.163.com/kubecube/calico/cni:v3.19.1-m
hub.c.163.com/kubecube/calico/pod2daemon-flexvol:v3.19.1-m
hub.c.163.com/kubecube/calico/kube-controllers:v3.19.1-m
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver:v1.22.2
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-manager:v1.22.2
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler:v1.22.2
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-proxy:v1.22.2
registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.5
registry.cn-hangzhou.aliyuncs.com/google_containers/etcd:3.5.0-0
registry.cn-hangzhou.aliyuncs.com/google_containers/coredns:v1.8.4
14 changes: 7 additions & 7 deletions images/v1.18.20/images.list
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
hub.c.163.com/kubecube/audit:v1.0.1
hub.c.163.com/kubecube/cloudshell:v1.0.1
hub.c.163.com/kubecube/webconsole:v1.0.1
hub.c.163.com/kubecube/frontend:v1.0.2
hub.c.163.com/kubecube/cube:v1.0.3
hub.c.163.com/kubecube/warden:v1.0.3
hub.c.163.com/kubecube/warden-init:v1.0.3
hub.c.163.com/kubecube/audit:v1.1.0
hub.c.163.com/kubecube/cloudshell:v1.1.0
hub.c.163.com/kubecube/webconsole:v1.1.0
hub.c.163.com/kubecube/frontend:v1.1.0
hub.c.163.com/kubecube/cube:v1.1.0
hub.c.163.com/kubecube/warden:v1.1.0
hub.c.163.com/kubecube/warden-init:v1.1.0
hub.c.163.com/kubecube/alertmanager:v0.21.0
hub.c.163.com/kubecube/prometheus-config-reloader:v0.47.0
hub.c.163.com/kubecube/k8s-sidecar:1.10.7
Expand Down
14 changes: 7 additions & 7 deletions images/v1.19.13/images.list
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
hub.c.163.com/kubecube/audit:v1.0.1
hub.c.163.com/kubecube/cloudshell:v1.0.1
hub.c.163.com/kubecube/webconsole:v1.0.1
hub.c.163.com/kubecube/frontend:v1.0.2
hub.c.163.com/kubecube/cube:v1.0.3
hub.c.163.com/kubecube/warden:v1.0.3
hub.c.163.com/kubecube/warden-init:v1.0.3
hub.c.163.com/kubecube/audit:v1.1.0
hub.c.163.com/kubecube/cloudshell:v1.1.0
hub.c.163.com/kubecube/webconsole:v1.1.0
hub.c.163.com/kubecube/frontend:v1.1.0
hub.c.163.com/kubecube/cube:v1.1.0
hub.c.163.com/kubecube/warden:v1.1.0
hub.c.163.com/kubecube/warden-init:v1.1.0
hub.c.163.com/kubecube/alertmanager:v0.21.0
hub.c.163.com/kubecube/prometheus-config-reloader:v0.47.0
hub.c.163.com/kubecube/k8s-sidecar:1.10.7
Expand Down
14 changes: 7 additions & 7 deletions images/v1.20.9/images.list
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
hub.c.163.com/kubecube/audit:v1.0.1
hub.c.163.com/kubecube/cloudshell:v1.0.1
hub.c.163.com/kubecube/webconsole:v1.0.1
hub.c.163.com/kubecube/frontend:v1.0.2
hub.c.163.com/kubecube/cube:v1.0.3
hub.c.163.com/kubecube/warden:v1.0.3
hub.c.163.com/kubecube/warden-init:v1.0.3
hub.c.163.com/kubecube/audit:v1.1.0
hub.c.163.com/kubecube/cloudshell:v1.1.0
hub.c.163.com/kubecube/webconsole:v1.1.0
hub.c.163.com/kubecube/frontend:v1.1.0
hub.c.163.com/kubecube/cube:v1.1.0
hub.c.163.com/kubecube/warden:v1.1.0
hub.c.163.com/kubecube/warden-init:v1.1.0
hub.c.163.com/kubecube/alertmanager:v0.21.0
hub.c.163.com/kubecube/prometheus-config-reloader:v0.47.0
hub.c.163.com/kubecube/k8s-sidecar:1.10.7
Expand Down
14 changes: 7 additions & 7 deletions images/v1.21.2/images.list
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
hub.c.163.com/kubecube/audit:v1.0.1
hub.c.163.com/kubecube/cloudshell:v1.0.1
hub.c.163.com/kubecube/webconsole:v1.0.1
hub.c.163.com/kubecube/frontend:v1.0.2
hub.c.163.com/kubecube/cube:v1.0.3
hub.c.163.com/kubecube/warden:v1.0.3
hub.c.163.com/kubecube/warden-init:v1.0.3
hub.c.163.com/kubecube/audit:v1.1.0
hub.c.163.com/kubecube/cloudshell:v1.1.0
hub.c.163.com/kubecube/webconsole:v1.1.0
hub.c.163.com/kubecube/frontend:v1.1.0
hub.c.163.com/kubecube/cube:v1.1.0
hub.c.163.com/kubecube/warden:v1.1.0
hub.c.163.com/kubecube/warden-init:v1.1.0
hub.c.163.com/kubecube/alertmanager:v0.21.0
hub.c.163.com/kubecube/prometheus-config-reloader:v0.47.0
hub.c.163.com/kubecube/k8s-sidecar:1.10.7
Expand Down
14 changes: 7 additions & 7 deletions images/v1.22.2/images.list
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
hub.c.163.com/kubecube/audit:v1.0.1
hub.c.163.com/kubecube/cloudshell:v1.0.1
hub.c.163.com/kubecube/webconsole:v1.0.1
hub.c.163.com/kubecube/frontend:v1.0.2
hub.c.163.com/kubecube/cube:v1.0.3
hub.c.163.com/kubecube/warden:v1.0.3
hub.c.163.com/kubecube/warden-init:v1.0.3
hub.c.163.com/kubecube/audit:v1.1.0
hub.c.163.com/kubecube/cloudshell:v1.1.0
hub.c.163.com/kubecube/webconsole:v1.1.0
hub.c.163.com/kubecube/frontend:v1.1.0
hub.c.163.com/kubecube/cube:v1.1.0
hub.c.163.com/kubecube/warden:v1.1.0
hub.c.163.com/kubecube/warden-init:v1.1.0
hub.c.163.com/kubecube/alertmanager:v0.21.0
hub.c.163.com/kubecube/prometheus-config-reloader:v0.47.0
hub.c.163.com/kubecube/k8s-sidecar:1.10.7
Expand Down
4 changes: 2 additions & 2 deletions install.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ NODE_MODE="master"
ZONE="cn"

# k8s version you want to install
# support now is: 1.20.9, 1.19.13, 1.18.20
# support now is: 1.20.9, 1.19.13, 1.18.20, 1.21.2
KUBERNETES_VERSION="1.20.9"

# +optional
Expand Down Expand Up @@ -73,7 +73,7 @@ ACCESS_PRIVATE_KEY_PATH="/root/.ssh/id_rsa"

#######################################################################
# offline config
# used when offline install choice, mush lift offline pkg first
# used when offline install choose, must lift offline pkg first
#######################################################################

OFFLINE_INSTALL="false"
Expand Down
23 changes: 4 additions & 19 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ source /etc/kubecube/manifests/utils.sh

system_info
params_process
configs_for_apiserver

# install k8s or not
if [[ ${INSTALL_KUBERNETES} = "true" ]]; then
/bin/bash /etc/kubecube/manifests/install_k8s.sh
if [ "$?" -ne 0 ]; then
Expand All @@ -17,20 +17,9 @@ if [[ ${INSTALL_KUBERNETES} = "true" ]]; then
clog info "offline manifests download success"
exit 0
fi
else
alert_modify_apiserver
while read confirm
do
if [[ ${confirm} = "confirm" ]]; then
break
elif [[ ${confirm} = "exit" ]]; then
exit 1
else
continue
fi
done
fi

# install kubecube as pivot cluster
if [[ ${INSTALL_KUBECUBE_PIVOT} = "true" ]]; then
/bin/bash /etc/kubecube/manifests/install_third_dependence.sh
if [ "$?" -ne 0 ]; then
Expand All @@ -45,13 +34,9 @@ if [[ ${INSTALL_KUBECUBE_PIVOT} = "true" ]]; then
fi
fi

# add member cluster to pivot
if [[ ${INSTALL_KUBECUBE_MEMBER} = "true" ]]; then
/bin/bash /etc/kubecube/manifests/install_third_dependence.sh
if [ "$?" -ne 0 ]; then
clog error "install third dependence failed"
exit 1
fi

# invoke cluster register api of kubecube
curl -s -k -H "Content-type: application/json" -X POST https://${KUBECUBE_HOST}:30443/api/v1/cube/clusters/register -d "{\"apiVersion\":\"cluster.kubecube.io/v1\",\"kind\":\"Cluster\",\"metadata\":{\"name\":\"${MEMBER_CLUSTER_NAME}\"},\"spec\":{\"kubernetesAPIEndpoint\":\"${LOCAL_IP}:6443\",\"networkType\":\"calico\",\"isMemberCluster\":true,\"description\":\"this is member cluster\",\"kubeconfig\":\"$(cat /root/.kube/config | base64 -w 0)\"}}" >/dev/null
if [[ $? = 0 ]]; then
echo -e "\033[32m================================================\033[0m"
Expand Down
Loading

0 comments on commit b667e16

Please sign in to comment.