代码拉取完成,页面将自动刷新
helmDefaults:
wait: false
atomic: true
timeout: 600
environments:
default:
values:
- values/.env-default.yaml
---
releases:
{{- range $serviceName, $serviceConfig := .Environment.Values.services }}
- name: {{ $serviceName }}
namespace: dev
chart: ./charts/golang-dev
# {{- if hasKey $serviceConfig "dependencies" }}
# needs:
# {{- range $dep := $serviceConfig.dependencies }}
# - {{ $dep }}
# {{- end }}
# {{- end }}
values:
- nameOverride: {{ $serviceName }}
service:
port: {{ $serviceConfig.port }}
{{- if hasKey $serviceConfig "envVars" }}
envVars:
{{- toYaml $serviceConfig.envVars | nindent 10 }}
{{- end }}
{{- $cmd := "" }}
{{- if hasKey $serviceConfig "cmd" }}
{{- $cmd = $serviceConfig.cmd }}
{{- else if hasKey $.Environment.Values "cmd" }}
{{- $cmd = $.Environment.Values.cmd }}
{{- end }}
{{- if ne $cmd "" }}
cmd: |-
{{- $cmd | nindent 10 }}
{{- end }}
{{- if hasKey $serviceConfig "ingress" }}
ingress:
enabled: true
hosts:
- host: {{ $serviceName }}.local
paths:
- path: /
pathType: Prefix
{{- end }}
{{- $volumes := list }}
{{- if hasKey $.Environment.Values "volumes" }}
{{- $volumes = $.Environment.Values.volumes }}
{{- end }}
{{- if hasKey $serviceConfig "volumes" }}
{{- $volumes = concat $volumes $serviceConfig.volumes }}
{{- end }}
{{- if ne (len $volumes) 0 }}
volumes:
{{- toYaml $volumes | nindent 8 }}
{{- end }}
{{- $volumeMounts := list }}
{{- if hasKey $.Environment.Values "volumeMounts" }}
{{- $volumeMounts = $.Environment.Values.volumeMounts }}
{{- end }}
{{- if hasKey $serviceConfig "volumeMounts" }}
{{- $volumeMounts = concat $volumeMounts $serviceConfig.volumeMounts }}
{{- end }}
{{- if ne (len $volumeMounts) 0 }}
volumeMounts:
{{- toYaml $volumeMounts | nindent 8 }}
{{- end }}
{{- $hostAliases := list }}
{{- if hasKey $.Environment.Values "hostAliases" }}
{{- $hostAliases = $.Environment.Values.hostAliases }}
{{- end }}
{{- if hasKey $serviceConfig "hostAliases" }}
{{- $hostAliases = concat $hostAliases $serviceConfig.hostAliases }}
{{- end }}
{{- if $hostAliases }}
hostAliases:
{{- toYaml $hostAliases | nindent 8 }}
{{- end }}
{{- if hasKey $serviceConfig "dependencies" }}
serviceDependencies:
{{- range $dep := $serviceConfig.dependencies }}
{{- if eq $dep "etcd" }}
etcd: "etcd:2379"
{{- else }}
{{- $depConfig := index $.Environment.Values.services $dep }}
{{ $dep }}: "{{ $dep }}:{{ $depConfig.port }}"
{{- end }}
{{- end }}
{{- end }}
{{- end }}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。