Skip to content

Commit

Permalink
Merge pull request #50 from pokt-foundation/optional-sa-healthprobes
Browse files Browse the repository at this point in the history
Make sa and healthprobes optional
  • Loading branch information
ManInWeb3 authored Sep 20, 2022
2 parents f450e4d + 8673e30 commit 6426d45
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/blockchain-node/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: A Helm chart to deploy a blockchain node

type: application

version: 0.0.11
version: 0.0.12

appVersion: "1.16.0"

Expand Down
2 changes: 2 additions & 0 deletions charts/blockchain-node/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.global.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
Expand All @@ -8,3 +9,4 @@ metadata:
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
4 changes: 2 additions & 2 deletions charts/blockchain-node/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- range $kstfs, $sts := .Values.statefulset }}
{{- range $kcntnr, $cntnr := $sts.containers }}

{{- if $cntnr.healthProbes.portToMonitor }}
{{- if $cntnr.healthProbes }}{{- if $cntnr.healthProbes.portToMonitor }}
---
apiVersion: v1
kind: Service
Expand Down Expand Up @@ -31,7 +31,7 @@ spec:
matchLabels:
{{- include "blockchain-node.labels" $ | nindent 6 }}

{{- end }}
{{- end }}{{- end }}

{{- end -}}
{{- end -}}
6 changes: 4 additions & 2 deletions charts/blockchain-node/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
# Add prometheus annotations
{{- $podAnnotations := (default (dict ) $sts.podAnnotations) }}
{{- range $kcntnr, $cntnr := $sts.containers }}
{{- if and $cntnr.healthProbes.env $cntnr.healthProbes.portToMonitor }}
{{- if $cntnr.healthProbes }}{{if and $cntnr.healthProbes.env $cntnr.healthProbes.portToMonitor }}
{{- $podAnnotations = merge $podAnnotations (dict "prometheus.io/scrape" "true" "prometheus.io/port" ($cntnr.healthProbes.portToMonitor|quote)) }}
{{- end }}
{{- end }}{{- end }}
{{- end }}
---
apiVersion: apps/v1
Expand Down Expand Up @@ -113,6 +113,7 @@ spec:

containers:
{{- range $kcntnr, $cntnr := $sts.containers }}
{{- if $cntnr.healthProbes }}
{{- if and $cntnr.healthProbes.env $cntnr.healthProbes.portToMonitor }}
- name: chain-healthcheck-sidecar
image: {{ $.Values.global.chainHealthcheckSidecar.repository -}}:{{- $.Values.global.chainHealthcheckSidecar.tag }}
Expand Down Expand Up @@ -143,6 +144,7 @@ spec:
cpu: 100m
memory: 256Mi
{{- end }}
{{- end }}

- name: {{ $cntnr.name }}
image: "{{ $cntnr.image.repository }}:{{ $cntnr.image.tag }}"
Expand Down
1 change: 1 addition & 0 deletions charts/blockchain-node/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ global:
repository: eepokt/chain-healthcheck-sidecar
tag: master
serviceAccount:
create: true
name: change-me
# annotations: []
securityContext:
Expand Down

0 comments on commit 6426d45

Please sign in to comment.