Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/cli.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: CLI

# Release the bind CLI on FINAL tags via goreleaser (archives, checksums,
# GitHub release), then let krew-release-bot render .krew.yaml and PR
# krew-index for the "bind" plugin (name kept from v1; archive binary is
# kubectl-bind).
# GitHub release). The "bind" krew plugin is published to two indexes:
# goreleaser's krews pushes the manifest to the custom index
# kbind-dev/krew-index (KREW_GITHUB_TOKEN), and krew-release-bot renders
# .krew.yaml and PRs the central kubernetes-sigs/krew-index (the first
# central submission must be a manual PR, the bot only updates existing
# plugins).
#
# Release candidates (v*-rc*, any v*-* prerelease) do NOT release the CLI:
# users' binaries and the krew plugin only move forward on final versions.
Expand Down Expand Up @@ -33,6 +36,7 @@ jobs:
- name: Run goreleaser
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KREW_GITHUB_TOKEN: ${{ secrets.KREW_GITHUB_TOKEN }}
run: go run github.com/goreleaser/goreleaser/v2@v2.5.0 release --clean

# Renders .krew.yaml against this release and PRs krew-index. Pinned by
Expand Down
30 changes: 29 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# goreleaser config for the bind CLI (pinned to goreleaser v2.5.x in CI).
# Archives carry the binary as kubectl-bind for the krew "bind" plugin;
# krew-release-bot (not goreleaser's krews) PRs upstream krew-index.
# krews below pushes the manifest to the custom kbind-dev/krew-index, and
# krew-release-bot PRs the central kubernetes-sigs/krew-index.
version: 2

project_name: bind
Expand Down Expand Up @@ -48,3 +49,30 @@ snapshot:

changelog:
use: github-native

# Push the rendered "bind" manifest to the project's custom krew index
# (kbind-dev/krew-index) on final releases, as v1 did. The central
# kubernetes-sigs/krew-index is updated separately by krew-release-bot.
krews:
- name: bind
ids:
- bind
repository:
owner: kbind-dev
name: krew-index
token: "{{ .Env.KREW_GITHUB_TOKEN }}"
commit_msg_template: "Krew manifest update for kbind version {{ .Tag }}"
homepage: https://github.com/kbind-dev/kbind
short_description: Bind a service provider's APIs into your cluster
description: |
bind binds APIs exported by a provider cluster into your cluster:
log in to a provider's gateway, browse its catalog, and bind a service.
The result is a one-apply bundle (Secret + Connection + ClusterBinding)
consumed by the konnector, the only component that runs on your side.
caveats: |
Typical flow:
kubectl bind login https://provider.example.com
kubectl bind connect # install the konnector
kubectl bind catalog
kubectl bind export <name> # or: export <name> -o yaml (GitOps)
skip_upload: auto
7 changes: 4 additions & 3 deletions .krew.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# krew-release-bot template for the "bind" plugin (name kept from v1 — the
# CLI binary is kbind, installed via krew as `kubectl bind`). The bot renders
# this on every GitHub release and opens the krew-index PR.
# krew-release-bot template for the central kubernetes-sigs/krew-index
# ("bind" plugin, binary kubectl-bind, installed as `kubectl bind`). The bot
# renders this on every GitHub release and PRs krew-index. The custom index
# kbind-dev/krew-index is updated by goreleaser's krews instead.
apiVersion: krew.googlecontainertools.github.com/v1alpha2
kind: Plugin
metadata:
Expand Down
17 changes: 17 additions & 0 deletions docs/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,23 @@ git push origin v2.0.1 sdk/v2.0.1
gh release create v2.0.1 --generate-notes
```

## krew indexes

The `bind` plugin is published to two krew indexes on final releases:

- **Custom index** [kbind-dev/krew-index](https://github.com/kbind-dev/krew-index):
goreleaser's `krews` pushes the manifest directly (needs the
`KREW_GITHUB_TOKEN` secret). Users: `kubectl krew index add kube-bind
https://github.com/kbind-dev/krew-index.git && kubectl krew install
kube-bind/bind`.
- **Central index** kubernetes-sigs/krew-index: krew-release-bot renders
`.krew.yaml` and opens the version-bump PR. The first submission must be
a manual PR adding `plugins/bind.yaml`, the bot only updates existing
plugins.

A krew index serves one version per plugin, so publishing v2.0.0 moves
`kube-bind/bind` users forward from v1 on their next `krew upgrade`.

## Naming conventions

Documentation follows the release: pushes to `main` publish the `main`
Expand Down