Skip to content
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
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .ci-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build_root_image:
name: release
namespace: openshift
tag: golang-1.15
tag: golang-1.16
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ ifeq ($(NO_DOCKER), 1)
DOCKER_CMD =
IMAGE_BUILD_CMD = imagebuilder
else
DOCKER_CMD := $(ENGINE) run --env GO111MODULE=$(GO111MODULE) --env GOFLAGS=$(GOFLAGS) --rm -v "$(PWD)":/go/src/github.com/openshift/machine-api-operator:Z -w /go/src/github.com/openshift/machine-api-operator openshift/origin-release:golang-1.15
DOCKER_CMD := $(ENGINE) run --env GO111MODULE=$(GO111MODULE) --env GOFLAGS=$(GOFLAGS) --rm -v "$(PWD)":/go/src/github.com/openshift/machine-api-operator:Z -w /go/src/github.com/openshift/machine-api-operator openshift/origin-release:golang-1.16
# The command below is for building/testing with the actual image that Openshift uses. Uncomment/comment out to use instead of above command. CI registry pull secret is required to use this image.
# DOCKER_CMD := $(ENGINE) run --env GO111MODULE=$(GO111MODULE) --env GOFLAGS=$(GOFLAGS) --rm -v "$(PWD)":/go/src/github.com/openshift/machine-api-operator:Z -w /go/src/github.com/openshift/machine-api-operator registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.15-openshift-4.6
IMAGE_BUILD_CMD = $(ENGINE) build
Expand Down
50 changes: 23 additions & 27 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,45 +1,41 @@
module github.com/openshift/machine-api-operator

go 1.13
go 1.16

require (
github.com/MakeNowJust/heredoc v1.0.0 // indirect
github.com/blang/semver v3.5.1+incompatible
github.com/go-logr/logr v0.4.0
github.com/gobuffalo/flect v0.2.2 // indirect
github.com/google/gofuzz v1.1.0
github.com/google/uuid v1.1.2
github.com/mattn/go-isatty v0.0.12 // indirect
github.com/onsi/ginkgo v1.15.0
github.com/onsi/gomega v1.10.5
github.com/openshift/api v0.0.0-20210412212256-79bd8cfbbd59
github.com/openshift/client-go v0.0.0-20210409155308-a8e62c60e930
github.com/openshift/cluster-api-provider-gcp v0.0.1-0.20201201000827-1117a4fc438c
github.com/openshift/library-go v0.0.0-20210408164723-7a65fdb398e2
github.com/onsi/ginkgo v1.16.4
github.com/onsi/gomega v1.14.0
github.com/openshift/api v0.0.0-20210816181336-8ff39b776da3
github.com/openshift/client-go v0.0.0-20210730113412-1811c1b3fc0e
github.com/openshift/cluster-api-provider-gcp v0.0.1-0.20210615203611-a02074e8d5bb
github.com/openshift/library-go v0.0.0-20210811133500-5e31383de2a7
github.com/operator-framework/operator-sdk v0.5.1-0.20190301204940-c2efe6f74e7b
github.com/prometheus/client_golang v1.9.0
github.com/spf13/cobra v1.1.1
github.com/prometheus/client_golang v1.11.0
github.com/spf13/cobra v1.2.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.6.1
github.com/stretchr/testify v1.7.0
github.com/vmware/govmomi v0.22.2
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7
golang.org/x/net v0.0.0-20210520170846-37e1c6afe023
gopkg.in/gcfg.v1 v1.2.3
k8s.io/api v0.21.0
k8s.io/apimachinery v0.21.0
k8s.io/apiserver v0.21.0
k8s.io/client-go v0.21.0
k8s.io/code-generator v0.21.0
k8s.io/klog/v2 v2.8.0
k8s.io/kubectl v0.21.0
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009
k8s.io/api v0.22.0
k8s.io/apimachinery v0.22.0
k8s.io/apiserver v0.22.0
k8s.io/client-go v0.22.0
k8s.io/code-generator v0.22.0
k8s.io/klog/v2 v2.9.0
k8s.io/kubectl v0.22.0
k8s.io/utils v0.0.0-20210802155522-efc7438f0176
sigs.k8s.io/cluster-api-provider-aws v0.0.0-00010101000000-000000000000
sigs.k8s.io/cluster-api-provider-azure v0.0.0-00010101000000-000000000000
sigs.k8s.io/controller-runtime v0.9.0-beta.1.0.20210512131817-ce2f0c92d77e
sigs.k8s.io/controller-tools v0.3.0
sigs.k8s.io/structured-merge-diff/v4 v4.1.1 // indirect
sigs.k8s.io/controller-runtime v0.9.3
sigs.k8s.io/controller-tools v0.6.2
sigs.k8s.io/yaml v1.2.0
)

replace sigs.k8s.io/cluster-api-provider-aws => github.com/openshift/cluster-api-provider-aws v0.2.1-0.20201125052318-b85a18cbf338
replace sigs.k8s.io/cluster-api-provider-aws => github.com/openshift/cluster-api-provider-aws v0.2.1-0.20210622023641-c69a3acaee27

