# DevOps Helm Chart
# 安装 Chart
git clone http://euler.git.primeton.com/devops/devops-helm.git
kubectl create namespace devops
helm upgrade --install devops devops-helm/charts/devops -n devops
默认登录认证信息:sysadmin/000000.
# 卸载 Chart
卸载或删除已部署的 Chart:
$ helm list -n devops
NAME REVISION UPDATED STATUS CHART NAMESPACE
devops 1 2024-03-06 13:49:41 DEPLOYED devops-0.1.0 devops
$ helm delete devops -n devops
# 配置
# 镜像
image:
repository: hub.c.primeton.com/devops-pro/primeton/devops
pullPolicy: IfNotPresent
tag: 6.6.0.0
# If using a private repository, the imagePullSecrets to use
imagePullSecrets: []
# - name: registry-harbor
# 持久化
persistence:
enabled: false
## Set annotations on pvc
annotations: {}
## Specify an existing volume claim instead of creating a new one.
## When using this option all following options like storageClass, accessMode and size are ignored.
# existingClaim:
storageClass: ""
accessMode: ReadWriteOnce
size: 15Gi
# Service
service:
## Specify a service type
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types
type: ClusterIP
port: 8080
# nodePort: 32001
# 内置数据源
mysql:
enabled: true
mysqlDatabase: "devops"
mysqlUser: "devops"
mysqlPassword: "devops"
image: mysql
imageTag: 5.7.32
imagePullPolicy: IfNotPresent
imagePullSecrets: []
persistence:
enabled: false
accessMode: ReadWriteOnce
size: 8Gi
storageClass:
service:
type: ClusterIP
port: 3306
# nodePort: 32000
resources:
requests:
memory: 256Mi
cpu: 100m
limits:
cpu: 2
memory: 2Gi
configurationFiles:
mysql.cnf: |-
[mysqld]
port=3306
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_general_ci
lower_case_table_names = 1
innodb_large_prefix = ON
innodb_file_format = Barracuda
innodb_file_format_check = ON
innodb_file_format_max = Barracuda
innodb_file_per_table = ON
sql_mode = NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
max_allowed_packet=256MB
max_connections=1000
symbolic-links=0
# SQL file configuration for database initialization
# name: part of ConfigMap name
# fileName: data key in ConfigMap
# path: sql initialization script stored in the charts/mysql/config/initdb directory)
initdbScriptsConfigMaps:
- name: devops-ddl-all-config
fileName: 1-devops-ddl-all.sql
path: config/initdb/1-devops-ddl-all.sql
- name: devops-data-all-config
fileName: 2-devops-data-all.sql
path: config/initdb/2-devops-data-all.sql
# 外置数据源
使用外置数据源,需将mysql.enabled
设置为false
,jdbcOverwrite
设置为true
。
## Override JDBC values
## for external Databases
jdbcOverwrite:
# If enable the JDBC Overwrite, make sure to set `mysql.enabled=false`
enabled: false
# Database Type (e.g., MySql, Oracle)
databaseType: "MySql"
# The JDBC Driver
jdbcDriver: "com.mysql.jdbc.Driver"
# The JDBC url of the external DB
jdbcUrl: "jdbc:mysql://ip:3306/devops_database?characterEncoding=UTF-8"
# The DB user that should be used for the JDBC connection
jdbcUsername: "username"
# Use this if you don't mind the DB password getting stored in plain text within the values file
jdbcPassword: "password"
# 替换 License
将 DevOps License 文件保存至charts/devops/config/license.xml
即可