Skip to content

Commit 840a05d

Browse files
author
harshit-splunk
committed
fixed invalid certificate format
1 parent adf9ad7 commit 840a05d

File tree

7 files changed

+96
-18
lines changed

7 files changed

+96
-18
lines changed

helm-chart/splunk-connect-for-kubernetes/charts/splunk-kubernetes-logging/templates/secret.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,20 @@ metadata:
99
release: {{ .Release.Name }}
1010
heritage: {{ .Release.Service }}
1111
type: Opaque
12-
data:
12+
stringData:
1313
{{- with or .Values.splunk.hec.token .Values.global.splunk.hec.token }}
14-
splunk_hec_token: {{ . | b64enc }}
14+
splunk_hec_token: {{ . }}
1515
{{- end }}
1616
{{- with or .Values.splunk.hec.clientCert .Values.global.splunk.hec.clientCert }}
17-
hec_client_cert: {{ . | b64enc }}
17+
hec_client_cert: |-
18+
{{ toYaml . | trimPrefix "|-" | trimPrefix "|" | trim | indent 2 }}
1819
{{- end }}
1920
{{- with or .Values.splunk.hec.clientKey .Values.global.splunk.hec.clientKey }}
20-
hec_client_key: {{ . | b64enc }}
21+
hec_client_key: |-
22+
{{ toYaml . | trimPrefix "|-" | trimPrefix "|" | trim | indent 2 }}
2123
{{- end }}
2224
{{- with or .Values.splunk.hec.caFile .Values.global.splunk.hec.caFile }}
23-
hec_ca_file: {{ . | b64enc }}
25+
hec_ca_file: |-
26+
{{ toYaml . | trimPrefix "|-" | trimPrefix "|" | trim | indent 2 }}
2427
{{- end }}
2528
{{- end -}}

helm-chart/splunk-connect-for-kubernetes/charts/splunk-kubernetes-logging/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ splunk:
7777
# The PEM-format CA certificate for this client.
7878
# NOTE: The content of the certificate itself should be used here, not the file path.
7979
# The certificate will be stored as a secret in kubernetes.
80+
# Make sure you are providing the certificate as multiline string (use `|-`)
81+
# Example:
82+
# caFile: |-
83+
# -----BEGIN CERTIFICATE-----
84+
# ...
85+
# -----END CERTIFICATE-----
8086
clientCert:
8187
# The private key for this client.
8288
# NOTE: The content of the key itself should be used here, not the file path.

helm-chart/splunk-connect-for-kubernetes/charts/splunk-kubernetes-metrics/templates/secret.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,20 @@ metadata:
99
release: {{ .Release.Name }}
1010
heritage: {{ .Release.Service }}
1111
type: Opaque
12-
data:
12+
stringData:
1313
{{- with or .Values.splunk.hec.token .Values.global.splunk.hec.token }}
14-
splunk_hec_token: {{ . | b64enc }}
14+
splunk_hec_token: {{ . }}
1515
{{- end }}
1616
{{- with or .Values.splunk.hec.clientCert .Values.global.splunk.hec.clientCert }}
17-
hec_client_cert: {{ . | b64enc }}
17+
hec_client_cert: |-
18+
{{ toYaml . | trimPrefix "|-" | trimPrefix "|" | trim | indent 2 }}
1819
{{- end }}
1920
{{- with or .Values.splunk.hec.clientKey .Values.global.splunk.hec.clientKey }}
20-
hec_client_key: {{ . | b64enc }}
21+
hec_client_key: |-
22+
{{ toYaml . | trimPrefix "|-" | trimPrefix "|" | trim | indent 2 }}
2123
{{- end }}
2224
{{- with or .Values.splunk.hec.caFile .Values.global.splunk.hec.caFile }}
23-
hec_ca_file: {{ . | b64enc }}
25+
hec_ca_file: |-
26+
{{ toYaml . | trimPrefix "|-" | trimPrefix "|" | trim | indent 2 }}
2427
{{- end }}
2528
{{- end -}}

