From c4fe19d4b5490b69ad76d57a078f4176e82f8780 Mon Sep 17 00:00:00 2001 From: Deshi Xiao Date: Fri, 17 Nov 2023 22:39:26 +0800 Subject: [PATCH] fix:correct mod name for k8e Signed-off-by: Deshi Xiao --- hack/build | 2 +- hack/version.sh | 4 ++-- pkg/apis/k8e.cattle.io/v1/types.go | 2 +- pkg/clientaccess/token_test.go | 2 +- pkg/crd/crds.go | 4 ++-- pkg/daemons/executor/embed.go | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hack/build b/hack/build index f288ebae..713ea79b 100755 --- a/hack/build +++ b/hack/build @@ -133,7 +133,7 @@ fi echo Building k8e CGO_ENABLED=1 "${GO}" build $BLDFLAGS -tags "$TAGS" -buildvcs=false -gcflags="all=${GCFLAGS}" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o bin/k8e${BINARY_POSTFIX} ./cmd/server -for i in "${k3s_binaries[@]}"; do +for i in "${k8e_binaries[@]}"; do ln -s "k8e${BINARY_POSTFIX}" "$i${BINARY_POSTFIX}" done diff --git a/hack/version.sh b/hack/version.sh index ff481cc4..e99299b0 100644 --- a/hack/version.sh +++ b/hack/version.sh @@ -41,8 +41,8 @@ if [ -z "$VERSION_CRICTL" ]; then VERSION_CRICTL="v0.0.0" fi -VERSION_K8S_K3S=$(get-module-version k8s.io/kubernetes) -VERSION_K8S=${VERSION_K8S_K3S%"-k3s1"} +VERSION_K8S_K8E=$(get-module-version k8s.io/kubernetes) +VERSION_K8S=${VERSION_K8S_K8E%"-k3s1"} if [ -z "$VERSION_K8S" ]; then VERSION_K8S="v0.0.0" fi diff --git a/pkg/apis/k8e.cattle.io/v1/types.go b/pkg/apis/k8e.cattle.io/v1/types.go index 914638e0..6183b917 100644 --- a/pkg/apis/k8e.cattle.io/v1/types.go +++ b/pkg/apis/k8e.cattle.io/v1/types.go @@ -53,7 +53,7 @@ type ETCDSnapshotSpec struct { // Location is the absolute file:// or s3:// URI address of the snapshot. Location string `json:"location" column:""` // Metadata contains point-in-time snapshot of the contents of the - // k3s-etcd-snapshot-extra-metadata ConfigMap's data field, at the time the + // k8e-etcd-snapshot-extra-metadata ConfigMap's data field, at the time the // snapshot was taken. This is intended to contain data about cluster state // that may be important for an external system to have available when restoring // the snapshot. diff --git a/pkg/clientaccess/token_test.go b/pkg/clientaccess/token_test.go index 25fa7cd2..62323259 100644 --- a/pkg/clientaccess/token_test.go +++ b/pkg/clientaccess/token_test.go @@ -344,7 +344,7 @@ func Test_UnitParseAndGet(t *testing.T) { } } -// newTLSServer returns a HTTPS server that mocks the basic functionality required to validate K3s join tokens. +// newTLSServer returns a HTTPS server that mocks the basic functionality required to validate K8e join tokens. // Each call to this function will generate new CA and server certificates unique to the returned server. func newTLSServer(t *testing.T, username, password string, sendWrongCA bool) *httptest.Server { var server *httptest.Server diff --git a/pkg/crd/crds.go b/pkg/crd/crds.go index e9a429bf..5ee7c4f2 100644 --- a/pkg/crd/crds.go +++ b/pkg/crd/crds.go @@ -9,11 +9,11 @@ func List() []crd.CRD { addon := v1.Addon{} etcdSnapshotFile := v1.ETCDSnapshotFile{} return []crd.CRD{ - crd.NamespacedType("Addon.k3s.cattle.io/v1"). + crd.NamespacedType("Addon.k8e.cattle.io/v1"). WithSchemaFromStruct(addon). WithColumn("Source", ".spec.source"). WithColumn("Checksum", ".spec.checksum"), - crd.NonNamespacedType("ETCDSnapshotFile.k3s.cattle.io/v1"). + crd.NonNamespacedType("ETCDSnapshotFile.k8e.cattle.io/v1"). WithSchemaFromStruct(etcdSnapshotFile). WithColumn("SnapshotName", ".spec.snapshotName"). WithColumn("Node", ".spec.nodeName"). diff --git a/pkg/daemons/executor/embed.go b/pkg/daemons/executor/embed.go index fac1dc12..25783015 100644 --- a/pkg/daemons/executor/embed.go +++ b/pkg/daemons/executor/embed.go @@ -53,7 +53,7 @@ func (e *Embedded) Bootstrap(ctx context.Context, nodeConfig *daemonconfig.Node, go func() { // Ensure that the log verbosity remains set to the configured level by resetting it at 1-second intervals - // for the first 2 minutes that K3s is starting up. This is necessary because each of the Kubernetes + // for the first 2 minutes that K8e is starting up. This is necessary because each of the Kubernetes // components will initialize klog and reset the verbosity flag when they are starting. logCtx, cancel := context.WithTimeout(ctx, time.Second*120) defer cancel()