Skip to content

Commit

Permalink
docs: offline package add metallb
Browse files Browse the repository at this point in the history
Signed-off-by: lixd <[email protected]>
  • Loading branch information
lixd committed Nov 11, 2024
1 parent 5671005 commit fa64ec8
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions content/zh-cn/docs/Getting started/make-offline-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ kcctl version

```bash
#!/usr/bin/env bash
# usage: ./push_component.sh [component] [version] [arch]
# usage: ./push_component.sh k8s v1.23.9 amd64

set -e

Expand All @@ -96,8 +98,8 @@ PKG_URL_PREFIX="https://oss.kubeclipper.io/packages"
fileList=()

name=$1
if [[ "${name}" != "k8s" ]] && [[ "${name}" != "calico" ]] && [[ "${name}" != "containerd" ]] && [[ "${name}" != "docker" ]]; then
echo "only 'k8s', 'calico' packages are supported. default: $name"
if [[ "${name}" != "k8s" ]] && [[ "${name}" != "calico" ]] && [[ "${name}" != "containerd" ]] && [[ "${name}" != "docker" ]] && [[ "${name}" != "metallb" ]]; then
echo "only 'k8s', 'calico','containerd','docker','metallb' packages are supported. default: $name"
exit 1
fi
version=$2
Expand All @@ -110,7 +112,7 @@ if [[ "${arch}" != "amd64" ]] && [[ "${arch}" != "arm64" ]]; then
echo "only 'amd64', 'arm64' architectures are supported. default: $arch"
exit 1
fi

``
build_dir=${name}/${version}/${arch}
pkg_name=${name}-${version}-${arch}.tar.gz
pkg_type="k8s"
Expand Down Expand Up @@ -146,6 +148,13 @@ packaging() {
)
pkg_type="cri"
;;
metallb)
fileList=(
images.tar.gz
manifest.json
)
pkg_type="metallb"
;;
esac

for file in "${fileList[@]}"; do
Expand Down Expand Up @@ -184,6 +193,9 @@ chmod +x push_component.sh

# 推送 docker 组件包
./push_component.sh docker 20.10.20 amd64

# 推送 metallb 组件包
./push_component.sh metallb v0.13.7 amd64
```

## 4. 查看离线组件包
Expand Down

0 comments on commit fa64ec8

Please sign in to comment.