helm-chart/splunk-connect-for-kubernetes/charts/splunk-kubernetes-metrics/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ splunk:
6262
# The PEM-format CA certificate for this client.
6363
# NOTE: The content of the certificate itself should be used here, not the file path.
6464
# The certificate will be stored as a secret in kubernetes.
65+
# Make sure you are providing the certificate as multiline string (use `|-`)
66+
# Example:
67+
# caFile: |-
68+
# -----BEGIN CERTIFICATE-----
69+
# ...
70+
# -----END CERTIFICATE-----
6571
clientCert:
6672
# The private key for this client.
6773
# NOTE: The content of the key itself should be used here, not the file path.
@@ -202,6 +208,12 @@ kubernetes:
202208
# if insecureSSL is set to true, insecure HTTPS API call is allowed, default false
203209
insecureSSL: false
204210
# Path to the CA file.
211+
# Make sure you are providing the certificate as multiline string (use `|-`)
212+
# Example:
213+
# caFile: |-
214+
# -----BEGIN CERTIFICATE-----
215+
# ...
216+
# -----END CERTIFICATE-----
205217
caFile:
206218
# Path to the file contains the API token. By default it reads from the file "token" in the `secret_dir`.
207219
bearerTokenFile:

helm-chart/splunk-connect-for-kubernetes/charts/splunk-kubernetes-objects/templates/secret.yaml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,32 @@ metadata:
99
release: {{ .Release.Name }}
1010
heritage: {{ .Release.Service }}
1111
type: Opaque
12-
data:
12+
stringData:
1313
{{- with or .Values.splunk.hec.token .Values.global.splunk.hec.token }}
14-
splunk_hec_token: {{ . | b64enc }}
14+
splunk_hec_token: {{ . }}
1515
{{- end }}
1616
{{- with or .Values.splunk.hec.clientCert .Values.global.splunk.hec.clientCert }}
17-
hec_client_cert: {{ . | b64enc }}
17+
hec_client_cert: |-
18+
{{ toYaml . | trimPrefix "|-" | trimPrefix "|" | trim | indent 2 }}
1819
{{- end }}
1920
{{- with or .Values.splunk.hec.clientKey .Values.global.splunk.hec.clientKey }}
20-
hec_client_key: {{ . | b64enc }}
21+
hec_client_key: |-
22+
{{ toYaml . | trimPrefix "|-" | trimPrefix "|" | trim | indent 2 }}
2123
{{- end }}
2224
{{- with or .Values.splunk.hec.caFile .Values.global.splunk.hec.caFile }}
23-
hec_ca_file: {{ . | b64enc }}
25+
hec_ca_file: |-
26+
{{ toYaml . | trimPrefix "|-" | trimPrefix "|" | trim | indent 2 }}
2427
{{- end }}
2528
{{- with .Values.kubernetes.clientCert }}
26-
k8s_client_cert: {{ . | b64enc }}
29+
k8s_client_cert: |-
30+
{{ toYaml . | trimPrefix "|-" | trimPrefix "|" | trim | indent 2 }}
2731
{{- end }}
2832
{{- with .Values.kubernetes.clientKey }}
29-
k8s_client_key: {{ . | b64enc }}
33+
k8s_client_key: |-
34+
{{ toYaml . | trimPrefix "|-" | trimPrefix "|" | trim | indent 2 }}
3035
{{- end }}
3136
{{- with .Values.kubernetes.caFile }}
32-
k8s_ca_file: {{ . | b64enc }}
37+
k8s_ca_file: |-
38+
{{ toYaml . | trimPrefix "|-" | trimPrefix "|" | trim | indent 2 }}
3339
{{- end }}
3440
{{- end -}}

helm-chart/splunk-connect-for-kubernetes/charts/splunk-kubernetes-objects/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ kubernetes:
5353
# if insecureSSL is set to true, insecure HTTPS API call is allowed, default false
5454
insecureSSL: false
5555
# Path to the certificate file for this client.
56+
# Make sure you are providing the certificate as multiline string (use `|-`)
57+
# Example:
58+
# caFile: |-
59+
# -----BEGIN CERTIFICATE-----
60+
# ...
61+
# -----END CERTIFICATE-----
5662
clientCert:
5763
# Path to the private key file for this client.
5864
clientKey:
@@ -157,6 +163,12 @@ splunk:
157163
# insecureSSL is a boolean, it indicates should it allow insecure SSL connection (when protocol is "https"). Default value: false.
158164
insecureSSL:
159165
# The *content* of a PEM-format CA certificate for this client.
166+
# Make sure you are providing the certificate as multiline string (use `|-`)
167+
# Example:
168+
# caFile: |-
169+
# -----BEGIN CERTIFICATE-----
170+
# ...
171+
# -----END CERTIFICATE-----
160172
clientCert:
161173
# The *content* of the private key for this client.
162174
clientKey:

