refactor: switch config format from YAML to TOML
- Replace gopkg.in/yaml.v3 with github.com/BurntSushi/toml - Update struct tags from yaml to toml - Update config tests to use TOML syntax - Add testdata/config.toml, update Helm configmap template
This commit is contained in:
@@ -3,22 +3,26 @@ kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-config
|
||||
data:
|
||||
config.yaml: |
|
||||
server:
|
||||
addr: ":8080"
|
||||
git:
|
||||
type: gitea
|
||||
base_url: "{{ .Values.git.baseUrl }}"
|
||||
token: "${GIT_TOKEN}"
|
||||
cluster:
|
||||
kubeconfig: /etc/proto-gen/kubeconfig
|
||||
namespace: {{ .Values.cluster.namespace }}
|
||||
job_timeout: {{ .Values.cluster.jobTimeout }}
|
||||
max_concurrent: {{ .Values.cluster.maxConcurrent }}
|
||||
toolchain_registry: "{{ .Values.toolchainRegistry }}"
|
||||
target_repo_template: "{{ .Values.targetRepoTemplate }}"
|
||||
plugins:
|
||||
{{- range .Values.plugins }}
|
||||
- language: {{ .language }}
|
||||
image: "{{ .image }}"
|
||||
{{- end }}
|
||||
config.toml: |
|
||||
[server]
|
||||
addr = ":8080"
|
||||
|
||||
[git]
|
||||
type = "gitea"
|
||||
base_url = "{{ .Values.git.baseUrl }}"
|
||||
token = "${GIT_TOKEN}"
|
||||
|
||||
[cluster]
|
||||
kubeconfig = "/etc/proto-gen/kubeconfig"
|
||||
namespace = "{{ .Values.cluster.namespace }}"
|
||||
job_timeout = {{ .Values.cluster.jobTimeout }}
|
||||
max_concurrent = {{ .Values.cluster.maxConcurrent }}
|
||||
|
||||
toolchain_registry = "{{ .Values.toolchainRegistry }}"
|
||||
target_repo_template = "{{ .Values.targetRepoTemplate }}"
|
||||
|
||||
{{- range .Values.plugins }}
|
||||
[[plugins]]
|
||||
language = "{{ .language }}"
|
||||
image = "{{ .image }}"
|
||||
{{- end }}
|
||||
|
||||
Reference in New Issue
Block a user