Skip to content

Commit b3e214e

Browse files
authored
Rename example-backend to backend (#328)
1 parent 7eb3ed8 commit b3e214e

7 files changed

Lines changed: 21 additions & 18 deletions

File tree

.github/workflows/image.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ jobs:
4747
-a run_id=${{ github.run_id }} \
4848
-a run_attempt=${{ github.run_attempt }}
4949
50-
- name: Publish and sign example-backend image
50+
- name: Publish and sign backend image
5151
env:
52-
KO_DOCKER_REPO: ghcr.io/${{ github.repository_owner }}/example-backend
52+
KO_DOCKER_REPO: ghcr.io/${{ github.repository_owner }}/backend
5353
COSIGN_EXPERIMENTAL: 'true'
5454
run: |
5555
echo "${{ github.token }}" | ko login ghcr.io --username "${{ github.actor }}" --password-stdin
56-
img=$(ko build --bare --platform=all -t latest -t ${{ github.sha }} -t ${{github.ref_name}} ./cmd/example-backend)
56+
img=$(ko build --bare --platform=all -t latest -t ${{ github.sha }} -t ${{github.ref_name}} ./cmd/backend)
5757
echo "built ${img}"
5858
cosign sign ${img} \
5959
--yes \

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,20 +384,20 @@ image-local:
384384
-t $(REV) \
385385
./cmd/konnector
386386

387-
@echo "Building example-backend image locally..."
387+
@echo "Building backend image locally..."
388388
KO_DOCKER_REPO=$(KO_DOCKER_REPO) ko build \
389389
--local \
390390
-B \
391391
-t $(REV) \
392-
./cmd/example-backend
392+
./cmd/backend
393393

394394
@echo "Successfully built local images with tag $(REV)"
395395

396396
.PHONY: kind-load
397397
kind-load:
398398
@echo "Loading images into kind cluster '$(KIND_CLUSTER)'"
399399
kind load docker-image $(KO_DOCKER_REPO)/konnector:$(REV) --name $(KIND_CLUSTER)
400-
kind load docker-image $(KO_DOCKER_REPO)/example-backend:$(REV) --name $(KIND_CLUSTER)
400+
kind load docker-image $(KO_DOCKER_REPO)/backend:$(REV) --name $(KIND_CLUSTER)
401401
@echo "Successfully loaded images into kind cluster '$(KIND_CLUSTER)'"
402402

403403
include Makefile.venv

backend/http/handler.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,17 @@ func (h *handler) handleServiceExport(w http.ResponseWriter, r *http.Request) {
143143
logger.Error(err, "failed to parse version %q", componentbaseversion.Get().GitVersion)
144144
ver = "v0.0.0"
145145
}
146-
146+
prettyName := h.providerPrettyName
147+
if prettyName == "" {
148+
prettyName = "backend"
149+
}
147150
provider := &kubebindv1alpha2.BindingProvider{
148151
TypeMeta: metav1.TypeMeta{
149152
APIVersion: kubebindv1alpha2.GroupVersion,
150153
Kind: "BindingProvider",
151154
},
152155
Version: ver,
153-
ProviderPrettyName: "example-backend",
156+
ProviderPrettyName: prettyName,
154157
AuthenticationMethods: []kubebindv1alpha2.AuthenticationMethod{
155158
{
156159
Method: "OAuth2CodeGrant",

docs/content/contributing/guides/publishing-a-new-kube-bind-release.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,31 +29,31 @@ kube-bind has 3 go modules, and a unique tag is needed for each module every tim
2929

3030
```shell
3131
REF=upstream/main
32-
TAG=v0.5.0
32+
TAG=v0.5.0-rc2
3333
git tag --sign --message "$TAG" "$TAG" "$REF"
3434
```
3535

3636
3. Tag the `sdk` module, following the same logic as above for `REF` and `TAG`
3737

3838
```shell
3939
REF=upstream/main
40-
TAG=v0.5.0
40+
TAG=v0.5.0-rc2
4141
git tag --sign --message "sdk/$TAG" "sdk/$TAG" "$REF"
4242
```
4343

4444
4. Tag the `cli` module, following the same logic as above for `REF` and `TAG`
4545

4646
```shell
4747
REF=upstream/main
48-
TAG=v0.5.0
48+
TAG=v0.5.0-rc2
4949
git tag --sign --message "cli/$TAG" "cli/$TAG" "$REF"
5050
```
5151

5252
### Push the Tags
5353

5454
```shell
5555
REMOTE=upstream
56-
TAG=v0.5.0
56+
TAG=v0.5.0-rc2
5757
git push "$REMOTE" "$TAG" "sdk/$TAG" "cli/$TAG"
5858
```
5959

docs/content/setup/local-setup-with-kind.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This guide will walk you through setting up kube-bind between two Kubernetes clusters, where
44

55
* **Backend cluster**:
6-
* Deploys dex, cert-manager and kube-bind/example-backend
6+
* Deploys dex, cert-manager and kube-bind/backend
77
* Provides kube-bind compatible backend for MangoDB resources
88
* **App cluster**:
99
* Provides an application consuming MangoDBs
@@ -161,9 +161,9 @@ kubectl create clusterrolebinding backend-admin --clusterrole cluster-admin --se
161161
# Create a new Deployment for the MangoDB backend.
162162
kubectl --namespace backend \
163163
create deployment mangodb \
164-
--image ghcr.io/kube-bind/example-backend:v0.4.6 \
164+
--image ghcr.io/kube-bind/backend:v0.5.0 \
165165
--port 8080 \
166-
-- /ko-app/example-backend \
166+
-- /ko-app/backend \
167167
--listen-address 0.0.0.0:8080 \
168168
--external-address "${BACKEND_KUBE_API_EXTERNAL_ADDRESS}" \
169169
--oidc-issuer-client-secret=ZXhhbXBsZS1hcHAtc2VjcmV0 \

hack/kind-example-setup/backend-cluster.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ set -o errexit
1818
set -o nounset
1919
set -o pipefail
2020

21-
DEFAULT_EXAMPLE_BACKEND_IMAGE="ghcr.io/kube-bind/example-backend:v0.4.6"
21+
DEFAULT_EXAMPLE_BACKEND_IMAGE="ghcr.io/kube-bind/backend:v0.5.0"
2222

2323
if [[ -z "${HOST_IP:-}" ]]; then
2424
source "$(dirname "$0")/host-ip.sh"
@@ -130,7 +130,7 @@ kubectl --namespace backend \
130130
create deployment mangodb \
131131
--image ${example_backend_image} \
132132
--port 8080 \
133-
-- /ko-app/example-backend \
133+
-- /ko-app/backend \
134134
--listen-address 0.0.0.0:8080 \
135135
--external-address "${BACKEND_KUBE_API_EXTERNAL_ADDRESS}" \
136136
--oidc-issuer-client-secret=ZXhhbXBsZS1hcHAtc2VjcmV0 \

test/e2e/framework/backend.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func StartBackendWithoutDefaultArgs(t *testing.T, clientConfig *rest.Config, arg
7070
)
7171
require.NoError(t, err)
7272

73-
fs := pflag.NewFlagSet("example-backend", pflag.ContinueOnError)
73+
fs := pflag.NewFlagSet("backend", pflag.ContinueOnError)
7474
opts := options.NewOptions()
7575
opts.AddFlags(fs)
7676
err = fs.Parse(args)

0 commit comments

Comments
 (0)