通用 Helm Chart 模版
- Set imageCredentials for image pulling
imageCredentials:
registry: registry.cn-hangzhou.aliyuncs.com
username: deploy-man@skylark
password: changeit
- Set image info for image pulling
image:
repository: skylark/production
tag: "latest"
pullPolicy: IfNotPresent
- Set host for app
# Application 代理设置
applicationHost:
- factory.jet.localhost
# traefik 代理匹配规则
traefik:
- name: web
path: /
- Set environments for app
# 根据实际需要填写环境变量
env:
auth: YKeLit
...
# set release-name install
helm install -f $release_name.values.yaml release-name ./
注:# 使用命令
base64 -i tlsFile
生成certificate
与key
的值
# $release_name.values.yaml
jetFactoryTLSSecret:
certificate: |-
base64 encoded certificate
key: |-
base64 encoded key
initContainers: {}
- name: init
image: busybox:latest
command: ["sh", "-c"]
args:
- |
ls -a
envFrom:
- configMapRef:
name: {{ .Chart.Name }}
volumeMounts: {}
- mountPath: /path/file
name: volumeName
volumes: {}
- name: volumeName
hostPath:
path: /local/path
type: DirectoryOrCreate
externalEndPoint: {}
- name: ""
ip: ""
port: ""
externalService: {}
- name: ""
port: ""
targetPort: ""
helm uninstall release-name
helm upgrade -f $release_name.values.yaml release-name ./
--namespace jet-factory
: 指定名称空间
--create-namespace
: 创建名称空间