Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4a4ce0e
feat(argocd): update targetRevision to argocd branch
chris-sun-star Sep 12, 2025
7ad2ce8
refactor(argocd): rename app-of-apps to oceanbase-stack
chris-sun-star Sep 12, 2025
e134c19
refactor(argocd): align proxy and tenant sync-wave
chris-sun-star Sep 12, 2025
2edc579
refactor(argocd): use yaml for cluster/tenant and add secrets wave
chris-sun-star Sep 12, 2025
2914de0
feat(argocd): add job to generate random passwords for secrets
chris-sun-star Sep 12, 2025
c6cb221
fix(argocd): align secret generation with obcluster config
chris-sun-star Sep 12, 2025
7996bc0
add argocd configs to set up oceanbase environment
chris-sun-star Sep 12, 2025
856ecca
move create namespace logic into secret
chris-sun-star Sep 12, 2025
c6a0712
delete cert-manager
chris-sun-star Sep 14, 2025
27cfb61
fix secret app
chris-sun-star Sep 14, 2025
e5a218a
custom checking for obcluster and obtenant
chris-sun-star Sep 14, 2025
32b569b
ignore some resource in obcluster and obtenant
chris-sun-star Sep 15, 2025
ec5af05
fix ignore difference
chris-sun-star Sep 15, 2025
29e0fdb
fix ignore difference for tenant
chris-sun-star Sep 15, 2025
9f81ac8
register rs_list using configserver
chris-sun-star Sep 15, 2025
f69f667
change app name
chris-sun-star Sep 15, 2025
095a7fc
generate all the passwords
chris-sun-star Sep 15, 2025
03e7ca6
modify check healthy logic
chris-sun-star Sep 15, 2025
10797fa
add logs
chris-sun-star Sep 15, 2025
8d93278
sync password create
chris-sun-star Sep 15, 2025
633fcda
remote annotations
chris-sun-star Sep 15, 2025
8a34a93
do not ignore status
chris-sun-star Sep 15, 2025
fa5f187
add job to wait for ob-cluster created
chris-sun-star Sep 15, 2025
b53e151
adjust the order of resource creation
chris-sun-star Sep 15, 2025
aab0d38
delete jobs for waiting obcluster
chris-sun-star Sep 15, 2025
8c89945
scale zone1
chris-sun-star Sep 15, 2025
9415d86
change zone1 to 1
chris-sun-star Sep 15, 2025
452fcb7
change repo and branch
chris-sun-star Sep 16, 2025
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
22 changes: 22 additions & 0 deletions example/argocd/apps/ob-configserver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: ob-configserver
namespace: argocd
annotations:
argocd.argoproj.io/hook: PreSync
spec:
project: default
source:
repoURL: https://github.com/oceanbase/ob-operator.git
path: example/argocd/resources/ob-configserver
targetRevision: master
destination:
server: "https://kubernetes.default.svc"
namespace: oceanbase
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
26 changes: 26 additions & 0 deletions example/argocd/apps/ob-operator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: ob-operator
namespace: argocd
annotations:
argocd.argoproj.io/hook: PreSync
spec:
project: default
source:
repoURL: https://oceanbase.github.io/ob-operator
chart: ob-operator
targetRevision: 2.3.3
helm:
parameters:
- name: reporter
value: "argocd"
destination:
server: "https://kubernetes.default.svc"
namespace: oceanbase-system
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
26 changes: 26 additions & 0 deletions example/argocd/apps/obcluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: ob-cluster
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "1"

