rancher-partner-charts/charts/kubecost/cost-analyzer/2.3.1/templates/aggregator-cloud-cost-deplo...

167 lines
6.5 KiB
YAML
Raw Normal View History

{{- if eq (include "aggregator.deployMethod" .) "statefulset" }}
{{/*
A cloud integration secret is required for cloud cost to function as a dedicated pod.
2024-04-03 19:02:06 +00:00
UI based configuration is not supported for cloud cost with aggregator.
*/}}
2024-04-03 19:02:06 +00:00
{{- if ((.Values.kubecostAggregator).cloudCost).enabled }}
{{- if not ( or (.Values.kubecostProductConfigs).cloudIntegrationSecret (.Values.kubecostProductConfigs).cloudIntegrationJSON ((.Values.kubecostProductConfigs).athenaBucketName)) }}
{{- fail "\n\nA cloud-integration secret is required when using the aggregator statefulset and cloudCost is enabled." }}
{{- end }}
{{- end }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "cloudCost.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{ include "cloudCost.commonLabels" . | nindent 4 }}
{{- with .Values.global.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: 1
selector:
matchLabels:
{{ include "cloudCost.selectorLabels" . | nindent 6 }}
strategy:
type: Recreate
template:
metadata:
labels:
2024-04-03 19:02:06 +00:00
{{/*
Force pod restarts on upgrades to ensure the nginx config is current
*/}}
{{- if not .Values.global.platforms.cicd.enabled }}
2024-04-03 19:02:06 +00:00
helm-rollout-restarter: {{ randAlphaNum 5 | quote }}
{{- end }}
app.kubernetes.io/name: cloud-cost
app.kubernetes.io/instance: {{ .Release.Name }}
app: cloud-cost
{{- with .Values.global.additionalLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
Charts CI ``` Updated: argo/argo-cd: - 5.52.1 bitnami/airflow: - 16.1.11 bitnami/cassandra: - 10.6.9 bitnami/kafka: - 26.6.3 bitnami/mariadb: - 15.0.1 bitnami/mysql: - 9.16.1 bitnami/postgresql: - 13.2.29 bitnami/redis: - 18.6.3 bitnami/spark: - 8.1.8 bitnami/tomcat: - 10.11.11 bitnami/wordpress: - 19.0.5 bitnami/zookeeper: - 12.4.4 cert-manager/cert-manager: - v1.13.3 clastix/kamaji: - 0.14.0 cockroach-labs/cockroachdb: - 11.2.3 confluent/confluent-for-kubernetes: - 0.824.40 crowdstrike/falcon-sensor: - 1.24.1 datadog/datadog: - 3.50.5 datadog/datadog-operator: - 1.4.1 dell/csi-isilon: - 2.9.0 dell/csi-powermax: - 2.9.0 dell/csi-powerstore: - 2.9.0 dell/csi-unity: - 2.9.0 dell/csi-vxflexos: - 2.9.0 digitalis/vals-operator: - 0.7.8 dynatrace/dynatrace-operator: - 0.15.0 external-secrets/external-secrets: - 0.9.11 f5/nginx-ingress: - 1.1.0 fairwinds/polaris: - 5.17.0 gluu/gluu: - 5.0.24 haproxy/haproxy: - 1.35.5 harbor/harbor: - 1.14.0 hashicorp/consul: - 1.3.1 instana/instana-agent: - 1.2.66 intel/intel-device-plugins-operator: - 0.29.0 intel/intel-device-plugins-qat: - 0.29.0 intel/intel-device-plugins-sgx: - 0.29.0 jenkins/jenkins: - 4.11.2 jfrog/artifactory-ha: - 107.71.11 jfrog/artifactory-jcr: - 107.71.11 kong/kong: - 2.33.3 kubecost/cost-analyzer: - 1.108.1 kuma/kuma: - 2.5.1 linkerd/linkerd-control-plane: - 1.16.9 mongodb/community-operator: - 0.9.0 nats/nats: - 1.1.6 new-relic/nri-bundle: - 5.0.58 nutanix/nutanix-csi-snapshot: - 6.3.2 nutanix/nutanix-csi-storage: - 2.6.6 openebs/openebs: - 3.10.0 percona/psmdb-db: - 1.15.1 percona/pxc-db: - 1.13.4 redpanda/redpanda: - 5.7.7 speedscale/speedscale-operator: - 2.0.2 stackstate/stackstate-k8s-agent: - 1.0.66 sysdig/sysdig: - 1.16.24 traefik/traefik: - 26.0.0 trilio/k8s-triliovault-operator: - 4.0.0 weka/csi-wekafsplugin: - 2.3.2 yugabyte/yugabyte: - 2.18.5 yugabyte/yugaware: - 2.18.5 ```
2024-01-12 17:13:39 +00:00
{{- with .Values.global.podAnnotations}}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
2024-04-08 22:44:59 +00:00
{{- if .Values.global.platforms.openshift.enabled }}
securityContext:
{{- toYaml .Values.global.platforms.openshift.securityContext | nindent 8 }}
{{- else if .Values.global.securityContext }}
securityContext:
{{- toYaml .Values.global.securityContext | nindent 8 }}
{{- else }}
securityContext:
runAsUser: 1001
runAsGroup: 1001
fsGroup: 1001
{{- end }}
restartPolicy: Always
serviceAccountName: {{ template "cloudCost.serviceAccountName" . }}
volumes:
{{- if .Values.kubecostModel.etlBucketConfigSecret }}
- name: etl-bucket-config
secret:
defaultMode: 420
secretName: {{ .Values.kubecostModel.etlBucketConfigSecret }}
{{- end }}
{{- if .Values.kubecostModel.federatedStorageConfigSecret }}
- name: federated-storage-config
secret:
defaultMode: 420
secretName: {{ .Values.kubecostModel.federatedStorageConfigSecret }}
{{- end }}
2024-04-03 19:02:06 +00:00
{{- if (.Values.kubecostProductConfigs).cloudIntegrationSecret }}
- name: cloud-integration
secret:
secretName: {{ .Values.kubecostProductConfigs.cloudIntegrationSecret }}
items:
- key: cloud-integration.json
path: cloud-integration.json
2024-04-03 19:02:06 +00:00
{{- else if or (.Values.kubecostProductConfigs).cloudIntegrationJSON ((.Values.kubecostProductConfigs).athenaProjectID) }}
- name: cloud-integration
secret:
secretName: cloud-integration
items:
- key: cloud-integration.json
path: cloud-integration.json
{{- end }}
2024-04-03 19:02:06 +00:00
{{/* Despite the name, this is not persistent-configs.
The name is for compatibility with single-pod install.
All data stored here is ephemeral, and does not require persistence. */}}
- name: persistent-configs
emptyDir: {}
2024-04-03 19:02:06 +00:00
{{- if .Values.kubecostModel.plugins.enabled }}
{{- if .Values.kubecostModel.plugins.install.enabled}}
- name: install-script
configMap:
name: {{ template "cost-analyzer.fullname" . }}-install-plugins
{{- end }}
- name: plugins-dir
emptyDir: {}
{{- if and (not .Values.kubecostModel.plugins.existingCustomSecret.enabled) .Values.kubecostModel.plugins.secretName }}
2024-04-03 19:02:06 +00:00
- name: plugins-config
secret:
secretName: {{ .Values.kubecostModel.plugins.secretName }}
2024-04-03 19:02:06 +00:00
items:
- key: datadog_config.json
path: datadog_config.json
{{- end }}
{{- if .Values.kubecostModel.plugins.existingCustomSecret.enabled }}
- name: plugins-config
secret:
secretName: {{ .Values.kubecostModel.plugins.existingCustomSecret.name }}
items:
- key: datadog_config.json
path: datadog_config.json
{{- end }}
2024-04-03 19:02:06 +00:00
- name: tmp
emptyDir: {}
{{- end }}
2024-04-08 22:44:59 +00:00
{{- if .Values.kubecostAggregator.cloudCost.extraVolumes }}
{{- toYaml .Values.kubecostAggregator.cloudCost.extraVolumes | nindent 8 }}
{{- end }}
2024-04-03 19:02:06 +00:00
initContainers:
{{- if (and .Values.kubecostModel.plugins.enabled .Values.kubecostModel.plugins.install.enabled )}}
- name: plugin-installer
image: {{ .Values.kubecostModel.plugins.install.fullImageName }}
command: ["sh", "/install/install_plugins.sh"]
2024-04-08 22:44:59 +00:00
{{- with .Values.kubecostModel.plugins.install.securityContext }}
2024-04-03 19:02:06 +00:00
securityContext: {{- toYaml . | nindent 12 }}
2024-04-08 22:44:59 +00:00
{{- end }}
2024-04-03 19:02:06 +00:00
volumeMounts:
- name: install-script
mountPath: /install
- name: plugins-dir
mountPath: {{ .Values.kubecostModel.plugins.folder }}
{{- end }}
containers:
{{- include "aggregator.cloudCost.containerTemplate" . | nindent 8 }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 2 }}
{{- end }}
{{- if .Values.kubecostAggregator.priority }}
{{- if .Values.kubecostAggregator.priority.enabled }}
{{- if .Values.kubecostAggregator.priority.name }}
priorityClassName: {{ .Values.kubecostAggregator.priority.name }}
{{- else }}
priorityClassName: {{ template "cost-analyzer.fullname" . }}-aggregator-priority
{{- end }}
{{- end }}
{{- end }}
{{- with .Values.kubecostAggregator.cloudCost.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.kubecostAggregator.cloudCost.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.kubecostAggregator.cloudCost.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}