Skip to content

Commit

Permalink
add helm config option to mount ca certs to cost model container (#3760)
Browse files Browse the repository at this point in the history
* add helm config option to mount ca certs to cost model container

* update it to be configmap

* shift from config map tp secret

* nit fix
  • Loading branch information
mittal-ishaan authored Dec 4, 2024
1 parent 75c870f commit ff74071
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cost-analyzer/templates/cost-analyzer-deployment-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ spec:
defaultMode: 420
secretName: {{ .Values.kubecostModel.federatedStorageConfigSecret | default "federated-store" }}
{{- end }}
{{- if .Values.kubecostModel.caCertsSecret }}
- name: ca-certs-secret
secret:
defaultMode: 420
secretName: {{ .Values.kubecostModel.caCertsSecret}}
{{- end }}
{{- if .Values.kubecostProductConfigs }}
{{- if and ((.Values.kubecostProductConfigs).productKey).enabled ((.Values.kubecostProductConfigs).productKey).secretname }}
- name: productkey-secret
Expand Down Expand Up @@ -615,6 +621,10 @@ spec:
mountPath: /var/configs/etl/federated
readOnly: true
{{- end }}
{{- if .Values.kubecostModel.caCertsSecret }}
- name: ca-certs-secret
mountPath: /etc/pki/ca-trust/source/anchors
{{- end }}
{{- if .Values.kubecostAdmissionController }}
{{- if .Values.kubecostAdmissionController.enabled }}
{{- if .Values.kubecostAdmissionController.secretName }}
Expand Down
3 changes: 3 additions & 0 deletions cost-analyzer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,9 @@ kubecostModel:
# "client_x509_cert_url": ""
# }

# the name of the Secret containing custom CA certs to mount to cost model container
# caCertsSecret: ca-certs-secret

# Installs Kubecost/OpenCost plugins
plugins:
enabled: false
Expand Down

0 comments on commit ff74071

Please sign in to comment.