spec:
project: default
source:
repoURL: https://github.com/oceanbase/ob-operator.git
path: example/argocd/resources/obcluster
targetRevision: master
destination:
server: "https://kubernetes.default.svc"
namespace: oceanbase
syncPolicy:
automated:
prune: true
selfHeal: true
ignoreDifferences:
- group: "oceanbase.oceanbase.com"
kind: "OBCluster"
jsonPointers:
- /spec/parameters
20 changes: 20 additions & 0 deletions example/argocd/apps/obproxy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: ob-proxy
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "1"
spec:
project: default
source:
repoURL: https://github.com/oceanbase/ob-operator.git
path: example/argocd/resources/obproxy
targetRevision: master
destination:
server: "https://kubernetes.default.svc"
namespace: oceanbase
syncPolicy:
automated:
prune: true
selfHeal: true
25 changes: 25 additions & 0 deletions example/argocd/apps/obtenant.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: ob-tenant
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "2"
spec:
project: default
source:
repoURL: https://github.com/oceanbase/ob-operator.git
path: example/argocd/resources/obtenant
targetRevision: master
destination:
server: "https://kubernetes.default.svc"
namespace: oceanbase
syncPolicy:
automated:
prune: true
selfHeal: true
ignoreDifferences:
- group: "oceanbase.oceanbase.com"
kind: "OBTenant"
jsonPointers:
- /spec/pools
22 changes: 22 additions & 0 deletions example/argocd/apps/secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: secrets
namespace: argocd
annotations:
argocd.argoproj.io/hook: PreSync
spec:
project: default
source:
repoURL: https://github.com/oceanbase/ob-operator.git
path: example/argocd/resources/secrets
targetRevision: master
destination:
server: "https://kubernetes.default.svc"
namespace: oceanbase
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
18 changes: 18 additions & 0 deletions example/argocd/oceanbase-stack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: oceanbase-stack
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/oceanbase/ob-operator.git
path: example/argocd/apps
targetRevision: master
destination:
server: "https://kubernetes.default.svc"
namespace: argocd
syncPolicy:
automated:
prune: true
selfHeal: true
52 changes: 52 additions & 0 deletions example/argocd/resources/ob-configserver/configserver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
apiVersion: v1
kind: Service
metadata:
name: ob-configserver
namespace: oceanbase
spec:
type: NodePort
selector:
app: ob-configserver
ports:
- name: "http"
port: 8080
targetPort: 8080
nodePort: 30080
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: ob-configserver
namespace: oceanbase
spec:
selector:
matchLabels:
app: ob-configserver
replicas: 1
template:
metadata:
labels:
app: ob-configserver
spec:
containers:
- name: ob-configserver
image: oceanbase/ob-configserver:1.0.0-2
ports:
- containerPort: 8080
name: "http"
env:
- name: DATABASE_TYPE
value: sqlite3
- name: SVC_ADDRESS
value: $(OB_CONFIGSERVER_SERVICE_HOST)
- name: SVC_PORT
value: $(OB_CONFIGSERVER_SERVICE_PORT)
resources:
limits:
memory: 2Gi
cpu: "1"
requests:
memory: 200Mi
cpu: 100m


43 changes: 43 additions & 0 deletions example/argocd/resources/obcluster/obcluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
apiVersion: oceanbase.oceanbase.com/v1alpha1
kind: OBCluster
metadata:
name: obcluster
namespace: oceanbase
annotations:
"oceanbase.oceanbase.com/mode": "service"
spec:
clusterName: obcluster
clusterId: 1
userSecrets:
root: root-password
proxyro: proxyro-password
monitor: monitor-password
operator: operator-password
topology:
- zone: zone1
replica: 1
- zone: zone2
replica: 1
- zone: zone3
replica: 1
observer:
image: oceanbase/oceanbase-cloud-native:4.3.5.3-103000092025080818
resource:
memory: 10Gi
storage:
dataStorage:
storageClass: local-path
size: 30Gi
redoLogStorage:
storageClass: local-path
size: 30Gi
logStorage:
storageClass: local-path
size: 10Gi
parameters:
- name: __min_full_resource_pool_memory
value: "2147483648"
- name: system_memory
value: 1G
- name: obconfig_url
value: 'http://ob-configserver.oceanbase.svc:8080/services?Action=ObRootServiceInfo&ObCluster=obcluster'
60 changes: 60 additions & 0 deletions example/argocd/resources/obproxy/obproxy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
apiVersion: v1
kind: Service
metadata:
name: obproxy
namespace: oceanbase
spec:
type: ClusterIP
selector:
app: obproxy
ports:
- name: "sql"
port: 2883
targetPort: 2883
- name: "prometheus"
port: 2884
targetPort: 2884

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: obproxy
namespace: oceanbase
spec:
selector:
matchLabels:
app: obproxy
replicas: 2
template:
metadata:
labels:
app: obproxy
spec:
containers:
- name: obproxy
image: oceanbase/obproxy-ce:4.3.3.0-5
ports:
- containerPort: 2883
name: "sql"
- containerPort: 2884
name: "prometheus"
env:
- name: APP_NAME
value: obcluster
- name: OB_CLUSTER
value: obcluster
- name: CONFIG_URL
value: 'http://ob-configserver.oceanbase.svc:8080/services?Action=GetObProxyConfig'
- name: PROXYRO_PASSWORD
valueFrom:
secretKeyRef:
name: proxyro-password
key: password
resources:
limits:
memory: 2Gi
cpu: "1"
requests:
memory: 200Mi
cpu: 200m
43 changes: 43 additions & 0 deletions example/argocd/resources/obtenant/obtenant.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
apiVersion: oceanbase.oceanbase.com/v1alpha1
kind: OBTenant
metadata:
name: obtenant
namespace: oceanbase
spec:
obcluster: obcluster
tenantName: obtenant
unitNum: 1
charset: utf8mb4
connectWhiteList: '%'
forceDelete: true
credentials:
root: tenant-root-password
standbyRo: standbyro-password
pools:
- zone: zone1
type:
name: Full
replica: 1
isActive: true
resource:
maxCPU: 4
memorySize: 5Gi
logDiskSize: 15Gi
- zone: zone2
type:
name: Full
replica: 1
isActive: true
resource:
maxCPU: 4
memorySize: 5Gi
logDiskSize: 15Gi
- zone: zone3
type:
name: Full
replica: 1
isActive: true
resource:
maxCPU: 4
memorySize: 5Gi
logDiskSize: 15Gi
Loading
Loading