Skip to content

Commit

Permalink
Add 1.26 and 1.27 kubernetes clients (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
yalosev authored Jul 12, 2023
1 parent 7ce1580 commit 1602a8a
Show file tree
Hide file tree
Showing 4 changed files with 1,183 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fake/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type Cluster struct {

func NewFakeCluster(ver ClusterVersion) *Cluster {
if ver == "" {
ver = ClusterVersionV123
ver = ClusterVersionV125
}
cres := ClusterResources(ver)

Expand Down
10 changes: 9 additions & 1 deletion fake/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package fake
// set current kube-context to cluster with necessary version and run go generate
// it will create file with desired version and resources
// you can use existing cluster or kind/minikube/microk8s/etc
// like: kind create cluster --image "kindest/node:v1.25.3"
// like: kind create cluster --image "kindest/node:v1.27.3"
// you can images for kind here, in a release message: https://github.com/kubernetes-sigs/kind/releases

//go:generate ./scripts/resources_generator
Expand Down Expand Up @@ -44,6 +44,12 @@ func ClusterResources(version ClusterVersion) []*metav1.APIResourceList {

case ClusterVersionV125:
return v125ClusterResources

case ClusterVersionV126:
return v126ClusterResources

case ClusterVersionV127:
return v127ClusterResources
}

return nil
Expand All @@ -63,6 +69,8 @@ const (
ClusterVersionV123 ClusterVersion = "v1.23.0"
ClusterVersionV124 ClusterVersion = "v1.24.0"
ClusterVersionV125 ClusterVersion = "v1.25.0"
ClusterVersionV126 ClusterVersion = "v1.26.0"
ClusterVersionV127 ClusterVersion = "v1.27.0"
)

func (cv ClusterVersion) String() string {
Expand Down
Loading

0 comments on commit 1602a8a

Please sign in to comment.