Skip to content

Commit 0050469

Browse files
committed
helmfile
1 parent adc5b4e commit 0050469

File tree

9 files changed

+306
-5
lines changed

9 files changed

+306
-5
lines changed

installation/Helmfile_eks.yaml

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
repositories:
2+
- name: kyverno
3+
url: https://kyverno.github.io/kyverno/
4+
- name: prometheus-opencost-exporter
5+
url: https://prometheus-community.github.io/helm-charts
6+
- name: prometheus
7+
url: https://prometheus-community.github.io/helm-charts
8+
- name: grafana
9+
url: https://grafana.github.io/helm-charts
10+
- name: vpa
11+
url: https://charts.fairwinds.com/stable
12+
- name: cert-manager
13+
url: https://charts.jetstack.io
14+
- name: fairwinds-stable
15+
url: https://charts.fairwinds.com/stable
16+
17+
---
18+
helmDefaults:
19+
wait: true
20+
timeout: 1200
21+
---
22+
environments:
23+
default:
24+
values:
25+
- "./config/{{ requiredEnv "HOST_ENV" }}/enabled.yaml"
26+
---
27+
releases:
28+
- name: kyverno
29+
version: "3.2.6"
30+
chart: kyverno/kyverno
31+
condition: kyverno.enabled
32+
namespace: finops-stack
33+
values:
34+
- "./config/common/kyverno-values.yaml"
35+
- "./config/{{ requiredEnv "HOST_ENV" }}/kyverno-values.yaml"
36+
37+
- name: finops-policies
38+
version: "0.1.0"
39+
chart: "../charts/finops-policies"
40+
condition: finops-policies.enabled
41+
namespace: finops-stack
42+
disableValidationOnInstall: true
43+
needs:
44+
- kyverno
45+
46+
- name: cert-manager
47+
version: v1.15.3
48+
chart: cert-manager/cert-manager
49+
condition: cert-manager.enabled
50+
namespace: cert-manager
51+
values:
52+
- "./config/common/cert-manager-values.yaml"
53+
- "./config/{{ requiredEnv "HOST_ENV" }}/cert-manager-values.yaml"
54+
- global:
55+
leaderElection:
56+
namespace: cert-manager
57+
commonLabels:
58+
cost-center-label: "xyz"
59+
- serviceAccount:
60+
annotations:
61+
{{ requiredEnv "CERT_MANAGER_SA_ANNOTATION" }}
62+
63+
- name: cert-manager-config
64+
version: "0.1.0"
65+
chart: "../charts/cert-manager-config"
66+
condition: cert-manager.enabled
67+
namespace: finops-stack
68+
disableValidationOnInstall: true
69+
needs:
70+
- cert-manager/cert-manager
71+
values:
72+
- email: {{ requiredEnv "CERT_MANAGER_EMAIL" }}
73+
- gcpProjectID: {{ requiredEnv "GCP_PROJECT" }}
74+
- grafanaTLSCert:
75+
hostname: {{ requiredEnv "GRAFANA_FQDN" }}
76+
77+
- name: grafana
78+
version: "8.4.7"
79+
chart: grafana/grafana
80+
condition: grafana.enabled
81+
namespace: finops-stack
82+
values:
83+
- "./config/common/grafana-values.yaml"
84+
- "./config/{{ requiredEnv "HOST_ENV" }}/grafana-values.yaml"
85+
- adminUser: {{ requiredEnv "GRAFANA_ADMIN_USER" }}
86+
- adminPassword: {{ requiredEnv "GRAFANA_ADMIN_PW" }}
87+
- serviceAccount:
88+
annotations:
89+
{{ requiredEnv "GRAFANA_SA_ANNOTATION" }}
90+
91+
# If you don't require ingress via an FQDN remove this ingress section
92+
- ingress:
93+
enabled: {{ requiredEnv "GRAFANA_INGRESS" }}
94+
annotations:
95+
kubernetes.io/ingress.global-static-ip-name: {{ requiredEnv "GRAFANA_PUBLIC_IP_NAME" }}
96+
hosts:
97+
- {{ requiredEnv "GRAFANA_FQDN" }}
98+
# If you don't require https access to the Grafana dashboard remove this tls section
99+
tls:
100+
- secretName: {{ requiredEnv "GRAFANA_FQDN" }}-tls
101+
hosts:
102+
- {{ requiredEnv "GRAFANA_FQDN" }}
103+
needs:
104+
- cert-manager/cert-manager
105+
106+
- name: vpa
107+
version: "4.5.0"
108+
chart: "vpa/vpa"
109+
condition: vpa.enabled
110+
namespace: finops-stack
111+
values:
112+
- "./config/common/vpa-values.yaml"
113+
114+
- name: gmp-proxy
115+
version: "0.1.0"
116+
chart: "../charts/gmp-proxy"
117+
condition: gmp-proxy.enabled
118+
namespace: finops-stack
119+
needs:
120+
- grafana
121+
values:
122+
- "./config/common/gmp-proxy-values.yaml"
123+
- gmpProjectId: {{ requiredEnv "GCP_PROJECT" }}
124+
125+
- name: prometheus-opencost-exporter
126+
version: "0.1.1"
127+
chart: "prometheus-opencost-exporter/prometheus-opencost-exporter"
128+
condition: opencost-exporter.enabled
129+
namespace: finops-stack
130+
needs:
131+
- gmp-proxy
132+
values:
133+
- "./config/common/prometheus-opencost-exporter-values.yaml"
134+
- "./config/{{ requiredEnv "HOST_ENV" }}/prometheus-opencost-exporter-values.yaml"
135+
- opencost:
136+
exporter:
137+
cloudProviderApiKey: {{ requiredEnv "CSP_API_KEY" }}
138+
139+
- name: finops-stack-opencost-templates
140+
version: "0.1.0"
141+
chart: "../charts/opencost-config"
142+
condition: opencost-templates.enabled
143+
namespace: finops-stack
144+
disableValidationOnInstall: true
145+
values:
146+
- "./config/{{ requiredEnv "HOST_ENV" }}/opencost-templates-values.yaml"
147+
148+
- name: goldilocks
149+
version: "9.0.0"
150+
chart: fairwinds-stable/goldilocks
151+
condition: goldilocks.enabled
152+
namespace: finops-stack
153+
values:
154+
- "./config/common/goldilocks-values.yaml"
155+
156+

