Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[inspiration] namespaced functions with :: instead of _ #17

Open
whatwewant opened this issue Sep 6, 2021 · 1 comment
Open

[inspiration] namespaced functions with :: instead of _ #17

whatwewant opened this issue Sep 6, 2021 · 1 comment

Comments

@whatwewant
Copy link
Member

Repo

Example

common::run_kubespray(){
  : ${KUBESPRAY_IMAGE:=$(nerdctl images | awk '{print $1":"$2}' | grep '^kubespray:*' | sort -r --version-sort | head -n1)}
  nerdctl rm -f kubespray-runner >/dev/null 2>&1 || true
  nerdctl run --rm -it --net=host --name kubespray-runner \
  -v ${KUBESPRAY_CONFIG_DIR}:/kubespray/config \
  ${KUBESPRAY_IMAGE} $1
}
@whatwewant
Copy link
Member Author

whatwewant commented Sep 6, 2021

k8sli/kubeplay 启发:

离线部署 K8s 的工具,基于 kubespray,设计思路巧妙 - 使用 docker 将 k8s 所需的 docker hub images 下载到镜像内,这样都不用下载镜像了,并且启动本地 registry,有点类似 Al-in-One

值得学习,做一个 ALL-in-One 的 DevOps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant