Skip to content

Commit

Permalink
Merge remote-tracking branch 'github/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
MandssS committed Aug 19, 2024
2 parents eaae4ac + 0d789ef commit ca1eed2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.mysql.enable }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -26,8 +27,8 @@ spec:
- virtual-kubelet
containers:
- name: chaosblade-box-mysql
image: mysql:5.6
imagePullPolicy: IfNotPresent
image: {{ .Values.mysql.image.repository }}:{{ .Values.mysql.image.version }}
imagePullPolicy: {{ .Values.mysql.image.pullPolicy }}
ports:
- name: mysql-port
containerPort: 3306
Expand All @@ -46,3 +47,4 @@ spec:
hostPath:
path: /data/mysql
type: DirectoryOrCreate
{{- end }}
3 changes: 2 additions & 1 deletion deploy/chaosblade-box/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.mysql.enable }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -14,7 +15,7 @@ spec:
app: chaosblade-box-mysql
sessionAffinity: None
type: ClusterIP

{{- end }}
---
apiVersion: v1
kind: Service
Expand Down
8 changes: 8 additions & 0 deletions deploy/chaosblade-box/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ box:
version: 1.0.5
pullPolicy: IfNotPresent

mysql:
# If true, use the built-in MySQL. Otherwise, an external MySQL is required,
# and must edit the spring.datasource to your external MySQL.
enable: true
image:
repository: mysql
version: 5.6
pullPolicy: IfNotPresent
spring:
datasource:
url: jdbc:mysql://chaosblade-box-mysql:3306/chaosblade?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
Expand Down

0 comments on commit ca1eed2

Please sign in to comment.