replace sigs.k8s.io/cluster-api-provider-azure => github.com/openshift/cluster-api-provider-azure v0.0.0-20210209143830-3442c7a36c1e
replace sigs.k8s.io/cluster-api-provider-azure => github.com/openshift/cluster-api-provider-azure v0.1.0-alpha.3.0.20210816141152-a7c40345b994
446 changes: 329 additions & 117 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion hack/ci-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function runTestsCI() {
if [ -n "$ARTIFACT_DIR" ] && [ -d "$ARTIFACT_DIR" ]; then
JUNIT_LOCATION="$ARTIFACT_DIR"/junit_machine_api_operator.xml
echo "jUnit location: $JUNIT_LOCATION"
go get -u github.com/jstemmer/go-junit-report
go install -mod= github.com/jstemmer/go-junit-report@latest
go test -v ./pkg/... ./cmd/... | tee >(go-junit-report > "$JUNIT_LOCATION")
else
echo "\$ARTIFACT_DIR not set or does not exists, no jUnit will be published"
Expand Down
6 changes: 6 additions & 0 deletions hack/fetch_ext_bins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,10 @@ function setup_envs {
export TEST_ASSET_KUBECTL=/tmp/kubebuilder/bin/kubectl
export TEST_ASSET_KUBE_APISERVER=/tmp/kubebuilder/bin/kube-apiserver
export TEST_ASSET_ETCD=/tmp/kubebuilder/bin/etcd

# Ensure that some home var is set and that it's not the root
export HOME=${HOME:=/tmp/kubebuilder-testing}
if [ $HOME == "/" ]; then
export HOME=/tmp/kubebuilder-testing
fi
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions pkg/operator/sync.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package operator

import (
"context"
"fmt"
"time"

Expand Down Expand Up @@ -145,7 +146,7 @@ func (optr *Operator) syncClusterAPIController(config *OperatorConfig) error {
ensureDependecyAnnotations(inputHashes, controllersDeployment)

expectedGeneration := resourcemerge.ExpectedDeploymentGeneration(controllersDeployment, optr.generations)
d, updated, err := resourceapply.ApplyDeployment(optr.kubeClient.AppsV1(),
d, updated, err := resourceapply.ApplyDeployment(context.TODO(), optr.kubeClient.AppsV1(),
events.NewLoggingEventRecorder(optr.name), controllersDeployment, expectedGeneration)
if err != nil {
return err
Expand All @@ -160,7 +161,7 @@ func (optr *Operator) syncClusterAPIController(config *OperatorConfig) error {
func (optr *Operator) syncTerminationHandler(config *OperatorConfig) error {
terminationDaemonSet := newTerminationDaemonSet(config)
expectedGeneration := resourcemerge.ExpectedDaemonSetGeneration(terminationDaemonSet, optr.generations)
ds, updated, err := resourceapply.ApplyDaemonSet(optr.kubeClient.AppsV1(),
ds, updated, err := resourceapply.ApplyDaemonSet(context.TODO(), optr.kubeClient.AppsV1(),
events.NewLoggingEventRecorder(optr.name), terminationDaemonSet, expectedGeneration)
if err != nil {
return err
Expand All @@ -181,7 +182,7 @@ func (optr *Operator) syncWebhookConfiguration() error {

func (optr *Operator) syncValidatingWebhook() error {
expectedGeneration := resourcemerge.ExpectedValidatingWebhooksConfiguration(mapiv1.NewValidatingWebhookConfiguration().Name, optr.generations)
validatingWebhook, updated, err := resourceapply.ApplyValidatingWebhookConfiguration(optr.kubeClient.AdmissionregistrationV1(),
validatingWebhook, updated, err := resourceapply.ApplyValidatingWebhookConfiguration(context.TODO(), optr.kubeClient.AdmissionregistrationV1(),
events.NewLoggingEventRecorder(optr.name),
mapiv1.NewValidatingWebhookConfiguration(), expectedGeneration)
if err != nil {
Expand All @@ -196,7 +197,7 @@ func (optr *Operator) syncValidatingWebhook() error {

func (optr *Operator) syncMutatingWebhook() error {
expectedGeneration := resourcemerge.ExpectedMutatingWebhooksConfiguration(mapiv1.NewMutatingWebhookConfiguration().Name, optr.generations)
validatingWebhook, updated, err := resourceapply.ApplyMutatingWebhookConfiguration(optr.kubeClient.AdmissionregistrationV1(),
validatingWebhook, updated, err := resourceapply.ApplyMutatingWebhookConfiguration(context.TODO(), optr.kubeClient.AdmissionregistrationV1(),
events.NewLoggingEventRecorder(optr.name),
mapiv1.NewMutatingWebhookConfiguration(), expectedGeneration)
if err != nil {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 18 additions & 15 deletions vendor/github.com/evanphx/json-patch/merge.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Loading