Skip to content
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

Bug 1820474: clusterAutoscaler and machineAutoscaler structural schema #146

Merged
merged 8 commits into from
Apr 7, 2020
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.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.svc.ci.openshift.org/openshift/release:golang-1.12 AS builder
FROM registry.svc.ci.openshift.org/openshift/release:golang-1.13 AS builder
WORKDIR /go/src/github.com/openshift/cluster-autoscaler-operator
COPY . .
ENV NO_DOCKER=1
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.rhel7
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.svc.ci.openshift.org/ocp/builder:golang-1.12 AS builder
FROM registry.svc.ci.openshift.org/ocp/builder:golang-1.13 AS builder
WORKDIR /go/src/github.com/openshift/cluster-autoscaler-operator
COPY . .
ENV NO_DOCKER=1
Expand Down
28 changes: 7 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ IMAGE = origin-cluster-autoscaler-operator

GO111MODULE = on
export GO111MODULE
GOFLAGS += -mod=vendor
GOFLAGS ?= -mod=vendor
export GOFLAGS
GOPROXY ?=
export GOPROXY
Expand All @@ -27,7 +27,7 @@ ifeq ($(NO_DOCKER), 1)
DOCKER_CMD =
IMAGE_BUILD_CMD = imagebuilder
else
DOCKER_CMD := docker run --rm --env GO111MODULE="$(GO111MODULE)" --env GOFLAGS="$(GOFLAGS)" --env GOPROXY="$(GOPROXY)" -v "$(PWD):/go/src/$(REPO_PATH):Z" -w "/go/src/$(REPO_PATH)" openshift/origin-release:golang-1.12
DOCKER_CMD := docker run --rm --env GO111MODULE="$(GO111MODULE)" --env GOFLAGS="$(GOFLAGS)" --env GOPROXY="$(GOPROXY)" -v "$(PWD):/go/src/$(REPO_PATH):Z" -w "/go/src/$(REPO_PATH)" openshift/origin-release:golang-1.13
IMAGE_BUILD_CMD = docker build
endif

Expand All @@ -37,27 +37,13 @@ vendor:
go mod vendor
go mod verify


# This is a hack. The operator-sdk doesn't currently let you configure
# output paths for the generated CRDs. It also requires that they
# already exist in order to regenerate the OpenAPI bits, so we do some
# copying around here.
.PHONY: generate
generate: ## Code generation (requires operator-sdk >= v0.5.0)
mkdir -p deploy/crds

cp install/01_clusterautoscaler.crd.yaml \
deploy/crds/autoscaling_v1_clusterautoscaler_crd.yaml
cp install/02_machineautoscaler.crd.yaml \
deploy/crds/autoscaling_v1beta1_machineautoscaler_crd.yaml

operator-sdk generate k8s
operator-sdk generate openapi
generate: gen-deepcopy gen-crd

cp deploy/crds/autoscaling_v1_clusterautoscaler_crd.yaml \
install/01_clusterautoscaler.crd.yaml
cp deploy/crds/autoscaling_v1beta1_machineautoscaler_crd.yaml \
install/02_machineautoscaler.crd.yaml
.PHONY: gen-deepcopy
gen-deepcopy:
$(DOCKER_CMD) go run ./vendor/sigs.k8s.io/controller-tools/cmd/controller-gen \
paths=./pkg/apis/... object:headerFile=./hack/boilerplate.go.txt,year=2020

.PHONY: gen-crd
gen-crd:
Expand Down
48 changes: 16 additions & 32 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,38 +1,22 @@
module github.com/openshift/cluster-autoscaler-operator

go 1.12
go 1.13

require (
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/blang/semver v3.5.1+incompatible
github.com/coreos/prometheus-operator v0.31.1
github.com/emicklei/go-restful v2.9.5+incompatible // indirect
github.com/evanphx/json-patch v4.2.0+incompatible // indirect
github.com/go-openapi/spec v0.19.0
github.com/go-openapi/swag v0.19.0 // indirect
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef // indirect
github.com/google/gofuzz v1.0.0 // indirect
github.com/google/uuid v1.1.1 // indirect
github.com/imdario/mergo v0.3.7 // indirect
github.com/mailru/easyjson v0.0.0-20190403194419-1ea4449da983 // indirect
github.com/openshift/api v0.0.0-20190517100836-d5b34b957e91
github.com/openshift/client-go v0.0.0-20190517130439-f4b242dfe085
github.com/openshift/cluster-version-operator v0.0.0-20190521101715-44cc4bc6c2a9
github.com/pborman/uuid v0.0.0-20180906182336-adf5a7427709 // indirect
github.com/prometheus/client_golang v0.9.3 // indirect
github.com/prometheus/procfs v0.0.0-20190521135221-be78308d8a4f // indirect
github.com/stretchr/testify v1.3.0
golang.org/x/oauth2 v0.0.0-20190517181255-950ef44c6e07 // indirect
golang.org/x/sys v0.0.0-20190520201301-c432e742b0af // indirect
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 // indirect
google.golang.org/appengine v1.6.0 // 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.0
k8s.io/kube-aggregator v0.0.0-20190314000639-da8327669ac5 // indirect
k8s.io/kube-openapi v0.0.0-20190510232812-a01b7d5d6c22
k8s.io/utils v0.0.0-20190520173318-324c5df7d3f0
sigs.k8s.io/controller-runtime v0.0.0-20190520212815-96b67f231945
sigs.k8s.io/controller-tools v0.2.0
github.com/coreos/prometheus-operator v0.38.0
github.com/openshift/api v0.0.0-20200331152225-585af27e34fd
github.com/openshift/client-go v0.0.0-20200326155132-2a6cd50aedd0
github.com/openshift/library-go v0.0.0-20200402123743-4015ba624cae
github.com/stretchr/testify v1.4.0
k8s.io/api v0.18.0
k8s.io/apimachinery v0.18.0
k8s.io/client-go v12.0.0+incompatible
k8s.io/klog v1.0.0
k8s.io/utils v0.0.0-20200327001022-6496210b90e8
sigs.k8s.io/controller-runtime v0.5.1-0.20200330174416-a11a908d91e0
sigs.k8s.io/controller-tools v0.2.9-0.20200331153640-3c5446d407dd
)

// to replace github.com/coreos/prometheus-operator v0.38.0 dep
replace k8s.io/client-go => k8s.io/client-go v0.18.0