diff --git a/charts/pipelines-feedback-common/templates/defaultconfig.cm.yaml b/charts/pipelines-feedback-common/templates/defaultconfig.cm.yaml new file mode 100644 index 0000000..97f80fd --- /dev/null +++ b/charts/pipelines-feedback-common/templates/defaultconfig.cm.yaml @@ -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 }} diff --git a/charts/pipelines-feedback-common/templates/deployment.yaml b/charts/pipelines-feedback-common/templates/deployment.yaml index c5fe933..06325f8 100644 --- a/charts/pipelines-feedback-common/templates/deployment.yaml +++ b/charts/pipelines-feedback-common/templates/deployment.yaml @@ -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 }} @@ -108,3 +113,8 @@ spec: tolerations: {{- toYaml . | nindent 14 }} {{- end }} + volumes: + - name: config + configMap: + name: {{ include "app.fullname" . }}-default-config + diff --git a/charts/pipelines-feedback-common/values.yaml b/charts/pipelines-feedback-common/values.yaml index b3c5ee0..65110b9 100644 --- a/charts/pipelines-feedback-common/values.yaml +++ b/charts/pipelines-feedback-common/values.yaml @@ -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