Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

Commit

Permalink
feat: default to current cluster-version
Browse files Browse the repository at this point in the history
close #30

Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
  • Loading branch information
ckotzbauer committed Jun 2, 2021
1 parent fb3fd59 commit 4af454b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/deprecation/deprecation.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,11 @@ func (d Deprecation) analyzeDeprecatedResource(

func (d Deprecation) isVersionIgnored(deprecation string) (bool, error) {
if d.K8sVersion == "" {
return false, nil
info, err := d.KubeClient.Client.ServerVersion()

if err == nil && info != nil {
d.K8sVersion = fmt.Sprintf("%s.%s", info.Major, info.Minor)
}
}

c, err := semver.NewConstraint("< " + deprecation)
Expand Down

0 comments on commit 4af454b

Please sign in to comment.