Skip to content

Commit

Permalink
fix: format alertmanager cert properly (#120)
Browse files Browse the repository at this point in the history
* fix: format alertmanager cert properly

Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>

* chore: update VR CRD

Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>

---------

Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
  • Loading branch information
TylerGillson committed Nov 17, 2023
1 parent 137df6b commit f38635f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ spec:
description: ValidationResultSpec defines the desired state of ValidationResult
properties:
expectedResults:
description: The number of rules in the validator plugin spec, hence
the number of expected ValidationResults.
minimum: 1
type: integer
plugin:
type: string
Expand Down
5 changes: 3 additions & 2 deletions chart/validator/templates/sink-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ metadata:
stringData:
{{- if eq .Values.sink.type "alertmanager" }}
endpoint: {{ required ".Values.sink.endpoint is required!" .Values.sink.endpoint }}
insecureSkipVerify: {{ .Values.sink.insecureSkipVerify }}
caCert: {{ .Values.sink.caCert }}
username: {{ .Values.sink.username }}
password: {{ .Values.sink.password }}
insecureSkipVerify: {{ .Values.sink.insecureSkipVerify | quote }}
caCert: |
{{ .Values.sink.caCert | indent 4 }}
{{- else if eq .Values.sink.type "slack" }}
apiToken: {{ required ".Values.sink.apiToken is required!" .Values.sink.apiToken }}
channelId: {{ required ".Values.sink.channelId is required!" .Values.sink.channelId }}
Expand Down
2 changes: 1 addition & 1 deletion chart/validator/templates/validator-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: validator-config
spec:
plugins:
{{ toYaml .Values.plugins | indent 2 }}
{{ toYaml .Values.plugins | indent 2 }}
{{- if .Values.sink }}
sink:
type: {{ required ".Values.sink.type is required!" .Values.sink.type }}
Expand Down
2 changes: 1 addition & 1 deletion chart/validator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ metricsService:
sink: {}
# type: alertmanager
# secretName: alertmanager-sink-secret
# endpoint: "http://alertmanager.alertmanager.svc.cluster.local:9093"
# endpoint: "https://alertmanager.alertmanager.svc.cluster.local:9093"
# insecureSkipVerify: "false"
# caCert: "" # (TLS CA certificate, optional)
# username: "" # (HTTP basic auth, optional)
Expand Down

0 comments on commit f38635f

Please sign in to comment.