Skip to content

Commit

Permalink
Recognize kops-controller in registry.k8s.io
Browse files Browse the repository at this point in the history
We had hard-coded k8s.gcr.io, but this is also available in registry.k8s.io

Also cleanup a few comments
  • Loading branch information
justinsb committed Sep 18, 2023
1 parent 86d90f1 commit 1bf8485
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/assets/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ func (a *AssetBuilder) RemapImage(image string) (string, error) {
}
}

if strings.HasPrefix(image, "registry.k8s.io/kops/kops-controller:") {
// To use user-defined DNS Controller:
if strings.HasPrefix(image, "k8s.gcr.io/kops/kops-controller:") || strings.HasPrefix(image, "registry.k8s.io/kops/kops-controller:") {
// To use user-defined kops Controller:
// 1. DOCKER_REGISTRY=[your docker hub repo] make kops-controller-push
// 2. export KOPSCONTROLLER_IMAGE=[your docker hub repo]
// 3. make kops and create/apply cluster
Expand Down
2 changes: 1 addition & 1 deletion pkg/truncate/truncate.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type TruncateStringOptions struct {
HashLength int
}

// TruncateString will attempt to truncate a string to a max, adding a prefix to avoid collisions.
// TruncateString will attempt to truncate a string to a max length, adding a suffix to avoid collisions.
// Will never return a string longer than maxLength chars
func TruncateString(s string, opt TruncateStringOptions) string {
if opt.MaxLength == 0 {
Expand Down

0 comments on commit 1bf8485

Please sign in to comment.