Skip to content

Commit

Permalink
Merge pull request openshift#13 from damdo/rebase-atop-main
Browse files Browse the repository at this point in the history
  • Loading branch information
openshift-merge-robot committed Feb 23, 2023
2 parents d494f6d + ea8aacd commit b8428eb
Show file tree
Hide file tree
Showing 1,261 changed files with 85,409 additions and 34,047 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.

# Build the manager binary
FROM golang:1.17.0 as builder
FROM golang:1.19.0 as builder
WORKDIR /workspace

# Run this with docker build --build-arg goproxy=$(go env GOPROXY) to override the goproxy
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export DOCKER_CLI_EXPERIMENTAL := enabled
# Directories
TOOLS_DIR := $(ROOT)/hack/tools
TOOLS_BIN_DIR := $(TOOLS_DIR)/bin
JUNIT_REPORT_DIR := $(TOOLS_DIR)/_out
BIN_DIR := bin
GO_APIDIFF_BIN := $(BIN_DIR)/go-apidiff
GO_APIDIFF := $(TOOLS_DIR)/$(GO_APIDIFF_BIN)
Expand Down Expand Up @@ -122,13 +123,13 @@ $(GOTESTSUM): $(TOOLS_DIR)/go.mod # Build gotestsum from tools folder.
$(GOLANGCI_LINT): .github/workflows/golangci-lint.yml # Download golanci-lint using hack script into tools folder.
hack/ensure-golangci-lint.sh \
-b $(TOOLS_DIR)/$(BIN_DIR) \
$(shell cat .github/workflows/golangci-lint.yml | grep version | sed 's/.*version: //')
$(shell cat .github/workflows/golangci-lint.yml | grep -e "^[ \t]*version" | sed 's/.*version: //')

$(GO_APIDIFF): $(TOOLS_DIR)/go.mod # Build go-apidiff from tools folder.
cd $(TOOLS_DIR); go build -tags=tools -o $(GO_APIDIFF_BIN) github.com/joelanford/go-apidiff

$(GINKGO): ## Build ginkgo.
cd $(TOOLS_DIR); go build -tags=tools -o $(BIN_DIR)/ginkgo github.com/onsi/ginkgo/ginkgo
cd $(TOOLS_DIR); go build -tags=tools -o $(BIN_DIR)/ginkgo github.com/onsi/ginkgo/v2/ginkgo

$(ENVSUBST): ## Build envsubst from tools folder.
cd $(TOOLS_DIR); go build -tags=tools -o $(BIN_DIR)/envsubst github.com/drone/envsubst/v2/cmd/envsubst
Expand Down Expand Up @@ -366,7 +367,7 @@ test-e2e:
.PHONY: test-e2e-run
test-e2e-run: $(GINKGO) $(ENVSUBST) ## Run e2e tests
$(ENVSUBST) < $(E2E_CONF_FILE) > $(E2E_CONF_FILE_ENVSUBST) && \
$(GINKGO) -v -trace -tags=e2e --noColor=$(GINKGO_NOCOLOR) $(GINKGO_ARGS) ./test/e2e -- \
$(GINKGO) -v -trace -tags=e2e --junit-report=junit_cluster_api_operator_e2e.xml --output-dir="${JUNIT_REPORT_DIR}" --no-color=$(GINKGO_NOCOLOR) $(GINKGO_ARGS) ./test/e2e -- \
-e2e.artifacts-folder="$(ARTIFACTS)" \
-e2e.config="$(E2E_CONF_FILE_ENVSUBST)" -e2e.components=$(ROOT)/$(RELEASE_DIR)/operator-components.yaml \
-e2e.skip-resource-cleanup=$(SKIP_CLEANUP) -e2e.use-existing-cluster=$(SKIP_CREATE_MGMT_CLUSTER) $(E2E_ARGS)
31 changes: 31 additions & 0 deletions Tiltfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# -*- mode: Python -*-

load('ext://cert_manager', 'deploy_cert_manager')

def build_image():
docker_build(
"gcr.io/k8s-staging-cluster-api/cluster-api-operator-amd64",
".",
ignore=[
".git",
".github",
"docs",
"test",
"scripts",
"*.md",
"LICENSE",
"OWNERS",
"OWNERS_ALIASES",
"PROJECT",
"SECURITY_CONTACTS"
]
)

def deploy():
k8s_yaml(
kustomize('./config/default')
)

build_image()
deploy_cert_manager()
deploy()
7 changes: 2 additions & 5 deletions controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@ import (
"testing"
"time"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
operatorv1 "sigs.k8s.io/cluster-api-operator/api/v1alpha1"
"sigs.k8s.io/cluster-api-operator/internal/envtest"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/controller"
"sigs.k8s.io/controller-runtime/pkg/envtest/printer"
// +kubebuilder:scaffold:imports
)

