Skip to content

Revendor for kube-1.16.0 #262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 0 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,28 +92,6 @@ check-pkg:
unit: # Run unit test
$(DOCKER_CMD) go test -race -cover ./cmd/... ./pkg/...

.PHONY: integration
integration: ## Run integration test
$(DOCKER_CMD) go test -v sigs.k8s.io/cluster-api-provider-aws/test/integration

.PHONY: build-e2e
build-e2e:
go test -c -o bin/e2e.test sigs.k8s.io/cluster-api-provider-aws/test/machines

.PHONY: k8s-e2e
k8s-e2e: ## Run k8s specific e2e test
# KUBECONFIG and SSH_PK dirs needs to be mounted inside a container if tests are run in containers
go test -timeout 30m \
-v sigs.k8s.io/cluster-api-provider-aws/test/machines \
-kubeconfig $${KUBECONFIG:-~/.kube/config} \
-ssh-key $${SSH_PK:-~/.ssh/id_rsa} \
-machine-controller-image $${ACTUATOR_IMAGE:-gcr.io/k8s-cluster-api/aws-machine-controller:0.0.1} \
-machine-manager-image $${ACTUATOR_IMAGE:-gcr.io/k8s-cluster-api/aws-machine-controller:0.0.1} \
-nodelink-controller-image $$(docker run registry.svc.ci.openshift.org/origin/release:4.2 image machine-api-operator) \
-cluster-id $${ENVIRONMENT_ID:-""} \
-ginkgo.v \
-args -v 5 -logtostderr true

.PHONY: test-e2e
test-e2e: ## Run e2e tests
hack/e2e.sh
Expand Down
2 changes: 2 additions & 0 deletions cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ func main() {
syncPeriod := 10 * time.Minute
opts := manager.Options{
SyncPeriod: &syncPeriod,
// Disable metrics serving
MetricsBindAddress: "0",
}
if *watchNamespace != "" {
opts.Namespace = *watchNamespace
Expand Down
44 changes: 15 additions & 29 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,30 @@ module sigs.k8s.io/cluster-api-provider-aws
go 1.12

require (
cloud.google.com/go v0.31.0 // indirect
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc // indirect
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf // indirect
github.com/aws/aws-sdk-go v1.15.66
github.com/blang/semver v3.5.1+incompatible
github.com/emicklei/go-restful v2.9.5+incompatible // indirect
github.com/ghodss/yaml v1.0.0
github.com/go-log/log v0.0.0-20181211034820-a514cf01a3eb // indirect
github.com/go-openapi/spec v0.19.2 // indirect
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/golang/groupcache v0.0.0-20181024230925-c65c006176ff // indirect
github.com/golang/mock v1.1.1
github.com/google/uuid v1.0.0 // indirect
github.com/hashicorp/golang-lru v0.5.0 // indirect
github.com/onsi/ginkgo v1.8.0
github.com/onsi/gomega v1.5.0
github.com/openshift/cluster-api v0.0.0-20190917100308-655e2d6ccdd5
github.com/golang/mock v1.2.0

// kube 1.16
github.com/openshift/cluster-api v0.0.0-20191003080455-24cfb34ea1f9
github.com/openshift/cluster-api-actuator-pkg v0.0.0-20190527090340-7628df78fb4c
github.com/openshift/cluster-autoscaler-operator v0.0.0-20190521201101-62768a6ba480 // indirect
github.com/openshift/machine-api-operator v0.0.0-20190312153711-9650e16c9880 // indirect
github.com/pborman/uuid v0.0.0-20180906182336-adf5a7427709 // indirect
github.com/prometheus/client_golang v0.9.2 // indirect
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 // indirect
github.com/prometheus/common v0.0.0-20181126121408-4724e9255275
github.com/prometheus/procfs v0.0.0-20190209105433-f8d8b3f739bd // indirect
github.com/sirupsen/logrus v1.2.0 // indirect
github.com/spf13/cobra v0.0.3
github.com/spf13/cobra v0.0.5
github.com/spf13/pflag v1.0.3
github.com/stretchr/testify v1.3.0
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980
golang.org/x/oauth2 v0.0.0-20181031022657-8527f56f7107 // indirect
google.golang.org/appengine v1.2.0 // indirect
gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect
k8s.io/api v0.0.0-20190409021203-6e4e0e4f393b
k8s.io/apimachinery v0.0.0-20190404173353-6a84e37a896d
k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible
k8s.io/klog v0.3.1
k8s.io/kube-openapi v0.0.0-20190709113604-33be087ad058 // indirect
sigs.k8s.io/controller-runtime v0.0.0-20190520212815-96b67f231945
sigs.k8s.io/controller-tools v0.2.0
golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc
k8s.io/api v0.0.0-20190918155943-95b840bb6a1f
k8s.io/apimachinery v0.0.0-20190913080033-27d36303b655
k8s.io/client-go v0.0.0-20190918160344-1fbdaa4c8d90
k8s.io/klog v0.4.0
sigs.k8s.io/controller-runtime v0.2.0-beta.1.0.20190918234459-801e12a50160
sigs.k8s.io/controller-tools v0.2.2-0.20190930215132-4752ed2de7d2

)

replace sigs.k8s.io/controller-runtime => github.com/enxebre/controller-runtime v0.2.0-beta.1.0.20190930160522-58015f7fc885
306 changes: 228 additions & 78 deletions go.sum

Large diffs are not rendered by default.

27 changes: 20 additions & 7 deletions pkg/actuators/machine/stubs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,20 @@ package machine

import (
"fmt"
"os"
"time"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/aws/aws-sdk-go/service/elbv2"

apiv1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

clusterv1 "github.com/openshift/cluster-api/pkg/apis/cluster/v1alpha1"
machinev1 "github.com/openshift/cluster-api/pkg/apis/machine/v1beta1"
machinecontroller "github.com/openshift/cluster-api/pkg/controller/machine"
apiv1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
providerconfigv1 "sigs.k8s.io/cluster-api-provider-aws/pkg/apis/awsproviderconfig/v1beta1"
"sigs.k8s.io/cluster-api-provider-aws/test/utils"
awsclient "sigs.k8s.io/cluster-api-provider-aws/pkg/client"
)

const (
Expand Down Expand Up @@ -159,7 +158,21 @@ func stubUserDataSecret() *corev1.Secret {
}

func stubAwsCredentialsSecret() *corev1.Secret {
return utils.GenerateAwsCredentialsSecretFromEnv(awsCredentialsSecretName, defaultNamespace)
return GenerateAwsCredentialsSecretFromEnv(awsCredentialsSecretName, defaultNamespace)
}

// GenerateAwsCredentialsSecretFromEnv generates secret with AWS credentials
func GenerateAwsCredentialsSecretFromEnv(secretName, namespace string) *apiv1.Secret {
return &apiv1.Secret{
ObjectMeta: metav1.ObjectMeta{
Name: secretName,
Namespace: namespace,
},
Data: map[string][]byte{
awsclient.AwsCredsSecretIDKey: []byte(os.Getenv("AWS_ACCESS_KEY_ID")),
awsclient.AwsCredsSecretAccessKey: []byte(os.Getenv("AWS_SECRET_ACCESS_KEY")),
},
}
}

func stubInstance(imageID, instanceID string) *ec2.Instance {
Expand Down
Loading