-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1115 from equinor/master
release operator
- Loading branch information
Showing
174 changed files
with
3,506 additions
and
3,167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,8 @@ CONTAINER_REPO ?= radix$(ENVIRONMENT) | |
DOCKER_REGISTRY ?= $(CONTAINER_REPO).azurecr.io | ||
APP_ALIAS_BASE_URL = app.$(DNS_ZONE) | ||
|
||
KUBE_CODEGEN_VERSION = v0.25.3 | ||
|
||
HASH := $(shell git rev-parse HEAD) | ||
|
||
CLUSTER_NAME = $(shell kubectl config get-contexts | grep '*' | tr -s ' ' | cut -f 3 -d ' ') | ||
|
@@ -68,25 +70,12 @@ echo: | |
@echo "VERSION : " $(VERSION) | ||
@echo "TAG : " $(TAG) | ||
|
||
# find or download controller-gen | ||
# download controller-gen if necessary | ||
controller-gen: | ||
ifeq (, $(shell which controller-gen)) | ||
@{ \ | ||
set -e ;\ | ||
go install sigs.k8s.io/controller-tools/cmd/[email protected] ;\ | ||
} | ||
CONTROLLER_GEN=${GOPATH}/controller-gen | ||
else | ||
CONTROLLER_GEN=$(shell which controller-gen) | ||
endif | ||
|
||
.PHONY: test | ||
test: | ||
LOG_LEVEL=warn go test -cover `go list ./... | grep -v 'pkg/client'` | ||
|
||
.PHONY: mocks | ||
mocks: | ||
mocks: bootstrap | ||
mockgen -source ./pkg/apis/defaults/oauth2.go -destination ./pkg/apis/defaults/oauth2_mock.go -package defaults | ||
mockgen -source ./pkg/apis/deployment/deploymentfactory.go -destination ./pkg/apis/deployment/deploymentfactory_mock.go -package deployment | ||
mockgen -source ./pkg/apis/deployment/deployment.go -destination ./pkg/apis/deployment/deployment_mock.go -package deployment | ||
|
@@ -129,8 +118,13 @@ CUSTOM_RESOURCE_NAME=radix | |
CUSTOM_RESOURCE_VERSION=v1 | ||
|
||
.PHONY: code-gen | ||
code-gen: | ||
$(GOPATH)/pkg/mod/k8s.io/[email protected]/generate-groups.sh all $(ROOT_PACKAGE)/pkg/client $(ROOT_PACKAGE)/pkg/apis $(CUSTOM_RESOURCE_NAME):$(CUSTOM_RESOURCE_VERSION) --go-header-file $(GOPATH)/pkg/mod/k8s.io/[email protected]/hack/boilerplate.go.txt | ||
code-gen: bootstrap | ||
echo | ||
$$(go env GOPATH)/pkg/mod/k8s.io/code-generator@$(KUBE_CODEGEN_VERSION)/generate-groups.sh all \ | ||
$(ROOT_PACKAGE)/pkg/client \ | ||
$(ROOT_PACKAGE)/pkg/apis \ | ||
$(CUSTOM_RESOURCE_NAME):$(CUSTOM_RESOURCE_VERSION) \ | ||
--go-header-file hack/boilerplate.txt | ||
|
||
.PHONY: crds | ||
crds: temp-crds radixapplication-crd radixbatch-crd radixdnsalias-crd delete-temp-crds | ||
|
@@ -149,16 +143,46 @@ radixdnsalias-crd: temp-crds | |
cp $(CRD_TEMP_DIR)radix.equinor.com_radixdnsaliases.yaml $(CRD_CHART_DIR)radixdnsalias.yaml | ||
|
||
.PHONY: temp-crds | ||
temp-crds: controller-gen | ||
echo "tempcrdrun" | ||
${CONTROLLER_GEN} crd:crdVersions=v1 paths=./pkg/apis/radix/v1/ output:dir:=$(CRD_TEMP_DIR) | ||
temp-crds: bootstrap | ||
controller-gen crd:crdVersions=v1 paths=./pkg/apis/radix/v1/ output:dir:=$(CRD_TEMP_DIR) | ||
|
||
.PHONY: delete-temp-crds | ||
delete-temp-crds: | ||
rm -rf $(CRD_TEMP_DIR) | ||
|
||
.PHONY: lint | ||
lint: | ||
lint: bootstrap | ||
golangci-lint run | ||
|
||
.PHONY: generate | ||
generate: bootstrap code-gen crds mocks | ||
|
||
.PHONY: verify-generate | ||
verify-generate: bootstrap generate | ||
git diff --exit-code | ||
|
||
HAS_SWAGGER := $(shell command -v swagger;) | ||
HAS_GOLANGCI_LINT := $(shell command -v golangci-lint;) | ||
HAS_MOCKGEN := $(shell command -v mockgen;) | ||
HAS_CONTROLLER_GEN := $(shell command -v controller-gen;) | ||
HAS_GENERATE_GROUPS := $(shell command -v $$(go env GOPATH)/pkg/mod/k8s.io/code-generator@$(KUBE_CODEGEN_VERSION)/generate-groups.sh) | ||
|
||
.PHONY: bootstrap | ||
bootstrap: | ||
ifndef HAS_SWAGGER | ||
go install github.com/go-swagger/go-swagger/cmd/[email protected] | ||
endif | ||
ifndef HAS_GOLANGCI_LINT | ||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin v1.55.2 | ||
endif | ||
ifndef HAS_MOCKGEN | ||
go install github.com/golang/mock/[email protected] | ||
endif | ||
ifndef HAS_CONTROLLER_GEN | ||
go install sigs.k8s.io/controller-tools/cmd/[email protected] | ||
endif | ||
ifndef HAS_GENERATE_GROUPS | ||
-go install k8s.io/code-generator@$(KUBE_CODEGEN_VERSION) | ||
chmod +x $$(go env GOPATH)/pkg/mod/k8s.io/code-generator@$(KUBE_CODEGEN_VERSION)/generate-groups.sh | ||
chmod +x $$(go env GOPATH)/pkg/mod/k8s.io/code-generator@$(KUBE_CODEGEN_VERSION)/generate-internal-groups.sh | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1,231 changes: 657 additions & 574 deletions
1,231
charts/radix-operator/templates/radixapplication.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
Copyright The Kubernetes Authors. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.