Skip to content

Commit

Permalink
Use the new registry endpoint in the annoucements to the kubernetes-d…
Browse files Browse the repository at this point in the history
…ev mailing list (kubernetes#2746)

* use the new registry endpoint in the annoucements

* strip newline

* fix release manager urls + use a const for registry

* update all occurences of release-managers.md
  • Loading branch information
upodroid authored and wespanther committed Jun 2, 2023
1 parent 7b7ab9f commit 1424753
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,4 @@ Please see [CONTRIBUTING.md](CONTRIBUTING.md) for instructions on how to contrib

[kubernetes/kubernetes]: https://git.k8s.io/kubernetes
[Branch Manager Handbook]: https://git.k8s.io/sig-release/release-engineering/role-handbooks/branch-manager.md
[release-managers]: https://git.k8s.io/sig-release/release-managers.md
[release-managers]: https://git.k8s.io/website/content/en/releases/release-managers.md
4 changes: 2 additions & 2 deletions cmd/krel/cmd/announce_build.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const semVerRegex string = `^?(\d+)(\.\d+)?(\.\d+)`
const branchCreationMsg = `Kubernetes Community,
<p>Kubernetes' {{ .Branch }} branch has been created.</p>
<p>The release owner will be sending updates on how to interact with this branch shortly. The <a href=https://git.k8s.io/community/contributors/devel/sig-release/cherry-picks.md target="_blank">Cherrypick Guide</a> has some general guidance on how things will proceed.</p>
<p>Announced by your <a href=https://git.k8s.io/sig-release/release-managers.md target="_blank">Kubernetes Release Managers</a>.</p>
<p>Announced by your <a href=https://git.k8s.io/website/content/en/releases/release-managers.md target="_blank">Kubernetes Release Managers</a>.</p>
`

const releaseAnnouncementMsg = `Kubernetes Community,
Expand All @@ -52,7 +52,7 @@ const releaseAnnouncementMsg = `Kubernetes Community,
<p><hr>{{ .ChangelogHTML }}<hr></p>
<p><br>Contributors, the <a href=https://git.k8s.io/kubernetes/{{ .ChangelogFilePath }}/#{{ .StrippedTag }} target="_blank">{{ .ChangelogFileName }}</a> has been bootstrapped with {{ .Tag }} release notes and you may edit now as needed.</p>
<p><br><br>Published by your <a href=https://kubernetes.io/releases/release-managers/ href target="_blank">Kubernetes Release Managers</a>.</p>
<p><br><br>Published by your <a href=hhttps://git.k8s.io/website/content/en/releases/release-managers.md href target="_blank">Kubernetes Release Managers</a>.</p>
`

// buildAnnounceCmd represents the subcommand for `krel announce build`
Expand Down
2 changes: 1 addition & 1 deletion hack/rapture/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ If there is continued test failure on this dashboard without intervention from t
[branch-manager-handbook]: https://github.com/kubernetes/sig-release/tree/master/release-engineering/role-handbooks/branch-manager.md
[kubeadm-install]: https://kubernetes.io/docs/setup/independent/install-kubeadm/#installing-kubeadm-kubelet-and-kubectl
[kubernetes/release]: https://git.k8s.io/release
[kubernetes-build-admins]: https://kubernetes.io/releases/release-managers/#build-admins
[kubernetes-build-admins]: https://git.k8s.io/website/content/en/releases/release-managers.md#build-admins
[rapture]: k8s-rapture.sh
[rapture-readme]: https://g3doc.corp.google.com/cloud/kubernetes/g3doc/release/rapture.md?cl=head
[release-engineering-dashboard]: https://testgrid.k8s.io/sig-release-releng-informing
Expand Down
4 changes: 2 additions & 2 deletions pkg/announce/announce.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ shortly. The <a href=https://git.k8s.io/community/contributors/devel/sig-release
Guide</A> has some general guidance on how things will proceed.
<p>
Announced by your
<a href=https://git.k8s.io/sig-release/release-managers.md>Kubernetes Release
<a href=https://git.k8s.io/website/content/en/releases/release-managers.md>Kubernetes Release
Managers</A>.
`

Expand All @@ -65,7 +65,7 @@ Contributors, the
%s release notes and you may edit now as needed.
<p><br><br>
Published by your
<a href=https://kubernetes.io/releases/release-managers/>Kubernetes Release
<a href=https://git.k8s.io/website/content/en/releases/release-managers.md>Kubernetes Release
Managers</a>.
`

Expand Down
7 changes: 4 additions & 3 deletions pkg/notes/document/document.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (
"github.com/sirupsen/logrus"
"golang.org/x/text/cases"
"golang.org/x/text/language"
"sigs.k8s.io/promo-tools/v3/image"
"sigs.k8s.io/release-utils/hash"

"k8s.io/release/pkg/cve"
Expand All @@ -39,6 +38,8 @@ import (
"k8s.io/release/pkg/release"
)

const prodRegistry = "registry.k8s.io"

// Document represents the underlying structure of a release notes document.
type Document struct {
NotesWithActionRequired notes.Notes `json:"action_required"`
Expand Down Expand Up @@ -112,7 +113,7 @@ func fetchImageMetadata(dir, tag string) (*ImageMetadata, error) {
}

manifests, err := release.NewImages().GetManifestImages(
image.ProdRegistry, tag, dir, nil,
prodRegistry, tag, dir, nil,
)
if err != nil {
return nil, fmt.Errorf("get manifest images: %w", err)
Expand All @@ -129,7 +130,7 @@ func fetchImageMetadata(dir, tag string) (*ImageMetadata, error) {
const linkBase = "https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/"

for manifest, tempArchitectures := range manifests {
imageName := strings.TrimPrefix(manifest, image.ProdRegistry+"/")
imageName := strings.TrimPrefix(manifest, prodRegistry+"/")

architectures := []string{}
for _, architecture := range tempArchitectures {
Expand Down
4 changes: 2 additions & 2 deletions pkg/notes/document/document_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ func setupTestDir(t *testing.T, dir string) {
} {
repoTagTarball(t,
filepath.Join(archDir, file),
"k8s.gcr.io/"+strings.TrimSuffix(file, ".tar")+":v1.16.0",
"registry.k8s.io/"+strings.TrimSuffix(file, ".tar")+":v1.16.0",
)
}
}
Expand Down Expand Up @@ -568,5 +568,5 @@ func makeReleaseNote(kind notes.Kind, markdown string) *notes.ReleaseNote {
func readFile(t *testing.T, path string) string {
b, err := os.ReadFile(path)
require.NoError(t, err, "Reading file %q", path)
return string(b)
return strings.TrimSpace(string(b))
}
12 changes: 6 additions & 6 deletions pkg/notes/document/testdata/document.md.golden
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ adding the "-$ARCH" suffix to the container image name.

name | architectures
---- | -------------
[k8s.gcr.io/conformance:v1.16.1](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/conformance) | [amd64](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/conformance-amd64), [arm](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/conformance-arm), [arm64](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/conformance-arm64), [ppc64le](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/conformance-ppc64le), [s390x](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/conformance-s390x)
[k8s.gcr.io/kube-apiserver:v1.16.1](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-apiserver) | [amd64](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-apiserver-amd64), [arm](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-apiserver-arm), [arm64](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-apiserver-arm64), [ppc64le](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-apiserver-ppc64le), [s390x](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-apiserver-s390x)
[k8s.gcr.io/kube-controller-manager:v1.16.1](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-controller-manager) | [amd64](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-controller-manager-amd64), [arm](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-controller-manager-arm), [arm64](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-controller-manager-arm64), [ppc64le](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-controller-manager-ppc64le), [s390x](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-controller-manager-s390x)
[k8s.gcr.io/kube-proxy:v1.16.1](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-proxy) | [amd64](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-proxy-amd64), [arm](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-proxy-arm), [arm64](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-proxy-arm64), [ppc64le](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-proxy-ppc64le), [s390x](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-proxy-s390x)
[k8s.gcr.io/kube-scheduler:v1.16.1](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-scheduler) | [amd64](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-scheduler-amd64), [arm](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-scheduler-arm), [arm64](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-scheduler-arm64), [ppc64le](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-scheduler-ppc64le), [s390x](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-scheduler-s390x)
[registry.k8s.io/conformance:v1.16.1](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/conformance) | [amd64](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/conformance-amd64), [arm](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/conformance-arm), [arm64](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/conformance-arm64), [ppc64le](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/conformance-ppc64le), [s390x](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/conformance-s390x)
[registry.k8s.io/kube-apiserver:v1.16.1](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-apiserver) | [amd64](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-apiserver-amd64), [arm](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-apiserver-arm), [arm64](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-apiserver-arm64), [ppc64le](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-apiserver-ppc64le), [s390x](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-apiserver-s390x)
[registry.k8s.io/kube-controller-manager:v1.16.1](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-controller-manager) | [amd64](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-controller-manager-amd64), [arm](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-controller-manager-arm), [arm64](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-controller-manager-arm64), [ppc64le](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-controller-manager-ppc64le), [s390x](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-controller-manager-s390x)
[registry.k8s.io/kube-proxy:v1.16.1](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-proxy) | [amd64](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-proxy-amd64), [arm](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-proxy-arm), [arm64](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-proxy-arm64), [ppc64le](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-proxy-ppc64le), [s390x](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-proxy-s390x)
[registry.k8s.io/kube-scheduler:v1.16.1](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-scheduler) | [amd64](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-scheduler-amd64), [arm](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-scheduler-arm), [arm64](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-scheduler-arm64), [ppc64le](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-scheduler-ppc64le), [s390x](https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/kube-scheduler-s390x)

## Urgent Upgrade Notes

Expand Down Expand Up @@ -99,4 +99,4 @@ name | architectures

### Uncategorized

- Uncategorized note.
- Uncategorized note.
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@

### Uncategorized

- Uncategorized note.
- Uncategorized note.

0 comments on commit 1424753

Please sign in to comment.