From 506ddb9be1a7f7b6caf524328d964cf2490400a4 Mon Sep 17 00:00:00 2001 From: Mangirdas Judeikis Date: Mon, 29 Sep 2025 11:34:40 +0300 Subject: [PATCH] more rename fixes --- .github/workflows/image.yaml | 6 +++--- Makefile | 6 +++--- backend/http/handler.go | 7 +++++-- .../guides/publishing-a-new-kube-bind-release.md | 8 ++++---- docs/content/setup/local-setup-with-kind.md | 6 +++--- hack/kind-example-setup/backend-cluster.sh | 4 ++-- test/e2e/framework/backend.go | 2 +- 7 files changed, 21 insertions(+), 18 deletions(-) diff --git a/.github/workflows/image.yaml b/.github/workflows/image.yaml index 9d9dc17bd..79b55e78c 100644 --- a/.github/workflows/image.yaml +++ b/.github/workflows/image.yaml @@ -47,13 +47,13 @@ jobs: -a run_id=${{ github.run_id }} \ -a run_attempt=${{ github.run_attempt }} - - name: Publish and sign example-backend image + - name: Publish and sign backend image env: - KO_DOCKER_REPO: ghcr.io/${{ github.repository_owner }}/example-backend + KO_DOCKER_REPO: ghcr.io/${{ github.repository_owner }}/backend COSIGN_EXPERIMENTAL: 'true' run: | echo "${{ github.token }}" | ko login ghcr.io --username "${{ github.actor }}" --password-stdin - img=$(ko build --bare --platform=all -t latest -t ${{ github.sha }} -t ${{github.ref_name}} ./cmd/example-backend) + img=$(ko build --bare --platform=all -t latest -t ${{ github.sha }} -t ${{github.ref_name}} ./cmd/backend) echo "built ${img}" cosign sign ${img} \ --yes \ diff --git a/Makefile b/Makefile index 06ca1e3e4..d2d2d00da 100644 --- a/Makefile +++ b/Makefile @@ -384,12 +384,12 @@ image-local: -t $(REV) \ ./cmd/konnector - @echo "Building example-backend image locally..." + @echo "Building backend image locally..." KO_DOCKER_REPO=$(KO_DOCKER_REPO) ko build \ --local \ -B \ -t $(REV) \ - ./cmd/example-backend + ./cmd/backend @echo "Successfully built local images with tag $(REV)" @@ -397,7 +397,7 @@ image-local: kind-load: @echo "Loading images into kind cluster '$(KIND_CLUSTER)'" kind load docker-image $(KO_DOCKER_REPO)/konnector:$(REV) --name $(KIND_CLUSTER) - kind load docker-image $(KO_DOCKER_REPO)/example-backend:$(REV) --name $(KIND_CLUSTER) + kind load docker-image $(KO_DOCKER_REPO)/backend:$(REV) --name $(KIND_CLUSTER) @echo "Successfully loaded images into kind cluster '$(KIND_CLUSTER)'" include Makefile.venv diff --git a/backend/http/handler.go b/backend/http/handler.go index e80864dfd..0b0dca46e 100644 --- a/backend/http/handler.go +++ b/backend/http/handler.go @@ -143,14 +143,17 @@ func (h *handler) handleServiceExport(w http.ResponseWriter, r *http.Request) { logger.Error(err, "failed to parse version %q", componentbaseversion.Get().GitVersion) ver = "v0.0.0" } - + prettyName := h.providerPrettyName + if prettyName == "" { + prettyName = "backend" + } provider := &kubebindv1alpha2.BindingProvider{ TypeMeta: metav1.TypeMeta{ APIVersion: kubebindv1alpha2.GroupVersion, Kind: "BindingProvider", }, Version: ver, - ProviderPrettyName: "example-backend", + ProviderPrettyName: prettyName, AuthenticationMethods: []kubebindv1alpha2.AuthenticationMethod{ { Method: "OAuth2CodeGrant", diff --git a/docs/content/contributing/guides/publishing-a-new-kube-bind-release.md b/docs/content/contributing/guides/publishing-a-new-kube-bind-release.md index 863257218..a29e062cb 100644 --- a/docs/content/contributing/guides/publishing-a-new-kube-bind-release.md +++ b/docs/content/contributing/guides/publishing-a-new-kube-bind-release.md @@ -29,7 +29,7 @@ kube-bind has 3 go modules, and a unique tag is needed for each module every tim ```shell REF=upstream/main - TAG=v0.5.0 + TAG=v0.5.0-rc2 git tag --sign --message "$TAG" "$TAG" "$REF" ``` @@ -37,7 +37,7 @@ kube-bind has 3 go modules, and a unique tag is needed for each module every tim ```shell REF=upstream/main - TAG=v0.5.0 + TAG=v0.5.0-rc2 git tag --sign --message "sdk/$TAG" "sdk/$TAG" "$REF" ``` @@ -45,7 +45,7 @@ kube-bind has 3 go modules, and a unique tag is needed for each module every tim ```shell REF=upstream/main - TAG=v0.5.0 + TAG=v0.5.0-rc2 git tag --sign --message "cli/$TAG" "cli/$TAG" "$REF" ``` @@ -53,7 +53,7 @@ kube-bind has 3 go modules, and a unique tag is needed for each module every tim ```shell REMOTE=upstream - TAG=v0.5.0 + TAG=v0.5.0-rc2 git push "$REMOTE" "$TAG" "sdk/$TAG" "cli/$TAG" ``` diff --git a/docs/content/setup/local-setup-with-kind.md b/docs/content/setup/local-setup-with-kind.md index 65dd2ae47..d7122baf7 100644 --- a/docs/content/setup/local-setup-with-kind.md +++ b/docs/content/setup/local-setup-with-kind.md @@ -3,7 +3,7 @@ This guide will walk you through setting up kube-bind between two Kubernetes clusters, where * **Backend cluster**: - * Deploys dex, cert-manager and kube-bind/example-backend + * Deploys dex, cert-manager and kube-bind/backend * Provides kube-bind compatible backend for MangoDB resources * **App cluster**: * Provides an application consuming MangoDBs @@ -161,9 +161,9 @@ kubectl create clusterrolebinding backend-admin --clusterrole cluster-admin --se # Create a new Deployment for the MangoDB backend. kubectl --namespace backend \ create deployment mangodb \ - --image ghcr.io/kube-bind/example-backend:v0.4.6 \ + --image ghcr.io/kube-bind/backend:v0.5.0 \ --port 8080 \ - -- /ko-app/example-backend \ + -- /ko-app/backend \ --listen-address 0.0.0.0:8080 \ --external-address "${BACKEND_KUBE_API_EXTERNAL_ADDRESS}" \ --oidc-issuer-client-secret=ZXhhbXBsZS1hcHAtc2VjcmV0 \ diff --git a/hack/kind-example-setup/backend-cluster.sh b/hack/kind-example-setup/backend-cluster.sh index 2bb03ab37..c8a4f32fc 100755 --- a/hack/kind-example-setup/backend-cluster.sh +++ b/hack/kind-example-setup/backend-cluster.sh @@ -18,7 +18,7 @@ set -o errexit set -o nounset set -o pipefail -DEFAULT_EXAMPLE_BACKEND_IMAGE="ghcr.io/kube-bind/example-backend:v0.4.6" +DEFAULT_EXAMPLE_BACKEND_IMAGE="ghcr.io/kube-bind/backend:v0.5.0" if [[ -z "${HOST_IP:-}" ]]; then source "$(dirname "$0")/host-ip.sh" @@ -130,7 +130,7 @@ kubectl --namespace backend \ create deployment mangodb \ --image ${example_backend_image} \ --port 8080 \ - -- /ko-app/example-backend \ + -- /ko-app/backend \ --listen-address 0.0.0.0:8080 \ --external-address "${BACKEND_KUBE_API_EXTERNAL_ADDRESS}" \ --oidc-issuer-client-secret=ZXhhbXBsZS1hcHAtc2VjcmV0 \ diff --git a/test/e2e/framework/backend.go b/test/e2e/framework/backend.go index 84b6e8c24..135bf84e7 100644 --- a/test/e2e/framework/backend.go +++ b/test/e2e/framework/backend.go @@ -70,7 +70,7 @@ func StartBackendWithoutDefaultArgs(t *testing.T, clientConfig *rest.Config, arg ) require.NoError(t, err) - fs := pflag.NewFlagSet("example-backend", pflag.ContinueOnError) + fs := pflag.NewFlagSet("backend", pflag.ContinueOnError) opts := options.NewOptions() opts.AddFlags(fs) err = fs.Parse(args)