Expand All @@ -44,9 +43,7 @@ var (
func TestAPIs(t *testing.T) {
RegisterFailHandler(Fail)

RunSpecsWithDefaultAndCustomReporters(t,
"Operator Controller Suite",
[]Reporter{printer.NewlineReporter{}})
RunSpecs(t, "Operator Controller Suite")
}

func TestMain(m *testing.M) {
Expand Down
3 changes: 2 additions & 1 deletion docs/capi-operator-proposal.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ reviewers:
creation-date: 2020-09-14
last-updated: 2021-01-20
status: implementable
see-also: https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20191016-clusterctl-redesign.md
see-also:
https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20191016-clusterctl-redesign.md
---

# CAPI Provider operator
Expand Down
16 changes: 16 additions & 0 deletions docs/local-development.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Local Development
Tilt is favoured by most Cluster API projects for local development, it offers a simple way of creating a local development environment.

## Create a kind cluster
We'll need to create a kind cluster to deploy the operator to. This cluster will be used to deploy `cluster-api-operator` to, along with all dependencies such as `cert-manager`
```bash
kind create cluster
```

## Run Tilt
Once the cluster is live and you've confirmed you're using the correct context, you can simply run:
```bash
tilt up
```

That's it! Tilt will automatically reload the deployment to your local cluster every time you make a code change.
120 changes: 60 additions & 60 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,127 +1,127 @@
module sigs.k8s.io/cluster-api-operator

go 1.17
go 1.19

replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.2.0
replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.3.1

require (
github.com/google/go-cmp v0.5.8
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.19.0
github.com/google/go-cmp v0.5.9
github.com/onsi/ginkgo/v2 v2.7.0
github.com/onsi/gomega v1.24.1
github.com/pkg/errors v0.9.1
github.com/spf13/pflag v1.0.5
k8s.io/api v0.24.2
k8s.io/apiextensions-apiserver v0.24.2
k8s.io/apimachinery v0.24.2
k8s.io/client-go v0.24.2
k8s.io/component-base v0.24.2
k8s.io/klog/v2 v2.60.1
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9
sigs.k8s.io/cluster-api v1.2.0
sigs.k8s.io/cluster-api/test v1.2.0
sigs.k8s.io/controller-runtime v0.12.3
k8s.io/api v0.25.3
k8s.io/apiextensions-apiserver v0.25.3
k8s.io/apimachinery v0.25.3
k8s.io/client-go v0.25.3
k8s.io/component-base v0.25.3
k8s.io/klog/v2 v2.80.1
k8s.io/utils v0.0.0-20221012122500-cfd413dd9e85
sigs.k8s.io/cluster-api v1.3.1
sigs.k8s.io/cluster-api/test v1.3.1
sigs.k8s.io/controller-runtime v0.13.1
sigs.k8s.io/yaml v1.3.0
)

require (
github.com/BurntSushi/toml v1.0.0 // indirect
github.com/MakeNowJust/heredoc v1.0.0 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.1.1 // indirect
github.com/Masterminds/sprig/v3 v3.2.2 // indirect
github.com/Masterminds/semver/v3 v3.2.0 // indirect
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
github.com/Microsoft/go-winio v0.5.0 // indirect
github.com/alessio/shellescape v1.4.1 // indirect
github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20220527190237-ee62e23da966 // indirect
github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 // indirect
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver v3.5.1+incompatible // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/coredns/caddy v1.1.1 // indirect
github.com/coredns/corefile-migration v1.0.17 // indirect
github.com/coredns/corefile-migration v1.0.18 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/distribution v2.8.1+incompatible // indirect
github.com/docker/docker v20.10.17+incompatible // indirect
github.com/docker/docker v20.10.21+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/drone/envsubst/v2 v2.0.0-20210730161058-179042472c46 // indirect
github.com/emicklei/go-restful/v3 v3.8.0 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/zapr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/swag v0.21.1 // indirect
github.com/gobuffalo/flect v0.2.5 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/gobuffalo/flect v0.3.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/cel-go v0.11.4 // indirect
github.com/google/cel-go v0.12.5 // indirect
github.com/google/gnostic v0.6.9 // indirect
github.com/google/go-github/v45 v45.2.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/huandu/xstrings v1.3.3 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.1 // indirect
github.com/prometheus/client_golang v1.12.2 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.34.0 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
github.com/prometheus/client_golang v1.13.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/afero v1.9.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/cobra v1.5.0 // indirect
github.com/spf13/cobra v1.6.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/viper v1.12.0 // indirect
github.com/spf13/viper v1.13.0 // indirect
github.com/stoewer/go-strcase v1.2.0 // indirect
github.com/stretchr/testify v1.7.2 // indirect
github.com/subosito/gotenv v1.3.0 // indirect
github.com/stretchr/testify v1.8.1 // indirect
github.com/subosito/gotenv v1.4.1 // indirect
github.com/valyala/fastjson v1.6.3 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
go.uber.org/zap v1.21.0 // indirect
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect
golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 // indirect
golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20220411224347-583f2d630306 // indirect
go.uber.org/zap v1.23.0 // indirect
golang.org/x/crypto v0.3.0 // indirect
golang.org/x/net v0.3.0 // indirect
golang.org/x/oauth2 v0.1.0 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/term v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
golang.org/x/time v0.1.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20220607140733-d738665f6195 // indirect
google.golang.org/protobuf v1.28.0 // indirect
google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.66.4 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiserver v0.24.2 // indirect
k8s.io/cluster-bootstrap v0.24.1 // indirect
k8s.io/kube-openapi v0.0.0-20220603121420-31174f50af60 // indirect
sigs.k8s.io/json v0.0.0-20220525155127-227cbc7cc124 // indirect
sigs.k8s.io/kind v0.14.0 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
k8s.io/apiserver v0.25.3 // indirect
k8s.io/cluster-bootstrap v0.25.3 // indirect
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
sigs.k8s.io/kind v0.17.0 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
)

0 comments on commit b8428eb

Please sign in to comment.