Skip to content

Commit

Permalink
feat: add default values
Browse files Browse the repository at this point in the history
  • Loading branch information
gabor-boros committed Nov 27, 2023
1 parent 969c457 commit 7b6b4e7
Show file tree
Hide file tree
Showing 5 changed files with 126 additions and 20 deletions.
7 changes: 6 additions & 1 deletion charts/harmony-chart/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ that the load balancer is working. First, get its external IP using

kubectl get svc -n {{ .Release.Namespace }} harmony-ingress-nginx-controller

Next, go to http://the.external.ip.shown/cluster-echo-test and make sure you get
Next, go to http://{{ .Values.clusterDomain }}/cluster-echo-test and make sure you get
a JSON response.

{{ if and .Values.prometheusstack.grafana.enabled .Values.prometheusstack.grafana.ingress.enabled }}
Grafana shipped with the default admin user password as a bug prevents
changing it. Since is enabled on the cluster and exposed to the internet.
Please make sure you update the default admin user password!
{{- end }}



Expand Down
3 changes: 2 additions & 1 deletion charts/harmony-chart/templates/echo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ metadata:
spec:
ingressClassName: {{ (index .Values "ingress-nginx" "controller" "ingressClass") }}
rules:
- http:
- host: {{ .Values.clusterDomain }}
http:
paths:
- path: /cluster-echo-test
pathType: Prefix
Expand Down
105 changes: 87 additions & 18 deletions charts/harmony-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

clusterDomain: "*"

ingress-nginx:
# Use ingress-nginx as a default controller.
enabled: true
Expand All @@ -14,6 +16,23 @@ cert-manager:
# certificates.
email: ""

# Configuration for the metrics server chart
metricsserver:
# Control the chart inclusion
enabled: false
# See https://github.com/kubernetes-sigs/metrics-server/blob/master/charts/metrics-server/values.yaml
# for all available options
replicas: 1

# Configuration for the Vertical Pod Autoscaler chart
vpa:
# Control the chart inclusion
enabled: false
# See https://github.com/cowboysysop/charts/blob/master/charts/vertical-pod-autoscaler/values.yaml
# for all available options
admissionController:
replicaCount: 1

# Multi-tenant ElasticSearch
elasticsearch:
enabled: false
Expand Down Expand Up @@ -66,23 +85,6 @@ elasticsearch:
xpack.security.transport.ssl.certificate_authorities: /usr/share/elasticsearch/config/certs/ca.crt
xpack.security.transport.ssl.verification_mode: certificate
# Configuration for the metrics server chart
metricsserver:
# Control the chart inclusion
enabled: false
# See https://github.com/kubernetes-sigs/metrics-server/blob/master/charts/metrics-server/values.yaml
# for all available options
replicas: 1
# Configuration for the Vertical Pod Autoscaler chart
vpa:
# Control the chart inclusion
enabled: false
# See https://github.com/cowboysysop/charts/blob/master/charts/vertical-pod-autoscaler/values.yaml
# for all available options
admissionController:
replicaCount: 1


# Multi-tenant OpenSearch
opensearch:
enabled: false
Expand All @@ -100,7 +102,6 @@ opensearch:
# K8S_HARMONY_USE_SHARED_OPENSEARCH: true
# HARMONY_SEARCH_HTTP_AUTH: "username:actual_password"


# # This secret will contain the ssl certificates.
secretMounts:
- name: opensearch-certificates
Expand Down Expand Up @@ -183,3 +184,71 @@ opensearch:
".opendistro-notebooks",
".opendistro-asynchronous-search-response*",
]
# Prometheus stack
prometheusstack:
enabled: false

kubeStateMetrics:
enabled: true

nodeExporter:
enabled: true

prometheus:
enabled: true

prometheusSpec:
resources:
requests:
cpu: "200m"
memory: "450Mi"

alertmanager:
enabled: true

alertmanagerSpec:
resources:
requests:
cpu: "100m"
memory: "50Mi"

# Admin password is not pre-generated, because it is not picked up by the
# grafana pod yet -- this is a bug on their end. For more information, visit:
# https://github.com/prometheus-community/helm-charts/issues/3679
grafana:
enabled: false

ingress:
enabled: false

dashboardProviders:
dashboardproviders.yaml:
apiVersion: 1
providers:
- name: 'default'
orgId: 1
folder: ''
type: file
disableDeletion: false
editable: true
options:
path: /var/lib/grafana/dashboards/default

dashboards:
default:
kubernetes-views-global:
# url: https://grafana.com/api/dashboards/15757/revisions/31/download
gnetId: 15757
revision: 31
datasource: Prometheus

grafana.ini:
dashboards:
default_home_dashboard_path: /var/lib/grafana/dashboards/default/kubernetes-views-global.json


resources:
requests:
cpu: 200m
memory: 256Mi
26 changes: 26 additions & 0 deletions values-example.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
clusterDomain: "example.com"

ingress-nginx:
controller:
config:
proxy-body-size: 100m

cert-manager:
# Set your email address here so auto-generated HTTPS certs will work:
email: "[email protected]"
Expand All @@ -11,8 +14,31 @@ elasticsearch:

metricsserver:
enabled: false

vpa:
enabled: false

opensearch:
enabled: false

prometheusstack:
enabled: false

grafana:
enabled: false

ingress:
enabled: true
ingressClassName: nginx
annotations:
cert-manager.io/cluster-issuer: "harmony-letsencrypt-global"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
hosts:
- grafana.example.com
tls:
- secretName: promstack-ingress-tls
hosts:
- grafana.example.com

# alertmanager:
# config: {} # Set it using `--set-file prometheusstack.alertmanager.config=<path-to-file>`
5 changes: 5 additions & 0 deletions values-minikube.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
cert-manager:
enabled: false

clusterDomain: "example.local"

elasticsearch:
enabled: false

Expand All @@ -22,3 +24,6 @@ opensearch:

persistence:
size: 8Gi

prometheusstack:
enabled: false

0 comments on commit 7b6b4e7

Please sign in to comment.