-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kubebuilder v4 + dependencies upgrade (#978)
- Loading branch information
1 parent
5cef723
commit e9b2e9c
Showing
168 changed files
with
13,590 additions
and
9,541 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
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 |
---|---|---|
|
@@ -266,8 +266,8 @@ e2e-local: fmt vet manifests patch_crds | |
$(GOCMD) tool cover -func coverage.txt | grep total | ||
|
||
lint: | ||
golangci-lint run --exclude '(SA1019):' -E typecheck -E gosimple -E gocritic --timeout 5m ./controllers/... ./internal/... | ||
golint ./controllers/... | ||
golangci-lint run --exclude '(SA1019):' -E typecheck -E gosimple -E gocritic --timeout 5m ./internal/... | ||
golint ./internal/controller/... | ||
|
||
.PHONY:clean | ||
clean: | ||
|
@@ -280,12 +280,12 @@ all: build | |
# Run tests | ||
test: manifests generate fmt vet patch_crds | ||
echo 'mode: atomic' > coverage.txt && \ | ||
$(TEST_ARGS) $(REPO)/controllers/... $(REPO)/api/... | ||
$(TEST_ARGS) $(REPO)/internal/controller/... $(REPO)/api/... | ||
$(GOCMD) tool cover -func coverage.txt | grep total | ||
|
||
# Build manager binary | ||
manager: fmt vet | ||
CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} $(GOBUILD) -o bin/manager main.go | ||
CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} $(GOBUILD) -o bin/manager cmd/main.go | ||
|
||
# Run against the configured Kubernetes cluster in ~/.kube/config | ||
run: manager | ||
|
@@ -344,7 +344,7 @@ ifeq (, $(shell which kustomize)) | |
KUSTOMIZE_GEN_TMP_DIR=$$(mktemp -d) ;\ | ||
cd $$KUSTOMIZE_GEN_TMP_DIR ;\ | ||
go mod init tmp ;\ | ||
go install sigs.k8s.io/kustomize/kustomize/[email protected] ;\ | ||
go install sigs.k8s.io/kustomize/kustomize/[email protected] ;\ | ||
rm -rf $$KUSTOMIZE_GEN_TMP_DIR ;\ | ||
} | ||
KUSTOMIZE=$(GOBIN)/kustomize | ||
|
@@ -397,7 +397,7 @@ docker-build-arch: | |
. | ||
|
||
package-arch: | ||
CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} $(GOBUILD) -o bin/manager-$(GOARCH) main.go | ||
CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} $(GOBUILD) -o bin/manager-$(GOARCH) cmd/main.go | ||
|
||
|
||
build-operator-crosscompile: fmt vet | ||
|
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 |
---|---|---|
@@ -1,106 +1,137 @@ | ||
# Code generated by tool. DO NOT EDIT. | ||
# This file is used to track the info used to scaffold your project | ||
# and allow the plugins properly work. | ||
# More info: https://book.kubebuilder.io/reference/project-config.html | ||
domain: victoriametrics.com | ||
layout: go.kubebuilder.io/v2 | ||
layout: | ||
- go.kubebuilder.io/v4 | ||
projectName: victoriametrics-operator | ||
repo: github.com/VictoriaMetrics/operator | ||
resources: | ||
- | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
controller: true | ||
domain: victoriametrics.com | ||
group: operator | ||
kind: VMAgent | ||
path: github.com/VictoriaMetrics/operator/api/v1beta1 | ||
version: v1beta1 | ||
- | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
controller: true | ||
domain: victoriametrics.com | ||
group: operator | ||
kind: VMAlert | ||
path: github.com/VictoriaMetrics/operator/api/v1beta1 | ||
version: v1beta1 | ||
- | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
controller: true | ||
domain: victoriametrics.com | ||
group: operator | ||
kind: VMAlertmanager | ||
path: github.com/VictoriaMetrics/operator/api/v1beta1 | ||
version: v1beta1 | ||
- | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
controller: true | ||
domain: victoriametrics.com | ||
group: operator | ||
kind: VMAlertmanagerConfig | ||
path: github.com/VictoriaMetrics/operator/api/v1beta1 | ||
version: v1beta1 | ||
- | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
controller: true | ||
domain: victoriametrics.com | ||
group: operator | ||
kind: VMPodScrape | ||
path: github.com/VictoriaMetrics/operator/api/v1beta1 | ||
version: v1beta1 | ||
- | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
controller: true | ||
domain: victoriametrics.com | ||
group: operator | ||
kind: VMRule | ||
path: github.com/VictoriaMetrics/operator/api/v1beta1 | ||
version: v1beta1 | ||
- | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
controller: true | ||
domain: victoriametrics.com | ||
group: operator | ||
kind: VMServiceScrape | ||
path: github.com/VictoriaMetrics/operator/api/v1beta1 | ||
version: v1beta1 | ||
- | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
controller: true | ||
domain: victoriametrics.com | ||
group: operator | ||
kind: VMSingle | ||
path: github.com/VictoriaMetrics/operator/api/v1beta1 | ||
version: v1beta1 | ||
- | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
controller: true | ||
domain: victoriametrics.com | ||
group: operator | ||
kind: VMCluster | ||
path: github.com/VictoriaMetrics/operator/api/v1beta1 | ||
version: v1beta1 | ||
- | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
controller: true | ||
domain: victoriametrics.com | ||
group: operator | ||
kind: VMProbe | ||
path: github.com/VictoriaMetrics/operator/api/v1beta1 | ||
version: v1beta1 | ||
- | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
controller: true | ||
domain: victoriametrics.com | ||
group: operator | ||
kind: VMNodeScrape | ||
path: github.com/VictoriaMetrics/operator/api/v1beta1 | ||
version: v1beta1 | ||
- | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
controller: true | ||
domain: victoriametrics.com | ||
group: operator | ||
kind: VMStaticScrape | ||
path: github.com/VictoriaMetrics/operator/api/v1beta1 | ||
version: v1beta1 | ||
- | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
controller: true | ||
domain: victoriametrics.com | ||
group: operator | ||
kind: VMUser | ||
path: github.com/VictoriaMetrics/operator/api/v1beta1 | ||
version: v1beta1 | ||
- | ||
- api: | ||
crdVersion: v1 | ||
namespaced: true | ||
controller: true | ||
domain: victoriametrics.com | ||
group: operator | ||
kind: VMAuth | ||
path: github.com/VictoriaMetrics/operator/api/v1beta1 | ||
version: v1beta1 | ||
version: "3" | ||
plugins: | ||
go.operator-sdk.io/v2-alpha: {} |
File renamed without changes.
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
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,27 @@ | ||
# permissions for end users to edit vmclusters. | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: victoriametrics-operator | ||
app.kubernetes.io/managed-by: kustomize | ||
name: vmcluster-editor-role | ||
rules: | ||
- apiGroups: | ||
- operator.victoriametrics.com | ||
resources: | ||
- vmclusters | ||
verbs: | ||
- create | ||
- delete | ||
- get | ||
- list | ||
- patch | ||
- update | ||
- watch | ||
- apiGroups: | ||
- operator.victoriametrics.com | ||
resources: | ||
- vmclusters/status | ||
verbs: | ||
- get |
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,23 @@ | ||
# permissions for end users to view vmclusters. | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: victoriametrics-operator | ||
app.kubernetes.io/managed-by: kustomize | ||
name: vmcluster-viewer-role | ||
rules: | ||
- apiGroups: | ||
- operator.victoriametrics.com | ||
resources: | ||
- vmclusters | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- operator.victoriametrics.com | ||
resources: | ||
- vmclusters/status | ||
verbs: | ||
- get |
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,9 @@ | ||
apiVersion: operator.victoriametrics.com/v1beta1 | ||
kind: VMAgent | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: victoriametrics-operator | ||
app.kubernetes.io/managed-by: kustomize | ||
name: vmagent-sample | ||
spec: | ||
# TODO(user): Add fields here |
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,9 @@ | ||
apiVersion: operator.victoriametrics.com/v1beta1 | ||
kind: VMAlert | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: victoriametrics-operator | ||
app.kubernetes.io/managed-by: kustomize | ||
name: vmalert-sample | ||
spec: | ||
# TODO(user): Add fields here |
Oops, something went wrong.