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

# support nacos ci #423

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
55 changes: 55 additions & 0 deletions helm/templates/mysql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{{- if eq .Values.nacos.storage.type "mysql"}}
apiVersion: v1
kind: ReplicationController
metadata:
name: {{ .Values.nacos.storage.db.host }}
namespace: {{ .Values.namespace }}
labels:
name: mysql

spec:
replicas: 1
selector:
name: mysql
template:
metadata:
labels:
name: mysql
spec:
containers:
- name: {{ .Values.nacos.storage.db.host }}
image: nacos/nacos-mysql:5.7
ports:
- containerPort: {{ .Values.nacos.storage.db.port }}
volumeMounts:
- name: mysql-data
mountPath: /var/lib/mysql
env:
- name: MYSQL_ROOT_PASSWORD
value: "root"
- name: MYSQL_DATABASE
value: {{ .Values.nacos.storage.db.name }}
- name: MYSQL_USER
value: {{ .Values.nacos.storage.db.username }}
- name: MYSQL_PASSWORD
value: {{ .Values.nacos.storage.db.password }}
volumes:
- name: mysql-data
{{- end }}

---
{{- if eq .Values.nacos.storage.type "mysql"}}
apiVersion: v1
kind: Service
metadata:
name: mysql
namespace: {{ .Values.namespace }}
labels:
name: mysql
spec:
ports:
- port: {{ .Values.nacos.storage.db.port }}
targetPort: {{ .Values.nacos.storage.db.port }}
selector:
name: mysql
{{- end }}
23 changes: 11 additions & 12 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Declare variables to be passed into your templates.

global:
mode: standalone
# mode: cluster
# mode: standalone
mode: cluster

############################nacos###########################
namespace: default
Expand All @@ -27,15 +27,15 @@ nacos:
health:
enabled: false
storage:
type: embedded
# type: mysql
# db:
# host: localhost
# name: nacos
# port: 3306
# username: usernmae
# password: password
# param: characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useSSL=false
# type: embedded
type: mysql
db:
host: "mysql"
name: "nacos_devtest"
port: 3306
username: "nacos"
password: "nacos"
param: characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useSSL=false

persistence:
enabled: false
Expand Down Expand Up @@ -95,4 +95,3 @@ tolerations: [ ]
affinity: { }