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

Feature: configure topological structure with affinity and taint tolerations #87

Merged
merged 49 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
ecda640
add helm chart
chris-sun-star Sep 25, 2023
4e85f94
Fix uninitialized event recorder caused panic (#73)
powerfooI Sep 25, 2023
74f762d
add namespace
chris-sun-star Sep 25, 2023
cf8e9da
check connection with liveness probe port
chris-sun-star Sep 25, 2023
813195f
no need to test
chris-sun-star Sep 25, 2023
a75b0b9
add release workflow
chris-sun-star Sep 25, 2023
c3c922f
fix workflow yaml
chris-sun-star Sep 25, 2023
14b2c17
fix release
chris-sun-star Sep 25, 2023
3cbe67a
release helm chart
chris-sun-star Sep 25, 2023
8e15099
test release
chris-sun-star Sep 25, 2023
e562f03
Update release.yml
chris-sun-star Sep 25, 2023
4b66a03
test release
chris-sun-star Sep 25, 2023
7a65701
sync from master
chris-sun-star Sep 25, 2023
c650173
sync from master
chris-sun-star Sep 25, 2023
02a21f7
test
chris-sun-star Sep 25, 2023
bc23e9e
fix grammar
chris-sun-star Sep 25, 2023
50a7f95
fix filter
chris-sun-star Sep 25, 2023
afc8c02
build obagent docker image, set proper env name for obagent
chris-sun-star Sep 25, 2023
8b65f1a
support new obagent
chris-sun-star Sep 25, 2023
0165387
Merge pull request #75 from chris-sun-star/opt_obagent
powerfooI Sep 25, 2023
646cf7a
filter tags
chris-sun-star Sep 26, 2023
222f2a2
filter tags and branch
chris-sun-star Sep 26, 2023
ea3ea5a
fix tag filter
chris-sun-star Sep 26, 2023
b635aaf
fix tag filter
chris-sun-star Sep 26, 2023
8500323
change chart version
chris-sun-star Sep 26, 2023
d3dd8a4
change chart version
chris-sun-star Sep 26, 2023
e465ecf
update release workflow
chris-sun-star Sep 26, 2023
020c228
update chart version
chris-sun-star Sep 26, 2023
75e594e
Merge branch '2.0.0_release' into helm-chart
chris-sun-star Sep 26, 2023
5ef89f8
use oceanbase
chris-sun-star Sep 26, 2023
18a5d92
regenerate
chris-sun-star Sep 26, 2023
029282a
update observer image
chris-sun-star Sep 26, 2023
2ab1c60
omit unused image
chris-sun-star Sep 26, 2023
62118ad
Merge pull request #76 from chris-sun-star/helm-chart
powerfooI Sep 26, 2023
17a756b
update README (#78)
chris-sun-star Sep 26, 2023
33ef18a
clean task info (#79)
chris-sun-star Sep 27, 2023
f910abe
Update README.md
chris-sun-star Sep 28, 2023
24a3368
Update README.md
chris-sun-star Sep 28, 2023
69399e8
chore: compatibility patch for 2.0.0 -> 2.0.1; remove obclusterbackup…
powerfooI Oct 19, 2023
11bcc17
fix: test for 2.0.0 compatibility
powerfooI Oct 19, 2023
b968a79
merge: branch origin/2.0.0_release
powerfooI Oct 20, 2023
09ba7aa
fix: replay log only if restore until is not unlimited and replayEnab…
powerfooI Oct 23, 2023
6e5cf25
feat: add affinity and tolerations to zone topology
powerfooI Oct 24, 2023
884bb8f
fix: GOPROXY env variable in Makefile
powerfooI Oct 24, 2023
c9325d4
chore: stash
powerfooI Oct 24, 2023
ea6aeeb
fix: typo gmt_create_time to gmt_create
powerfooI Oct 24, 2023
04a8256
chore: fmt change tab to space
powerfooI Oct 24, 2023
90342c3
Merge branch 'patch/2.0.1_compat' into feat/topology
powerfooI Oct 25, 2023
df2d90a
Merge branch '2.0.x_dev' of github.com:oceanbase/ob-operator into fea…
powerfooI Oct 25, 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
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ GOBIN=$(shell go env GOPATH)/bin
else
GOBIN=$(shell go env GOBIN)
endif
GOPROXY=$(shell go env GOPROXY)
GOPROXY ?= https://goproxy.io,direct
GOSUMDB ?= sum.golang.org
RACE ?= ''
Expand Down
16 changes: 9 additions & 7 deletions api/v1alpha1/observer_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ type OBServerSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file

ClusterName string `json:"clusterName"`
ClusterId int64 `json:"clusterId,omitempty"`
Zone string `json:"zone"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
OBServerTemplate *OBServerTemplate `json:"observerTemplate"`
MonitorTemplate *MonitorTemplate `json:"monitorTemplate,omitempty"`
BackupVolume *BackupVolumeSpec `json:"backupVolume,omitempty"`
ClusterName string `json:"clusterName"`
ClusterId int64 `json:"clusterId,omitempty"`
Zone string `json:"zone"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
Affinity *corev1.Affinity `json:"affinity,omitempty"`
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
OBServerTemplate *OBServerTemplate `json:"observerTemplate"`
MonitorTemplate *MonitorTemplate `json:"monitorTemplate,omitempty"`
BackupVolume *BackupVolumeSpec `json:"backupVolume,omitempty"`
}

// OBServerStatus defines the observed state of OBServer
Expand Down
10 changes: 7 additions & 3 deletions api/v1alpha1/obzone_topology.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ See the Mulan PSL v2 for more details.

package v1alpha1

import corev1 "k8s.io/api/core/v1"

type OBZoneTopology struct {
Zone string `json:"zone"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
Replica int `json:"replica"`
Zone string `json:"zone"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
Affinity *corev1.Affinity `json:"affinity,omitempty"`
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
Replica int `json:"replica"`
}
24 changes: 24 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

922 changes: 922 additions & 0 deletions config/crd/bases/oceanbase.oceanbase.com_obclusters.yaml

Large diffs are not rendered by default.

867 changes: 867 additions & 0 deletions config/crd/bases/oceanbase.oceanbase.com_observers.yaml

Large diffs are not rendered by default.

908 changes: 908 additions & 0 deletions config/crd/bases/oceanbase.oceanbase.com_obzones.yaml

Large diffs are not rendered by default.

2,707 changes: 2,707 additions & 0 deletions deploy/crd.yaml

Large diffs are not rendered by default.

58 changes: 58 additions & 0 deletions deploy/obcluster_taint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
apiVersion: oceanbase.oceanbase.com/v1alpha1
kind: OBCluster
metadata:
name: test
namespace: oceanbase
spec:
clusterName: obcluster
clusterId: 1
userSecrets:
root: test-user-root
proxyro: test-user-proxyro
monitor: test-user-monitor
operator: test-user-operator
topology:
- zone: zone1
replica: 1
tolerations:
- key: "obtopo"
value: "zone"
effect: "NoSchedule"
- zone: zone2
replica: 1
tolerations:
- key: "obtopo"
value: "zone"
effect: "NoSchedule"
- zone: zone3
replica: 1
observer:
image: oceanbase/oceanbase-cloud-native:4.2.0.0-101000032023091319
resource:
cpu: 2
memory: 10Gi
storage:
dataStorage:
storageClass: local-path
size: 50Gi
redoLogStorage:
storageClass: local-path
size: 50Gi
logStorage:
storageClass: local-path
size: 20Gi
monitor:
image: oceanbase/obagent:4.2.0-100000062023080210
resource:
cpu: 1
memory: 1Gi
parameters:
- name: system_memory
value: 2G
# backupVolume:
# volume:
# name: backup
# nfs:
# server: 1.1.1.1
# path: /opt/nfs
# readOnly: false
Loading