Skip to content

Commit 71bbaf0

Browse files
committed
Disallow the use of legacy addons
1 parent 8e4f9d1 commit 71bbaf0

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

addons/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
## Addons
22

3-
Read on [addons](../docs/addons.md)
3+
**Legacy addons are deprecated and unmaintained!!!**
4+
5+
Use [managed addons](../docs/addons.md) instead.

channels/pkg/cmd/apply_channel.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,11 @@ func RunApplyChannel(ctx context.Context, f Factory, out io.Writer, options *App
8888
// We recognize the following "well-known" format:
8989
// <name> with no slashes ->
9090
if strings.Contains(name, "/") {
91-
return fmt.Errorf("Channel format not recognized (did you mean to use `-f` to specify a local file?): %q", name)
92-
}
93-
expanded := "https://raw.githubusercontent.com/kubernetes/kops/master/addons/" + name + "/addon.yaml"
94-
location, err = url.Parse(expanded)
95-
if err != nil {
96-
return fmt.Errorf("unable to parse expanded argument %q as url", expanded)
91+
return fmt.Errorf("channel format not recognized (did you mean to use `-f` to specify a local file?): %q", name)
9792
}
93+
// Disallow the use of legacy addons from the "well-known" location:
94+
// https://raw.githubusercontent.com/kubernetes/kops/master/addons/<name>/addon.yaml
95+
return fmt.Errorf("legacy addons are deprecated and unmaintained, use managed addons instead")
9896
}
9997
o, err := channels.LoadAddons(name, location)
10098
if err != nil {

0 commit comments

Comments
 (0)