diff --git a/examples/helm-chart/configmap.yaml b/examples/helm-chart/templates/configmap.yaml similarity index 64% rename from examples/helm-chart/configmap.yaml rename to examples/helm-chart/templates/configmap.yaml index 87cf43b672..372ad2c3d0 100644 --- a/examples/helm-chart/configmap.yaml +++ b/examples/helm-chart/templates/configmap.yaml @@ -1,7 +1,7 @@ apiVersion: v1 data: - # TODO: work out how to pass through the yaml - data-prepper-config.yaml: 'ssl: false' + data-prepper-config.yaml: | + {{- toYaml .Values.dataPrepperConfig | nindent 6 }} kind: ConfigMap metadata: name: {{ include "data-prepper.configName" . }} diff --git a/examples/helm-chart/templates/servicemonitor.yaml b/examples/helm-chart/templates/servicemonitor.yaml new file mode 100644 index 0000000000..3589539b4d --- /dev/null +++ b/examples/helm-chart/templates/servicemonitor.yaml @@ -0,0 +1,17 @@ +{{- if .Values.serviceMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ include "data-prepper.fullname" . }} + labels: + {{- include "data-prepper.labels" . | nindent 4 }} + {{- range $key, $value := .Values.serviceMonitor.extraLabels }} + {{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }} + {{- end }} +spec: + selector: + {{- include "data-prepper.selectorLabels" . | nindent 4 }} + endpoints: + {{- toYaml .Values.serviceMonitor.metricsEndpoints | nindent 2 }} +{{- end }} + diff --git a/examples/helm-chart/values.yaml b/examples/helm-chart/values.yaml index 082e11b1ab..f598a09df1 100644 --- a/examples/helm-chart/values.yaml +++ b/examples/helm-chart/values.yaml @@ -25,24 +25,29 @@ podAnnotations: {} podLabels: {} podSecurityContext: {} - # fsGroup: 2000 securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 + service: type: ClusterIP dataPrepperConfig: {} pipelineConfig: {} +serviceMonitor: + enabled: false + extraLabels: {} + metricsEndpoints: + - port: server + path: /metrics/sys + - port: server + path: /metrics/prometheus + ports: - name: http port: 2021 +- name: server + port: 4900 - name: otel-traces port: 21890 - name: otel-metrics @@ -54,17 +59,12 @@ ingress: enabled: false className: '' annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" hosts: - host: chart-example.local paths: - path: / pathType: ImplementationSpecific tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local resources: {} # We usually recommend not to specify default resources and to leave this as a conscious