Skip to content

Commit

Permalink
Merge pull request #11867 from hakman/remove_addon_version
Browse files Browse the repository at this point in the history
Remove version from addons
  • Loading branch information
k8s-ci-robot committed Jun 25, 2021
2 parents ba1e486 + 580129c commit e5185b2
Show file tree
Hide file tree
Showing 30 changed files with 90 additions and 613 deletions.
13 changes: 1 addition & 12 deletions channels/pkg/api/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 0 additions & 15 deletions channels/pkg/api/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package api
import (
"fmt"

"github.com/blang/semver/v4"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/kops/pkg/values"
)
Expand All @@ -44,9 +43,6 @@ type AddonSpec struct {
// Selector is a label query over pods that should match the Replicas count.
Selector map[string]string `json:"selector"`

// Version is a semver version
Version *string `json:"version,omitempty"`

// Manifest is the URL to the manifest that should be applied
Manifest *string `json:"manifest,omitempty"`

Expand Down Expand Up @@ -78,17 +74,6 @@ func (a *Addons) Verify() error {
if addon == nil {
continue
}
if addon.Version != nil && *addon.Version != "" {
name := a.ObjectMeta.Name
if addon.Name != nil {
name = *addon.Name
}

_, err := semver.ParseTolerant(*addon.Version)
if err != nil {
return fmt.Errorf("addon %q has unparseable version %q: %v", name, *addon.Version, err)
}
}
if addon.KubernetesVersion != "" {
return fmt.Errorf("bootstrap addon %q has a KubernetesVersion", values.StringValue(addon.Name))
}
Expand Down
50 changes: 0 additions & 50 deletions channels/pkg/api/channel_test.go

This file was deleted.

3 changes: 0 additions & 3 deletions channels/pkg/channels/BUILD.bazel

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion channels/pkg/channels/addon.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ func (m *AddonMenu) MergeAddons(o *AddonMenu) {
func (a *Addon) ChannelVersion() *ChannelVersion {
return &ChannelVersion{
Channel: &a.ChannelName,
Version: a.Spec.Version,
Id: a.Spec.Id,
ManifestHash: a.Spec.ManifestHash,
}
Expand Down
14 changes: 0 additions & 14 deletions channels/pkg/channels/addons.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,6 @@ func ParseAddons(name string, location *url.URL, data []byte) (*Addons, error) {
}
}

for _, addon := range apiObject.Spec.Addons {
if addon != nil && addon.Version != nil && *addon.Version != "" {
name := apiObject.ObjectMeta.Name
if addon.Name != nil {
name = *addon.Name
}

_, err := semver.ParseTolerant(*addon.Version)
if err != nil {
return nil, fmt.Errorf("addon %q has unparseable version %q: %v", name, *addon.Version, err)
}
}
}

return &Addons{ChannelName: name, ChannelLocation: *location, APIObject: apiObject}, nil
}

Expand Down
Loading

0 comments on commit e5185b2

Please sign in to comment.