installation/Makefile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
.DEFAULT_GOAL := help
22

3-
CLUSTER_NAME := ambient
4-
PROJECT_ID := "$(shell gcloud config get-value project)"
5-
M_TYPE := n1-standard-2
6-
ZONE := europe-west2-a
7-
83
cluster: ## Setup cluster
94
kind create cluster
105

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# -- Enable / Disable the installation of Kyverno
2+
kyverno:
3+
enabled: true
4+
5+
# -- Enable / Disable the installation of Kyverno FinOps Policies
6+
finops-policies:
7+
enabled: true
8+
# -- Enable / Disable the installation of the VPA Controller
9+
vpa:
10+
enabled: true
11+
# -- Enable / Disable the installation of the Grafana
12+
grafana:
13+
enabled: true
14+
# -- Enable / Disable the installation of cert-manager
15+
cert-manager:
16+
enabled: false
17+
# -- Enable / Disable the installation of OpenCost
18+
opencost:
19+
enabled: false
20+
# -- Enable / Disable the installation of OpenCost Exporter
21+
opencost-exporter:
22+
enabled: true
23+
24+
opencost-templates:
25+
enabled: true
26+
27+
# -- Enable / Disable the installation of Fairwinds' Goldilocks
28+
goldilocks:
29+
enabled: true
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
datasources:
2+
datasources.yaml:
3+
apiVersion: 1
4+
datasources:
5+
- name: Prometheus
6+
type: prometheus
7+
uid: "PFB5ABA51A8A585D7"
8+
url: http://prometheus-server
9+
isDefault: true
10+
editable: true
11+
ingress:
12+
enabled: false
13+
annotations:
14+
kubernetes.io/ingress.global-static-ip-name: "ip-name"
15+
hosts:
16+
- grafana.example.com
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
features:
2+
backgroundScan:
3+
skipResourceFilters: false # Important so that background Scan's Exclude Namespaces, etc
4+
config:
5+
resourceFiltersIncludeNamespaces:
6+
- kube-system
7+
webhooks:
8+
- namespaceSelector:
9+
matchExpressions:
10+
- key: kubernetes.io/metadata.name
11+
operator: NotIn
12+
values:
13+
- kube-system
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
cloudCost:
2+
enabled: false
3+
opencost:
4+
cloudCost:
5+
enabled: false
6+
prometheus:
7+
external:
8+
enabled: true
9+
url: http://gmp-proxy
10+
internal:
11+
enabled: false
12+
exporter:
13+
cloudProviderApiKey: "dummy_key"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
service:
2+
enabled: true
3+
opencost:
4+
prometheus:
5+
external:
6+
enabled: false
7+
# url: http://prometheus-server
8+
internal:
9+
# -- Use in-cluster Prometheus
10+
enabled: true
11+
# -- Service name of in-cluster Prometheus
12+
serviceName: prometheus-server
13+
# -- Namespace of in-cluster Prometheus
14+
namespaceName: prometheus-system
15+
# -- Service port of in-cluster Prometheus
16+
port: 80
17+
exporter:
18+
cloudProviderApiKey: "dummy_key"
19+
# Persistent volume claim for storing the data. eg: csv file
20+
persistence:
21+
enabled: false
22+
# -- Annotations for persistent volume
23+
annotations: {}
24+
# -- Access mode for persistent volume
25+
accessMode: ""
26+
# -- Storage class for persistent volume
27+
storageClass: "standard-rwo"
28+
# -- Size for persistent volume
29+
size: "10g"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# -- Enable / Disable the installation of Kyverno
2+
kyverno:
3+
enabled: true
4+
5+
# -- Enable / Disable the installation of Kyverno FinOps Policies
6+
finops-policies:
7+
enabled: true
8+
# -- Enable / Disable the installation of the VPA Controller
9+
vpa:
10+
enabled: true
11+
# -- Enable / Disable the installation of the Grafana
12+
grafana:
13+
enabled: true
14+
# -- Enable / Disable the installation of cert-manager
15+
cert-manager:
16+
enabled: false
17+
# -- Enable / Disable the installation of OpenCost
18+
opencost:
19+
enabled: false
20+
# -- Enable / Disable the installation of OpenCost Exporter
21+
opencost-exporter:
22+
enabled: true
23+
24+
opencost-templates:
25+
enabled: true
26+
27+
# -- Enable / Disable the installation of GMP Proxy (required when using Google Managed Prometheus)
28+
gmp-proxy:
29+
enabled: true
30+
31+
# -- Enable / Disable the installation of Fairwinds' Goldilocks
32+
goldilocks:
33+
enabled: true
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
extraScrapeConfigs: |
2+
- job_name: opencost
3+
honor_labels: true
4+
scrape_interval: 1m
5+
scrape_timeout: 10s
6+
metrics_path: /metrics
7+
scheme: http
8+
dns_sd_configs:
9+
- names:
10+
- opencost.opencost
11+
type: 'A'
12+
port: 9003
13+
14+
alertmanager:
15+
enabled: false
16+
prometheus-pushgateway:
17+
enabled: false

0 commit comments

Comments
 (0)