Skip to content

Commit

Permalink
Reorganize the deprecations list
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Suderman committed Apr 17, 2020
1 parent ac5df95 commit 1191425
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions pkg/api/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,42 +61,36 @@ type Version struct {

// VersionList is a set of apiVersions and if they are deprecated or not.
// TODO: Find a better way to generate this.
// Currently using the list for 1.16 from here: https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16/
var VersionList = []Version{
// Deployments
// Not Removed or Deprecated
{"apps/v1", "Deployment", "", "", ""},
{"networking.k8s.io/v1", "NetworkPolicy", "", "", ""},
{"policy/v1beta1", "PodSecurityPolicy", "", "", ""},

// Removed in 1.16
{"extensions/v1beta1", "Deployment", "v1.9.0", "v1.16.0", "apps/v1"},
{"apps/v1beta2", "Deployment", "v1.9.0", "v1.16.0", "apps/v1"},
{"apps/v1beta1", "Deployment", "v1.9.0", "v1.16.0", "apps/v1"},

// StatefulSet
{"apps/v1beta1", "StatefulSet", "v1.9.0", "v1.16.0", "apps/v1"},
{"apps/v1beta2", "StatefulSet", "v1.9.0", "v1.16.0", "apps/v1"},

// NetworkPolicy
{"networking.k8s.io/v1", "NetworkPolicy", "", "", ""},
{"extensions/v1beta1", "NetworkPolicy", "v1.9.0", "v1.16.0", "networking.k8s.io/v1"},

// DaemonSet
{"apps/v1beta2", "DaemonSet", "v1.9.0", "v1.16.0", "apps/v1"},
{"extensions/v1beta1", "DaemonSet", "v1.9.0", "v1.16.0", "apps/v1"},

// PodSecurityPolicy
{"policy/v1beta1", "PodSecurityPolicy", "", "", ""},
{"extensions/v1beta1", "PodSecurityPolicy", "v1.10.0", "v1.16.0", "policy/v1beta1"},

// ReplicaSet
{"extensions/v1beta1", "ReplicaSet", "", "v1.16.0", "apps/v1"},
{"apps/v1beta1", "ReplicaSet", "", "v1.16.0", "apps/v1"},
{"apps/v1beta2", "ReplicaSet", "", "v1.16.0", "apps/v1"},

// MutatingWebhookConfiguration
// Removed in 1.19
{"admissionregistration.k8s.io/v1beta1", "MutatingWebhookConfiguration", "v1.16.0", "v1.19.0", "admissionregistration.k8s.io/v1"},

// CustomResourceDefinition
{"apiextensions.k8s.io/v1beta1", "CustomResourceDefinition", "v1.16.0", "v1.19.0", "apiextensions.k8s.io/v1"},

// Rbac
// Removed in 1.20
{"rbac.authorization.k8s.io/v1alpha1", "ClusterRoleBinding", "v1.17.0", "v1.20.0", "rbac.authorization.k8s.io/v1"},
{"rbac.authorization.k8s.io/v1alpha1", "ClusterRole", "v1.17.0", "v1.20.0", "rbac.authorization.k8s.io/v1"},
{"rbac.authorization.k8s.io/v1alpha1", "ClusterRoleBindingList", "v1.17.0", "v1.20.0", "rbac.authorization.k8s.io/v1"},
Expand All @@ -106,7 +100,7 @@ var VersionList = []Version{
{"rbac.authorization.k8s.io/v1alpha1", "RoleList", "v1.17.0", "v1.20.0", "rbac.authorization.k8s.io/v1"},
{"rbac.authorization.k8s.io/v1alpha1", "RoleBindingList", "v1.17.0", "v1.20.0", "rbac.authorization.k8s.io/v1"},

//CSINode
// Unknown Removal, but deprecated
{"storage.k8s.io/v1beta1", "CSINode", "v1.17.0", "", ""},
}

Expand Down

0 comments on commit 1191425

Please sign in to comment.