Skip to content
This repository has been archived by the owner on Apr 7, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
rfranzke committed Sep 20, 2019
1 parent 2f9853d commit b8716c9
Show file tree
Hide file tree
Showing 85 changed files with 6,048 additions and 892 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
extensionscontroller "github.com/gardener/gardener-extensions/pkg/controller"
mockclient "github.com/gardener/gardener-extensions/pkg/mock/controller-runtime/client"

gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1"
v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants"
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
gardenv1beta1 "github.com/gardener/gardener/pkg/apis/garden/v1beta1"
Expand Down Expand Up @@ -88,14 +87,14 @@ var _ = Describe("ValuesProvider", func() {
},
}

cidr = gardencorev1alpha1.CIDR("10.250.0.0/19")
cidr = "10.250.0.0/19"
cluster = &extensionscontroller.Cluster{
Shoot: &gardenv1beta1.Shoot{
Spec: gardenv1beta1.ShootSpec{
Cloud: gardenv1beta1.Cloud{
Alicloud: &gardenv1beta1.Alicloud{
Networks: gardenv1beta1.AlicloudNetworks{
K8SNetworks: gardencorev1alpha1.K8SNetworks{
K8SNetworks: gardenv1beta1.K8SNetworks{
Pods: &cidr,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
extensionscontroller "github.com/gardener/gardener-extensions/pkg/controller"
mockclient "github.com/gardener/gardener-extensions/pkg/mock/controller-runtime/client"

gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1"
v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants"
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
gardenv1beta1 "github.com/gardener/gardener/pkg/apis/garden/v1beta1"
Expand Down Expand Up @@ -82,14 +81,14 @@ var _ = Describe("ValuesProvider", func() {
},
}

cidr = gardencorev1alpha1.CIDR("10.250.0.0/19")
cidr = "10.250.0.0/19"
cluster = &extensionscontroller.Cluster{
Shoot: &gardenv1beta1.Shoot{
Spec: gardenv1beta1.ShootSpec{
Cloud: gardenv1beta1.Cloud{
AWS: &gardenv1beta1.AWSCloud{
Networks: gardenv1beta1.AWSNetworks{
K8SNetworks: gardencorev1alpha1.K8SNetworks{
K8SNetworks: gardenv1beta1.K8SNetworks{
Pods: &cidr,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
extensionscontroller "github.com/gardener/gardener-extensions/pkg/controller"
mockclient "github.com/gardener/gardener-extensions/pkg/mock/controller-runtime/client"

gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1"
v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants"
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
gardenv1beta1 "github.com/gardener/gardener/pkg/apis/garden/v1beta1"
Expand Down Expand Up @@ -343,14 +342,14 @@ var _ = Describe("ValuesProvider", func() {
},
}

cidr = gardencorev1alpha1.CIDR("10.250.0.0/19")
cidr = "10.250.0.0/19"
cluster = &extensionscontroller.Cluster{
Shoot: &gardenv1beta1.Shoot{
Spec: gardenv1beta1.ShootSpec{
Cloud: gardenv1beta1.Cloud{
Azure: &gardenv1beta1.AzureCloud{
Networks: gardenv1beta1.AzureNetworks{
K8SNetworks: gardencorev1alpha1.K8SNetworks{
K8SNetworks: gardenv1beta1.K8SNetworks{
Pods: &cidr,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"github.com/gardener/gardener-extensions/controllers/provider-azure/pkg/internal"
"github.com/gardener/gardener-extensions/pkg/controller"

gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1"
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
gardenv1beta1 "github.com/gardener/gardener/pkg/apis/garden/v1beta1"
. "github.com/onsi/ginkgo"
Expand All @@ -29,14 +28,14 @@ import (
"k8s.io/apimachinery/pkg/runtime"
)

func makeCluster(pods, services gardencorev1alpha1.CIDR, region string) *controller.Cluster {
func makeCluster(pods, services string, region string) *controller.Cluster {
var (
shoot = gardenv1beta1.Shoot{
Spec: gardenv1beta1.ShootSpec{
Cloud: gardenv1beta1.Cloud{
Azure: &gardenv1beta1.AzureCloud{
Networks: gardenv1beta1.AzureNetworks{
K8SNetworks: gardencorev1alpha1.K8SNetworks{
K8SNetworks: gardenv1beta1.K8SNetworks{
Pods: &pods,
Services: &services,
},
Expand Down Expand Up @@ -107,7 +106,7 @@ var _ = Describe("Terraform", func() {
},
}

cluster = makeCluster(gardencorev1alpha1.CIDR("11.0.0.0/16"), gardencorev1alpha1.CIDR("12.0.0.0/16"), infra.Spec.Region)
cluster = makeCluster("11.0.0.0/16", "12.0.0.0/16", infra.Spec.Region)
clientAuth = &internal.ClientAuth{
TenantID: "tenant_id",
ClientSecret: "client_secret",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
extensionscontroller "github.com/gardener/gardener-extensions/pkg/controller"
mockclient "github.com/gardener/gardener-extensions/pkg/mock/controller-runtime/client"

gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1"
v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants"
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
gardenv1beta1 "github.com/gardener/gardener/pkg/apis/garden/v1beta1"
Expand Down Expand Up @@ -89,14 +88,14 @@ var _ = Describe("ValuesProvider", func() {
},
}

cidr = gardencorev1alpha1.CIDR("10.250.0.0/19")
cidr = "10.250.0.0/19"
cluster = &extensionscontroller.Cluster{
Shoot: &gardenv1beta1.Shoot{
Spec: gardenv1beta1.ShootSpec{
Cloud: gardenv1beta1.Cloud{
GCP: &gardenv1beta1.GCPCloud{
Networks: gardenv1beta1.GCPNetworks{
K8SNetworks: gardencorev1alpha1.K8SNetworks{
K8SNetworks: gardenv1beta1.K8SNetworks{
Pods: &cidr,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"fmt"

mockgcpclient "github.com/gardener/gardener-extensions/controllers/provider-gcp/pkg/internal/mock/client"

"github.com/golang/mock/gomock"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"github.com/gardener/gardener-extensions/controllers/provider-gcp/pkg/internal"
"github.com/gardener/gardener-extensions/pkg/controller"

gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1"
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
gardenv1beta1 "github.com/gardener/gardener/pkg/apis/garden/v1beta1"
"github.com/gardener/gardener/pkg/chartrenderer"
"github.com/gardener/gardener/pkg/operation/terraformer"

Expand Down Expand Up @@ -55,7 +55,7 @@ var (
)

// getK8SNetworks gets the K8SNetworks from the given controller.Cluster.
func getK8SNetworks(cluster *controller.Cluster) *gardencorev1alpha1.K8SNetworks {
func getK8SNetworks(cluster *controller.Cluster) *gardenv1beta1.K8SNetworks {
return &cluster.Shoot.Spec.Cloud.GCP.Networks.K8SNetworks
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"github.com/gardener/gardener-extensions/controllers/provider-gcp/pkg/internal"
"github.com/gardener/gardener-extensions/pkg/controller"

gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1"
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
gardenv1beta1 "github.com/gardener/gardener/pkg/apis/garden/v1beta1"
. "github.com/onsi/ginkgo"
Expand Down Expand Up @@ -72,15 +71,15 @@ var _ = Describe("Terraform", func() {
},
}

podsCIDR := gardencorev1alpha1.CIDR("11.0.0.0/16")
servicesCIDR := gardencorev1alpha1.CIDR("12.0.0.0/16")
podsCIDR := "11.0.0.0/16"
servicesCIDR := "12.0.0.0/16"
cluster = &controller.Cluster{
Shoot: &gardenv1beta1.Shoot{
Spec: gardenv1beta1.ShootSpec{
Cloud: gardenv1beta1.Cloud{
GCP: &gardenv1beta1.GCPCloud{
Networks: gardenv1beta1.GCPNetworks{
K8SNetworks: gardencorev1alpha1.K8SNetworks{
K8SNetworks: gardenv1beta1.K8SNetworks{
Pods: &podsCIDR,
Services: &servicesCIDR,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
mockclient "github.com/gardener/gardener-extensions/pkg/mock/controller-runtime/client"
"github.com/gardener/gardener-extensions/pkg/util"

gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1"
v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants"
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
gardenv1beta1 "github.com/gardener/gardener/pkg/apis/garden/v1beta1"
Expand Down Expand Up @@ -102,7 +101,7 @@ var _ = Describe("ValuesProvider", func() {

cp = defaultControlPlane()

cidr = gardencorev1alpha1.CIDR("10.250.0.0/19")
cidr = "10.250.0.0/19"
cluster = &extensionscontroller.Cluster{
CloudProfile: &gardenv1beta1.CloudProfile{
Spec: gardenv1beta1.CloudProfileSpec{
Expand All @@ -118,7 +117,7 @@ var _ = Describe("ValuesProvider", func() {
Cloud: gardenv1beta1.Cloud{
OpenStack: &gardenv1beta1.OpenStackCloud{
Networks: gardenv1beta1.OpenStackNetworks{
K8SNetworks: gardencorev1alpha1.K8SNetworks{
K8SNetworks: gardenv1beta1.K8SNetworks{
Pods: &cidr,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (
mockclient "github.com/gardener/gardener-extensions/pkg/mock/controller-runtime/client"
mockkubernetes "github.com/gardener/gardener-extensions/pkg/mock/gardener/client/kubernetes"

gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1"
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
gardenv1beta1 "github.com/gardener/gardener/pkg/apis/garden/v1beta1"
machinev1alpha1 "github.com/gardener/machine-controller-manager/pkg/apis/machine/v1alpha1"
Expand Down Expand Up @@ -98,7 +97,7 @@ var _ = Describe("Machines", func() {
machineType string
userData []byte
networkID string
podCIDR gardencorev1alpha1.CIDR
podCIDR string
securityGroupName string

namePool1 string
Expand Down Expand Up @@ -144,7 +143,7 @@ var _ = Describe("Machines", func() {
machineType = "large"
userData = []byte("some-user-data")
networkID = "network-id"
podCIDR = gardencorev1alpha1.CIDR("1.2.3.4/5")
podCIDR = "1.2.3.4/5"
securityGroupName = "nodes-sec-group"

namePool1 = "pool-1"
Expand Down Expand Up @@ -194,7 +193,7 @@ var _ = Describe("Machines", func() {
Cloud: gardenv1beta1.Cloud{
OpenStack: &gardenv1beta1.OpenStackCloud{
Networks: gardenv1beta1.OpenStackNetworks{
K8SNetworks: gardencorev1alpha1.K8SNetworks{
K8SNetworks: gardenv1beta1.K8SNetworks{
Pods: &podCIDR,
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ import (
"github.com/gardener/gardener-extensions/controllers/provider-openstack/pkg/internal"
"github.com/gardener/gardener-extensions/pkg/controller"

gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1"
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
gardenv1beta1 "github.com/gardener/gardener/pkg/apis/garden/v1beta1"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down Expand Up @@ -69,8 +67,8 @@ var _ = Describe("Terraform", func() {
},
}

podsCIDR := gardencorev1alpha1.CIDR("11.0.0.0/16")
servicesCIDR := gardencorev1alpha1.CIDR("12.0.0.0/16")
podsCIDR := "11.0.0.0/16"
servicesCIDR := "12.0.0.0/16"
cluster = &controller.Cluster{
CloudProfile: &gardenv1beta1.CloudProfile{
Spec: gardenv1beta1.CloudProfileSpec{
Expand All @@ -84,7 +82,7 @@ var _ = Describe("Terraform", func() {
Cloud: gardenv1beta1.Cloud{
GCP: &gardenv1beta1.GCPCloud{
Networks: gardenv1beta1.GCPNetworks{
K8SNetworks: gardencorev1alpha1.K8SNetworks{
K8SNetworks: gardenv1beta1.K8SNetworks{
Pods: &podsCIDR,
Services: &servicesCIDR,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
extensionscontroller "github.com/gardener/gardener-extensions/pkg/controller"
mockclient "github.com/gardener/gardener-extensions/pkg/mock/controller-runtime/client"

gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1"
v1alpha1constants "github.com/gardener/gardener/pkg/apis/core/v1alpha1/constants"
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
gardenv1beta1 "github.com/gardener/gardener/pkg/apis/garden/v1beta1"
Expand Down Expand Up @@ -70,14 +69,14 @@ var _ = Describe("ValuesProvider", func() {
},
}

cidr = gardencorev1alpha1.CIDR("10.250.0.0/19")
cidr = "10.250.0.0/19"
cluster = &extensionscontroller.Cluster{
Shoot: &gardenv1beta1.Shoot{
Spec: gardenv1beta1.ShootSpec{
Cloud: gardenv1beta1.Cloud{
Packet: &gardenv1beta1.PacketCloud{
Networks: gardenv1beta1.PacketNetworks{
K8SNetworks: gardencorev1alpha1.K8SNetworks{
K8SNetworks: gardenv1beta1.K8SNetworks{
Pods: &cidr,
},
},
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require (
github.com/appscode/jsonpatch v0.0.0-20190108182946-7c0e3b262f30
github.com/aws/aws-sdk-go v1.21.10
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f
github.com/gardener/gardener v0.0.0-20190913144920-5b4adb9f114d
github.com/gardener/gardener v0.0.0-20190920123941-eae74fbc29e4
github.com/gardener/gardener-resource-manager v0.0.0-20190828115855-7ceeb3021993
github.com/gardener/machine-controller-manager v0.0.0-20190606071036-119056ee3fdd
github.com/go-logr/logr v0.1.0
Expand Down
5 changes: 2 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ github.com/gardener/external-dns-management v0.0.0-20190722114702-f6b12f6e4b43 h
github.com/gardener/external-dns-management v0.0.0-20190722114702-f6b12f6e4b43/go.mod h1:Y3om11E865x4aQ7cmcHjknb8RMgCO153huRb/SvP+9o=
github.com/gardener/gardener v0.0.0-20190812144748-dec8f3c7f288/go.mod h1:ioI69PbfNBUp10k2OtIED7u0l6u1NePBw/wgox9uayQ=
github.com/gardener/gardener v0.0.0-20190830053951-194cf8abb797/go.mod h1:UjyQiGrjIRJQ82t2PTqtdMXzJxqH/ftQ36jbpFxAWXw=
github.com/gardener/gardener v0.0.0-20190913144920-5b4adb9f114d h1:Fno0cRUhqUIcS9mBtdeTthgrSuHYRNUd006KYyybEh0=
github.com/gardener/gardener v0.0.0-20190913144920-5b4adb9f114d/go.mod h1:8LOLWzproKzfww5LdDo0/7FyVQR7gR1QA5LQc5buDzQ=
github.com/gardener/gardener v0.0.0-20190920123941-eae74fbc29e4 h1:uPiDu6K49XcAp957rEFIb5fMUtepcVpIPXmcbmicy3g=
github.com/gardener/gardener v0.0.0-20190920123941-eae74fbc29e4/go.mod h1:8LOLWzproKzfww5LdDo0/7FyVQR7gR1QA5LQc5buDzQ=
github.com/gardener/gardener-extensions v0.0.0-20190725050243-a80ef643c64b/go.mod h1:uXjtl3KeVdQXuGIP26+84wJY1Kwru67l0FXm7A5DiME=
github.com/gardener/gardener-extensions v0.0.0-20190820050625-a15de8a82f6b/go.mod h1:q69+1cUGSfQ8gSMWzU7GFz/R8K8MpOLQBT2wJJcCjEA=
github.com/gardener/gardener-extensions v0.0.0-20190906160200-5c329d46ae81/go.mod h1:OBUAbab8OMm8pvzr/1/cdwIQnQYuMoGDTNR2c+i9nYo=
Expand All @@ -174,7 +174,6 @@ github.com/gardener/gardener-resource-manager v0.0.0-20190802153254-ea0dc5872b6a
github.com/gardener/gardener-resource-manager v0.0.0-20190802153254-ea0dc5872b6a/go.mod h1:kIPm1DlE5jChb4moAseumj1qr+IITKXPJcqyIKJp14Y=
github.com/gardener/gardener-resource-manager v0.0.0-20190828115855-7ceeb3021993 h1:HoOo1rfm4n/T23886/Yj2yCVC81cVuXMbzdMo6PzTOs=
github.com/gardener/gardener-resource-manager v0.0.0-20190828115855-7ceeb3021993/go.mod h1:l18ykpXeMDrrrtiA99YTdvZPW2TOaHIR/LrtbVELIiU=
github.com/gardener/gardener-resource-manager v0.0.0-20190912084358-b926d0903974 h1:CE0XLALKGUYdsbyUXkoyAi4qnn7MAq8N95k2MaDemiQ=
github.com/gardener/machine-controller-manager v0.0.0-20190228095106-36a42c48af0a/go.mod h1:/ZDmMugbfkBfOO6/nrdnqV+OMSEuF75wrF9KFIuqndM=
github.com/gardener/machine-controller-manager v0.0.0-20190606071036-119056ee3fdd h1:PrtJshi9rSN6V5w6FDFh9u1arfplk7ufxLKXFsasqzs=
github.com/gardener/machine-controller-manager v0.0.0-20190606071036-119056ee3fdd/go.mod h1:/ZDmMugbfkBfOO6/nrdnqV+OMSEuF75wrF9KFIuqndM=
Expand Down
3 changes: 1 addition & 2 deletions pkg/controller/shoot.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package controller

import (
gardencorev1alpha1 "github.com/gardener/gardener/pkg/apis/core/v1alpha1"
gardenv1beta1 "github.com/gardener/gardener/pkg/apis/garden/v1beta1"
"github.com/gardener/gardener/pkg/chartrenderer"
)
Expand All @@ -41,7 +40,7 @@ func (f ChartRendererFactoryFunc) NewChartRendererForShoot(version string) (char
}

// GetPodNetwork returns the pod network CIDR of the given Shoot.
func GetPodNetwork(shoot *gardenv1beta1.Shoot) gardencorev1alpha1.CIDR {
func GetPodNetwork(shoot *gardenv1beta1.Shoot) string {
cloud := shoot.Spec.Cloud
switch {
case cloud.AWS != nil:
Expand Down
Loading

0 comments on commit b8716c9

Please sign in to comment.