helm-chart/splunk-connect-for-kubernetes/values.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ global:
2929
# The PEM-format CA certificate for this client.
3030
# NOTE: The content of the certificate itself should be used here, not the file path.
3131
# The certificate will be stored as a secret in kubernetes.
32+
# Make sure you are providing the certificate as multiline string (use `|-`)
33+
# Example:
34+
# caFile: |-
35+
# -----BEGIN CERTIFICATE-----
36+
# ...
37+
# -----END CERTIFICATE-----
3238
clientCert:
3339
# The private key for this client.
3440
# NOTE: The content of the key itself should be used here, not the file path.
@@ -175,6 +181,12 @@ splunk-kubernetes-logging:
175181
# The PEM-format CA certificate for this client.
176182
# NOTE: The content of the certificate itself should be used here, not the file path.
177183
# The certificate will be stored as a secret in kubernetes.
184+
# Make sure you are providing the certificate as multiline string (use `|-`)
185+
# Example:
186+
# caFile: |-
187+
# -----BEGIN CERTIFICATE-----
188+
# ...
189+
# -----END CERTIFICATE-----
178190
clientCert:
179191
# The private key for this client.
180192
# NOTE: The content of the key itself should be used here, not the file path.
@@ -570,6 +582,12 @@ splunk-kubernetes-objects:
570582
# if insecureSSL is set to true, insecure HTTPS API call is allowed, default false
571583
insecureSSL: false
572584
# Path to the certificate file for this client.
585+
# Make sure you are providing the certificate as multiline string (use `|-`)
586+
# Example:
587+
# caFile: |-
588+
# -----BEGIN CERTIFICATE-----
589+
# ...
590+
# -----END CERTIFICATE-----
573591
clientCert:
574592
# Path to the private key file for this client.
575593
clientKey:
@@ -676,6 +694,12 @@ splunk-kubernetes-objects:
676694
# For a self signed certificate this value should be true
677695
insecureSSL:
678696
# The *content* of a PEM-format CA certificate for this client.
697+
# Make sure you are providing the certificate as multiline string (use `|-`)
698+
# Example:
699+
# caFile: |-
700+
# -----BEGIN CERTIFICATE-----
701+
# ...
702+
# -----END CERTIFICATE-----
679703
clientCert:
680704
# The *content* of the private key for this client.
681705
clientKey:
@@ -882,6 +906,12 @@ splunk-kubernetes-metrics:
882906
# The PEM-format CA certificate for this client.
883907
# NOTE: The content of the certificate itself should be used here, not the file path.
884908
# The certificate will be stored as a secret in kubernetes.
909+
# Make sure you are providing the certificate as multiline string (use `|-`)
910+
# Example:
911+
# caFile: |-
912+
# -----BEGIN CERTIFICATE-----
913+
# ...
914+
# -----END CERTIFICATE-----
885915
clientCert:
886916
# The private key for this client.
887917
# NOTE: The content of the key itself should be used here, not the file path.
@@ -1023,6 +1053,12 @@ splunk-kubernetes-metrics:
10231053
# if insecureSSL is set to true, insecure HTTPS API call is allowed, default false
10241054
insecureSSL: false
10251055
# Path to the CA file.
1056+
# Make sure you are providing the certificate as multiline string (use `|-`)
1057+
# Example:
1058+
# caFile: |-
1059+
# -----BEGIN CERTIFICATE-----
1060+
# ...
1061+
# -----END CERTIFICATE-----
10261062
caFile:
10271063
# Path to the file contains the API token. By default it reads from the file "token" in the `secret_dir`.
10281064
bearerTokenFile:

0 commit comments

Comments
 (0)