From 0b285e88adf0147da4ac2e2ad4691d9ab2f0b938 Mon Sep 17 00:00:00 2001 From: David Collom Date: Mon, 19 Aug 2024 15:36:42 +0100 Subject: [PATCH] Adding sample values for GKE --- chart/Chart.yaml | 85 +++++++++++++++++-------------------------- chart/values-gke.yaml | 78 +++++++++++++++++++++++++++++++++++++++ chart/values.yaml | 32 +--------------- 3 files changed, 112 insertions(+), 83 deletions(-) create mode 100644 chart/values-gke.yaml diff --git a/chart/Chart.yaml b/chart/Chart.yaml index abb2046..7682c66 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -20,55 +20,36 @@ version: v0.0.5 # It is recommended to use it with quotes. appVersion: "0.0.3" dependencies: - - name: vpatron - version: "~0.0.0" - condition: feature.vpatron - # repository: https://charts.jetstack.io - repository: file://../../finops-toolkit/vpatron/chart/ - - name: autospot - version: "~0.0.0" - condition: feature.autospot - # repository: https://charts.jetstack.io - repository: file://../../finops-toolkit/autospot/chart/ - - name: limit-ranger - version: "~0.0.0" - condition: feature.limit-ranger - # repository: https://charts.jetstack.io - repository: file://../../finops-toolkit/limit-ranger/chart/ - - name: office-hours - version: "~> 0.0.0" - condition: feature.office-hours - # repository: https://charts.jetstack.io - repository: file://../../finops-toolkit/office-hours/chart/ - # OpenCost - - name: prometheus-opencost-exporter - version: "*" - condition: feature.opencost-exporter - repository: https://prometheus-community.github.io/helm-charts - - name: opencost - version: "~> 1.41.0" - condition: feature.opencost - repository: https://opencost.github.io/opencost-helm-chart - # Kyverno - - name: kyverno - version: "3.2.6" - condition: feature.kyverno - repository: https://kyverno.github.io/kyverno/ - - name: finops-policies - version: "*" - condition: feature.finops-policies - # repository: https://charts.jetstack.io - repository: file://../../finops-toolkit/finops-policies/chart/ - - name: vpa - version: "4.5.0" - condition: feature.vpa - repository: https://charts.fairwinds.com/stable - - name: grafana - version: "8.4.4" - condition: feature.grafana - repository: https://grafana.github.io/helm-charts - - name: finops-dashboards - version: "*" - condition: feature.finops-dashboards - # repository: https://charts.jetstack.io - repository: file://../../finops-toolkit/finops-dashboards/chart/ + # OpenCost + - name: prometheus-opencost-exporter + version: "*" + condition: feature.opencost-exporter + repository: https://prometheus-community.github.io/helm-charts + - name: opencost + version: "~> 1.41.0" + condition: feature.opencost + repository: https://opencost.github.io/opencost-helm-chart + # Kyverno + - name: kyverno + version: "3.2.6" + condition: feature.kyverno + repository: https://kyverno.github.io/kyverno/ + - name: finops-policies + version: "*" + condition: feature.finops-policies + # repository: https://charts.jetstack.io + repository: file://../../finops-toolkit/finops-policies/chart/ + - name: vpa + version: "4.5.0" + condition: feature.vpa + repository: https://charts.fairwinds.com/stable + # Grafana + - name: grafana + version: "8.4.4" + condition: feature.grafana + repository: https://grafana.github.io/helm-charts + - name: finops-dashboards + version: "*" + condition: feature.finops-dashboards + # repository: https://charts.jetstack.io + repository: file://../../finops-toolkit/finops-dashboards/chart/ diff --git a/chart/values-gke.yaml b/chart/values-gke.yaml new file mode 100644 index 0000000..041e57f --- /dev/null +++ b/chart/values-gke.yaml @@ -0,0 +1,78 @@ +# Extension of values.yaml for GKE +gke: + podmonitoring: true + prometheusFrontend: + enabled: true + serviceAccount: + annotations: + iam.gke.io/gcp-service-account: SERVICEACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com + +kyverno: + features: + backgroundScan: + skipResourceFilters: false # Important so that background Scan's Exclude Namespaces, etc + config: + resourceFiltersIncludeNamespaces: + - kube-system + - gmp-public + - gke-managed-system + - gke-gmp-system + webhooks: + - namespaceSelector: + matchExpressions: + - key: kubernetes.io/metadata.name + operator: NotIn + values: + - kube-system + - gmp-public + - gke-managed-system + - gke-gmp-system + +grafana: + datasources: + datasources.yaml: + apiVersion: 1 + datasources: + - name: GMP-Prometheus + type: prometheus + url: http://frontend.prometheus-system.svc.cluster.local:9090/ + access: proxy + isDefault: true + +opencost: + cloudCost: + enabled: false + opencost: + cloudIntegrationSecret: cloud-costs + cloudCost: + enabled: true + prometheus: + internal: + serviceName: frontend + namespaceName: prometheus-system + port: 9090 + exporter: + cloudProviderApiKey: "kejbgjkdsbghjdsbgjhdsb" + +prometheus-opencost-exporter: + service: + enabled: false + opencost: + prometheus: + internal: + serviceName: frontend + namespaceName: prometheus-system + port: 9090 + exporter: + cloudProviderApiKey: "dksbngjsbvjdsbjvhnds" + # Persistent volume claim for storing the data. eg: csv file + persistence: + enabled: false + # -- Annotations for persistent volume + annotations: {} + # -- Access mode for persistent volume + accessMode: "" + # -- Storage class for persistent volume + storageClass: "standard-rwo" + # -- Size for persistent volume + size: "10g" diff --git a/chart/values.yaml b/chart/values.yaml index 9173152..4dcd28f 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -1,12 +1,4 @@ feature: - # -- Enable / Disable the AutoSpot controller - autospot: false - # -- Enable / Disable the office-hours controller - office-hours: true - # -- Enable / Disable the limit-ranger controller - limit-ranger: true - # -- Enable / Disable the vpatron controller - vpatron: true # -- Enable / Disable the installation of Kyverno kyverno: true # -- Enable / Disable the installation of Kyverno FinOps Policies @@ -37,33 +29,11 @@ vpa: "requests": { "cpu": "100m", "memory": "500Mi" }, } extraArgs: - prometheus-address: | - http://prometheus-system.prometheus-system.svc.cluster.local:80 + prometheus-address: http://frontend.prometheus-system.svc.cluster.local:9090 storage: prometheus admissionController: enabled: false -# Value Overrides -# @ignored -# vpatron: -# image: -# tag: main - -# # @ignored -# autospot: -# image: -# tag: main - -# # @ignored -# office-hours: -# image: -# tag: main - -# # @ignored -# limit-ranger: -# image: -# tag: main - # @ignore kyverno: reportsController: