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

add example for deloy obconfigserver using mysql as backend #268

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
60 changes: 60 additions & 0 deletions example/webapp/configserver-mysql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
apiVersion: v1
kind: Service
metadata:
name: svc-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: mysql
- name: SVC_ADDRESS
value: $(SVC_OB_CONFIGSERVER_SERVICE_HOST)
- name: SVC_PORT
value: $(SVC_OB_CONFIGSERVER_SERVICE_PORT)
- name: META_HOST
value: $(SVC_MYSQL_SERVICE_HOST)
- name: META_PORT
value: $(SVC_MYSQL_SERVICE_PORT)
- name: META_USER
value: 'root'
- name: META_PASSWORD
value: '******'
- name: META_DATABASE
value: 'configserver'
resources:
limits:
memory: 2Gi
cpu: "1"
requests:
memory: 200Mi
cpu: 100m
41 changes: 41 additions & 0 deletions example/webapp/mysql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
apiVersion: v1
kind: Service
metadata:
name: svc-mysql
namespace: oceanbase
spec:
selector:
app: mysql
ports:
- port: 3306
protocol: TCP
targetPort: 3306
type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: mysql
name: mysql
namespace: oceanbase
spec:
selector:
matchLabels:
app: mysql
template:
metadata:
labels:
app: mysql
spec:
containers:
- env:
- name: MYSQL_ROOT_PASSWORD
value: '******'
image: mysql:5.7
imagePullPolicy: IfNotPresent
name: mysql
ports:
- containerPort: 3306
protocol: TCP
restartPolicy: Always
Loading