From d8d2ce2bcd7034c496f80ff8ae6f410b88ccb2c2 Mon Sep 17 00:00:00 2001 From: ysicing Date: Wed, 17 Jul 2024 10:40:38 +0800 Subject: [PATCH] * refactor: update various files with new configurations and scripts --- cmd/app/restart.go | 4 +--- cmd/experimental/install.go | 3 ++- hack/manifests/hub/nerdctl.toml | 3 +++ hack/manifests/hub/registries.yaml | 4 +++- hack/manifests/storage/longhorn.sh | 2 +- hack/manifests/storage/openebs-jiva.sh | 11 ----------- 6 files changed, 10 insertions(+), 17 deletions(-) create mode 100644 hack/manifests/hub/nerdctl.toml delete mode 100644 hack/manifests/storage/openebs-jiva.sh diff --git a/cmd/app/restart.go b/cmd/app/restart.go index b3aba7f0..000b7438 100644 --- a/cmd/app/restart.go +++ b/cmd/app/restart.go @@ -29,9 +29,7 @@ func NewCmdAppRestart(f factory.Factory) *cobra.Command { Use: "restart", Short: "restart app", Args: cobra.ExactArgs(1), - Hidden: true, - Deprecated: "zentao not support query by url", - Example: `z app exec http://console.example.corp.cc/instance-view-39.html`, + Example: `z app`, RunE: func(cmd *cobra.Command, args []string) error { url := args[0] apidebug := log.GetLevel() == logrus.DebugLevel diff --git a/cmd/experimental/install.go b/cmd/experimental/install.go index 85c73d39..ef47bb99 100644 --- a/cmd/experimental/install.go +++ b/cmd/experimental/install.go @@ -28,6 +28,7 @@ var ( "mc": true, "etcdctl": true, "dnsctl": true, + "nerdctl": true, } ) @@ -35,7 +36,7 @@ var ( func InstallCommand(f factory.Factory) *cobra.Command { installCmd := &cobra.Command{ Use: "install [flags]", - Short: "install tools, like: helm, kubectl,etcdctl,mc,dnsctl", + Short: "install tools, like: helm, kubectl,etcdctl,mc,dnsctl,nerdctl", Example: installExample, Args: cobra.MinimumNArgs(1), PreRunE: func(cmd *cobra.Command, args []string) error { diff --git a/hack/manifests/hub/nerdctl.toml b/hack/manifests/hub/nerdctl.toml new file mode 100644 index 00000000..aa912439 --- /dev/null +++ b/hack/manifests/hub/nerdctl.toml @@ -0,0 +1,3 @@ +# /etc/nerdctl/nerdctl.toml +address = "unix:///run/k3s/containerd/containerd.sock" +namespace = "k8s.io" diff --git a/hack/manifests/hub/registries.yaml b/hack/manifests/hub/registries.yaml index 1594234b..21ba0073 100644 --- a/hack/manifests/hub/registries.yaml +++ b/hack/manifests/hub/registries.yaml @@ -1,7 +1,9 @@ mirrors: "docker.io": endpoint: - - "http://hub.quickon.me:32378" + - "http://127.0.0.1:32378" + "hub.zentao.net": + endpoint: - "http://127.0.0.1:32378" "hub.qucheng.com": endpoint: diff --git a/hack/manifests/storage/longhorn.sh b/hack/manifests/storage/longhorn.sh index a043cbfe..f9f6261a 100755 --- a/hack/manifests/storage/longhorn.sh +++ b/hack/manifests/storage/longhorn.sh @@ -12,4 +12,4 @@ z exp helm repo-update # z helm upgrade -i longhorn install/longhorn -n quickon-storage --create-namespace --set ingress.host=lh.local -# z exp helm upgrade --repo install --name longhorn -n quickon-storage --chart longhorn --set ingress.host=lh.local +z exp helm upgrade --repo install --name longhorn -n quickon-storage --chart longhorn --set ingress.host=lh.local diff --git a/hack/manifests/storage/openebs-jiva.sh b/hack/manifests/storage/openebs-jiva.sh deleted file mode 100644 index afe85142..00000000 --- a/hack/manifests/storage/openebs-jiva.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2021-2023 北京渠成软件有限公司(Beijing Qucheng Software Co., Ltd. www.qucheng.com) All rights reserved. -# Use of this source code is covered by the following dual licenses: -# (1) Z PUBLIC LICENSE 1.2 (ZPL 1.2) -# (2) Affero General Public License 3.0 (AGPL 3.0) -# license that can be found in the LICENSE file. - - -helm repo add q-stable https://hub.zentao.net/chartrepo/stable -helm repo update -helm upgrade -i openebs q-stable/openebs -n quickon-storage --create-namespace