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

optimize cluster operation and some other fixes #66

Merged
merged 30 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
bf2ee2e
add test
chris-sun-star Aug 25, 2023
0a93925
recover task panic, add more test
chris-sun-star Aug 29, 2023
5d8036d
add more log
chris-sun-star Sep 4, 2023
72222c2
fix race condition
chris-sun-star Sep 4, 2023
2521190
add race condition check flag
chris-sun-star Sep 4, 2023
13181b7
fix obzone
chris-sun-star Sep 5, 2023
9f9ae03
merge upstream
chris-sun-star Sep 7, 2023
96eca36
Merge branch '2.0.x_dev' into dev
chris-sun-star Sep 7, 2023
8e44628
create service for monitor
chris-sun-star Sep 7, 2023
48fe2df
Merge branch 'dev' of github.com:chris-sun-star/ob-operator into dev
chris-sun-star Sep 7, 2023
dd08e0a
create service for monitor
chris-sun-star Sep 7, 2023
3d900f2
create service for monitor sd
chris-sun-star Sep 11, 2023
1a1b96e
change service name
chris-sun-star Sep 13, 2023
b520c65
merge
chris-sun-star Sep 13, 2023
2e7f417
fix tenant data race
chris-sun-star Sep 13, 2023
600e8b1
optimize obcluster task, automatically modify sys tenant's pool and l…
chris-sun-star Sep 18, 2023
4bd94a0
delete unused function
chris-sun-star Sep 19, 2023
ab7e9ad
Merge branch '2.0.x_dev' of github.com:oceanbase/ob-operator into 2.0…
chris-sun-star Sep 19, 2023
e7d4789
merge from dev
chris-sun-star Sep 19, 2023
ee7f304
use standard obcluster as example
chris-sun-star Sep 19, 2023
565bde8
merge from dev
chris-sun-star Sep 19, 2023
4432c86
delete unused option set
chris-sun-star Sep 19, 2023
7d6a768
add license
chris-sun-star Sep 19, 2023
7e24919
fix lint
chris-sun-star Sep 19, 2023
1478792
fix lint
chris-sun-star Sep 19, 2023
c9cf21d
fix license and lint
chris-sun-star Sep 19, 2023
737ea9c
fix lint
chris-sun-star Sep 19, 2023
f08b46a
fix lint
chris-sun-star Sep 19, 2023
fa001cc
add log when query observer failed
chris-sun-star Sep 19, 2023
df2a477
optimize query observer
chris-sun-star Sep 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ FROM golang:1.20.4 as builder

ARG GOPROXY
ARG GOSUMDB
ARG RACE

WORKDIR /workspace
# copy everything
COPY . .
RUN GO11MODULE=ON CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o manager cmd/main.go
RUN GO11MODULE=ON CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build ${RACE} -o manager cmd/main.go

# start build docker image
FROM openanolis/anolisos:8.4-x86_64
Expand Down
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ endif
GOPROXY=$(shell go env GOPROXY)
GOPROXY ?= https://goproxy.io,direct
GOSUMDB ?= sum.golang.org
RACE ?= ''

# Setting SHELL to bash allows bash commands to be executed by recipes.
# Options are set to exit when a recipe line exits non-zero or a piped command fails.
Expand Down Expand Up @@ -62,7 +63,7 @@ vet: ## Run go vet against code.

.PHONY: test
test: manifests generate fmt vet envtest ## Run tests.
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test -v ./... -coverprofile cover.out
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test -timeout 60m -v ./... -coverprofile cover.out

##@ Build

Expand All @@ -79,11 +80,11 @@ run: manifests generate fmt vet ## Run a controller from your host.
# More info: https://docs.docker.com/develop/develop-images/build_enhancements/
.PHONY: docker-build
docker-build: ## Build docker image with the manager.
sudo docker build -t ${IMG} --build-arg GOPROXY=${GOPROXY} --build-arg GOSUMDB=${GOSUMDB} .
sudo docker build -t ${IMG} --build-arg GOPROXY=${GOPROXY} --build-arg GOSUMDB=${GOSUMDB} --build-arg RACE=${RACE} .

.PHONY: docker-push
docker-push: ## Push docker image with the manager.
docker push ${IMG}
sudo docker push ${IMG}

# PLATFORMS defines the target platforms for the manager image be build to provide support to multiple
# architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). To use this option you need to:
Expand Down Expand Up @@ -186,4 +187,4 @@ $(ENVTEST): $(LOCALBIN)
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest

.PHONY: tools
tools: $(YQ) $(SEMVER)
tools: $(YQ) $(SEMVER)
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ kind: Kustomization
images:
- name: controller
newName: oceanbasedev/ob-operator
newTag: 2.0.3-alpha.101
newTag: 2.0.0
4 changes: 2 additions & 2 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ spec:
# More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
resources:
limits:
cpu: 500m
memory: 128Mi
cpu: 1
memory: 1Gi
requests:
cpu: 10m
memory: 64Mi
Expand Down
26 changes: 26 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,32 @@ rules:
- get
- patch
- update
- apiGroups:
- ""
resources:
- services
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- services/finalizers
verbs:
- update
- apiGroups:
- ""
resources:
- services/status
verbs:
- get
- patch
- update
- apiGroups:
- batch
resources:
Expand Down
Loading