Skip to content

Commit

Permalink
Allow disabling the kubecost frontend (kubecost#2528)
Browse files Browse the repository at this point in the history
  • Loading branch information
abaguas authored Aug 30, 2023
1 parent 8a733da commit 85c9e59
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
12 changes: 8 additions & 4 deletions cost-analyzer/templates/cost-analyzer-deployment-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,25 +76,27 @@ spec:
restartPolicy: Always
serviceAccountName: {{ template "cost-analyzer.serviceAccountName" . }}
volumes:
{{- if .Values.global.gcpstore.enabled }}
{{- if .Values.global.gcpstore.enabled }}
- name: ubbagent-config
configMap:
name: ubbagent-config
{{- end }}
{{- if .Values.hosted }}
{{- end }}
{{- if .Values.hosted }}
- name: config-store
secret:
defaultMode: 420
secretName: kubecost-thanos
{{- end }}
{{- end }}
- name: tmp
emptyDir: {}
{{- if .Values.kubecostFrontend.enabled }}
- name: nginx-conf
configMap:
name: nginx-conf
items:
- key: nginx.conf
path: default.conf
{{- end }}
{{- if .Values.global.containerSecuritycontext }}
- name: var-run
emptyDir: { }
Expand Down Expand Up @@ -1047,6 +1049,7 @@ spec:
configMapKeyRef:
name: {{ template "cost-analyzer.fullname" . }}
key: kubecost-token
{{- if .Values.kubecostFrontend.enabled }}
{{- if .Values.kubecostFrontend }}
{{- if .Values.kubecostFrontend.fullImageName }}
- image: {{ .Values.kubecostFrontend.fullImageName }}
Expand Down Expand Up @@ -1123,6 +1126,7 @@ spec:
securityContext:
{{- toYaml .Values.global.containerSecuritycontext | nindent 12 }}
{{- end }}
{{ end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 2 }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.kubecostFrontend.enabled }}
{{- if and (not .Values.agent) (not .Values.cloudAgent) }}
{{- $serviceName := include "cost-analyzer.serviceName" . -}}
{{- $nginxPort := .Values.service.targetPort | default 9090 -}}
Expand Down Expand Up @@ -333,3 +334,4 @@ data:
{{ end }}
}
{{- end }}
{{- end }}
3 changes: 1 addition & 2 deletions cost-analyzer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ systemProxy:
# - name: "image-pull-secret"

kubecostFrontend:
enabled: true
image: "gcr.io/kubecost1/frontend"
imagePullPolicy: Always
# extraEnv:
Expand Down Expand Up @@ -1179,5 +1180,3 @@ extraObjects: []
# host: kubecost.kubecost.svc.cluster.local
# port:
# number: 80


0 comments on commit 85c9e59

Please sign in to comment.