Skip to content

Commit

Permalink
fix/feat: Allow to use JSON configuration in Helm Chart to mitigate #46
Browse files Browse the repository at this point in the history
… issue in a simplest way at this moment
  • Loading branch information
keskad committed May 22, 2024
1 parent 6ceb4f9 commit dbeb87e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "app.fullname" . }}-default-config
labels:
{{- include "app.labels" . | nindent 6 }}
data:
pipelines-feedback.json: |
{{ toJson $.Values.controller.defaultConfig }}
10 changes: 10 additions & 0 deletions charts/pipelines-feedback-common/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.controller.deployment.resources | nindent 20 }}

volumeMounts:
- name: config
mountPath: /etc/pipelines-feedback/pipelines-feedback.json
subPath: pipelines-feedback.json
{{- with .Values.controller.deployment.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 14 }}
Expand All @@ -108,3 +113,8 @@ spec:
tolerations:
{{- toYaml . | nindent 14 }}
{{- end }}
volumes:
- name: config
configMap:
name: {{ include "app.fullname" . }}-default-config

10 changes: 10 additions & 0 deletions charts/pipelines-feedback-common/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ controller:
name: ""
env:
REDIS_HOST: "redis:6379"
CONFIG_PATH: "/etc/pipelines-feedback/pipelines-feedback.json"

# -- Default config lets you append globally same configuration you have in PFConfigs. PFConfigs takes precedence. In order to change default config controller needs to be restarted
defaultConfig:
logs-enabled: "true"
# jxscm.git-kind: "gitlab"
# jxscm.git-server: "http://some-git-host"
# jxscm.token: "glpat-xxx"
# jxscm.git-user: "__token__"
# dashboard-url: "https://console-openshift-console.apps.my-host.org/k8s/ns/{{ .namespace }}/tekton.dev~v1beta1~PipelineRun/{{ .name }}"

# --------
# Security
Expand Down

0 comments on commit dbeb87e

Please sign in to comment.