diff --git a/charts/fullstack-deployment/config-files/otel-collector-config.yaml b/charts/fullstack-deployment/config-files/otel-collector-config.yaml index b540aa169..47794d453 100644 --- a/charts/fullstack-deployment/config-files/otel-collector-config.yaml +++ b/charts/fullstack-deployment/config-files/otel-collector-config.yaml @@ -22,7 +22,7 @@ exporters: const_labels: source: p-{{ default "otel-collector" .otelDefaults.nameOverride }} # PromQL: {source="p-otel-collector"} - {{- if eq .otelDefaults.exporters.prometheusRemoteWrite.enabled "true" }} + {{- if .otelDefaults.exporters.prometheusRemoteWrite.enabled }} prometheusremotewrite: endpoint: "{{ .otelDefaults.exporters.prometheusRemoteWrite.endpoint }}" tls: @@ -55,6 +55,6 @@ service: processors: [batch] exporters: - prometheus - {{- if eq .otelDefaults.exporters.prometheusRemoteWrite.enabled "true" }} + {{- if .otelDefaults.exporters.prometheusRemoteWrite.enabled }} - prometheusremotewrite {{- end }} diff --git a/charts/fullstack-deployment/templates/cert-manager/certificate-requests.yaml b/charts/fullstack-deployment/templates/cert-manager/certificate-requests.yaml index 88fb490d4..3291c8abb 100644 --- a/charts/fullstack-deployment/templates/cert-manager/certificate-requests.yaml +++ b/charts/fullstack-deployment/templates/cert-manager/certificate-requests.yaml @@ -1,5 +1,5 @@ {{- if or $.Values.cloud.selfSignedClusterIssuer.enabled (index $.Values "hedera-explorer" "certClusterIssuerType" | ne "self-signed" ) }} -{{- if index $.Values "hedera-explorer" "enabled" | eq true }} +{{- if index $.Values "hedera-explorer" "enabled" }} apiVersion: cert-manager.io/v1 kind: Certificate metadata: diff --git a/charts/fullstack-deployment/templates/network-node-statefulset.yaml b/charts/fullstack-deployment/templates/network-node-statefulset.yaml index d8a07f6b5..ebbe0b6dc 100644 --- a/charts/fullstack-deployment/templates/network-node-statefulset.yaml +++ b/charts/fullstack-deployment/templates/network-node-statefulset.yaml @@ -58,7 +58,7 @@ spec: volumes: - name: hgcapp-storage # change me emptyDir: {} - {{- if default $defaults.sidecars.otelCollector.enabled $otelCollector.enabled | eq "true" }} + {{- if $otelCollector.enabled }} - name: otel-collector-volume configMap: name: otel-collector-cm @@ -90,6 +90,7 @@ spec: mountPath: /opt/hgcapp/ env: {{- include "fullstack.defaultEnvVars" . | nindent 10 }} + {{- if $balanceUploader.enabled }} # Sidecar: {{ $node.name }}-account-balance-uploader - name: {{ default "account-balance-uploader" $balanceUploader.nameOverride }} image: {{ include "fullstack.container.image" (dict "image" $balanceUploader.image "Chart" $.Chart "defaults" $defaults.sidecars.accountBalanceUploader ) }} @@ -125,9 +126,9 @@ spec: - name: STREAM_SIG_EXTENSION value: "pb_sig" - name: STREAM_EXTENSION - value: {{ default $defaults.sidecars.accountBalanceUploader.config.compression ($balanceUploader.config).compression | eq "true" | ternary "pb.gz" "pb" | quote }} + value: {{ default $defaults.sidecars.accountBalanceUploader.config.compression ($balanceUploader.config).compression | ternary "pb.gz" "pb" | quote }} - name: SIG_EXTENSION - value: {{ default $defaults.sidecars.accountBalanceUploader.config.compression ($balanceUploader.config).compression | eq "true" | ternary "pb_sig.gz" "pb_sig" | quote }} + value: {{ default $defaults.sidecars.accountBalanceUploader.config.compression ($balanceUploader.config).compression | ternary "pb_sig.gz" "pb_sig" | quote }} - name: SIG_REQUIRE value: {{ default $defaults.sidecars.accountBalanceUploader.config.signature.require (($balanceUploader.config).signature).require | quote }} - name: SIG_PRIORITIZE @@ -147,6 +148,8 @@ spec: resources: {{- toYaml . | nindent 10 }} {{- end }} + {{- end }} + {{- if $recordStream.enabled }} # Sidecar: {{ $node.name }}-record-stream-uploader - name: {{ default "record-stream-uploader" $recordStream.nameOverride }} image: {{ include "fullstack.container.image" (dict "image" $recordStream.image "Chart" $.Chart "defaults" $defaults.sidecars.recordStreamUploader) }} @@ -184,7 +187,7 @@ spec: - name: STREAM_SIG_EXTENSION value: "rcd_sig" - name: STREAM_EXTENSION - value: {{ default $defaults.sidecars.recordStreamUploader.config.compression ($recordStream.config).compression | eq "true" | ternary "rcd.gz" "rcd" | quote }} + value: {{ default $defaults.sidecars.recordStreamUploader.config.compression ($recordStream.config).compression | ternary "rcd.gz" "rcd" | quote }} - name: SIG_EXTENSION value: "rcd_sig" - name: RECORD_STREAM_COMPRESSION @@ -206,10 +209,12 @@ spec: envFrom: - secretRef: name: uploader-mirror-secrets - {{- with default $defaults.sidecars.recordStreamUploader.resources $recordStream.resources }} + {{- with default $defaults.sidecars.recordStreamUploader.resources $recordStream.resources }} resources: - {{- toYaml . | nindent 10 }} + {{- toYaml . | nindent 10 }} + {{- end }} {{- end }} + {{- if $eventStream.enabled }} # Sidecar: {{ $node.name }}-event-stream-uploader - name: {{ default "event-stream-uploader" $eventStream.nameOverride }} image: {{ include "fullstack.container.image" (dict "image" $eventStream.image "Chart" $.Chart "defaults" $defaults.sidecars.eventStreamUploader) }} @@ -246,9 +251,9 @@ spec: - name: STREAM_SIG_EXTENSION value: "evts_sig" - name: STREAM_EXTENSION - value: {{ default $defaults.sidecars.eventStreamUploader.config.compression ($eventStream.config).compression | eq "true" | ternary "evts.gz" "evts" | quote }} + value: {{ default $defaults.sidecars.eventStreamUploader.config.compression ($eventStream.config).compression | ternary "evts.gz" "evts" | quote }} - name: SIG_EXTENSION - value: {{ default $defaults.sidecars.eventStreamUploader.config.compression ($eventStream.config).compression | eq "true" | ternary "evts_sig.gz" "evts_sig" | quote }} + value: {{ default $defaults.sidecars.eventStreamUploader.config.compression ($eventStream.config).compression | ternary "evts_sig.gz" "evts_sig" | quote }} - name: SIG_REQUIRE value: {{ default $defaults.sidecars.eventStreamUploader.config.signature.require (($eventStream.config).signature).require | quote }} - name: SIG_PRIORITIZE @@ -268,6 +273,8 @@ spec: resources: {{- toYaml . | nindent 10 }} {{- end }} + {{- end }} + {{- if $backupUploader.enabled }} # Sidecar: {{ $node.name }}-backup-uploader - name: {{ default "backup-uploader" $backupUploader.nameOverride }} image: {{ include "fullstack.container.image" (dict "image" $backupUploader.image "Chart" $.Chart "defaults" $defaults.sidecars.backupUploader) }} @@ -288,7 +295,8 @@ spec: resources: {{- toYaml . | nindent 10 }} {{- end }} - {{- if (default $defaults.sidecars.otelCollector.enabled $otelCollector.enabled | eq "true") }} + {{- end }} + {{- if $otelCollector.enabled }} # Sidecar: {{ $node.name }}-otel-collector - name: {{ default "otel-collector" $otelCollector.nameOverride }} image: {{ include "fullstack.container.image" (dict "image" $otelCollector.image "Chart" $.Chart "defaults" $defaults.sidecars.otelCollector) }} diff --git a/charts/fullstack-deployment/templates/proxy/envoy-deployment.yaml b/charts/fullstack-deployment/templates/proxy/envoy-deployment.yaml index 63f3e251c..c617d9741 100644 --- a/charts/fullstack-deployment/templates/proxy/envoy-deployment.yaml +++ b/charts/fullstack-deployment/templates/proxy/envoy-deployment.yaml @@ -1,7 +1,7 @@ {{ range $index, $node := ($.Values.hedera.nodes) }} -{{- $envoyProxy := $node.envoyProxy | default dict -}} +{{- $envoyProxy := $node.envoyProxy | default $.Values.defaults.envoyProxy -}} {{- $defaults := $.Values.defaults.envoyProxy }} -{{- if default $defaults.enabled $envoyProxy.enabled | eq "true" }} +{{- if $envoyProxy.enabled }} --- apiVersion: apps/v1 kind: Deployment diff --git a/charts/fullstack-deployment/templates/proxy/haproxy-deployment.yaml b/charts/fullstack-deployment/templates/proxy/haproxy-deployment.yaml index 9993ac8c1..31c2e0d80 100644 --- a/charts/fullstack-deployment/templates/proxy/haproxy-deployment.yaml +++ b/charts/fullstack-deployment/templates/proxy/haproxy-deployment.yaml @@ -1,7 +1,7 @@ {{ range $index, $node := ($.Values.hedera.nodes) }} -{{- $haproxy := $node.haproxy | default dict -}} +{{- $haproxy := $node.haproxy | default $.Values.defaults.haproxy -}} {{- $defaults := $.Values.defaults.haproxy }} -{{- if default $defaults.enabled $haproxy.enabled | eq "true" }} +{{- if $haproxy.enabled }} --- apiVersion: apps/v1 kind: Deployment diff --git a/charts/fullstack-deployment/templates/rbac/pod-monitor.yaml b/charts/fullstack-deployment/templates/rbac/pod-monitor.yaml index d6a2ec5e7..31c56d0c6 100644 --- a/charts/fullstack-deployment/templates/rbac/pod-monitor.yaml +++ b/charts/fullstack-deployment/templates/rbac/pod-monitor.yaml @@ -1,4 +1,4 @@ -{{- if $.Values.tester.deployPodMonitor | eq "true" }} +{{- if $.Values.tester.deployPodMonitor }} apiVersion: v1 kind: ServiceAccount metadata: @@ -18,4 +18,4 @@ roleRef: kind: ClusterRole name: {{ $.Values.tester.clusterRoleName }} apiGroup: rbac.authorization.k8s.io -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/fullstack-deployment/templates/services/envoy-svc.yaml b/charts/fullstack-deployment/templates/services/envoy-svc.yaml index 35350a449..7ed655cf4 100644 --- a/charts/fullstack-deployment/templates/services/envoy-svc.yaml +++ b/charts/fullstack-deployment/templates/services/envoy-svc.yaml @@ -1,7 +1,7 @@ {{ range $index, $node := ($.Values.hedera.nodes) }} -{{- $envoyProxy := $node.envoyProxy | default dict -}} +{{- $envoyProxy := $node.envoyProxy | default $.Values.defaults.envoyProxy -}} {{- $defaults := $.Values.defaults.envoyProxy }} -{{- if default $defaults.enabled $envoyProxy.enabled | eq "true" }} +{{- if $envoyProxy.enabled }} --- apiVersion: v1 kind: Service @@ -14,7 +14,7 @@ metadata: fullstack.hedera.com/prometheus-endpoint: active {{- include "fullstack.testLabels" $ | nindent 4 }} spec: - {{- if default $defaults.loadBalancerEnabled $envoyProxy.loadBalancerEnabled | eq "true" }} + {{- if $envoyProxy.loadBalancerEnabled }} type: LoadBalancer {{- end }} selector: diff --git a/charts/fullstack-deployment/templates/services/haproxy-svc.yaml b/charts/fullstack-deployment/templates/services/haproxy-svc.yaml index a12b83333..0af39fc75 100644 --- a/charts/fullstack-deployment/templates/services/haproxy-svc.yaml +++ b/charts/fullstack-deployment/templates/services/haproxy-svc.yaml @@ -1,7 +1,7 @@ {{- range $index, $node := ($.Values.hedera.nodes) }} -{{- $haproxy := $node.haproxy | default dict -}} +{{- $haproxy := $node.haproxy | default $.Values.defaults.haproxy -}} {{- $defaults := $.Values.defaults.haproxy }} -{{- if default $defaults.enabled $haproxy.enabled | eq "true" }} +{{- if $haproxy.enabled }} --- apiVersion: v1 kind: Service diff --git a/charts/fullstack-deployment/values.yaml b/charts/fullstack-deployment/values.yaml index a43750baa..81c02b963 100644 --- a/charts/fullstack-deployment/values.yaml +++ b/charts/fullstack-deployment/values.yaml @@ -1,5 +1,3 @@ -# WARNING: Use double quotes for all values. This is because we need to be careful about booleans. - global: namespaceOverride: "" ingressClassName: "hedera-explorer-ingress-class" # override for multiple deployments within the same cluster and make unique per cluster @@ -22,14 +20,14 @@ cloud: telemetry: prometheus: svcMonitor: - enabled: "true" + enabled: true # reduce default termination grace period terminationGracePeriodSeconds: 10 # helm test container tester: - deployPodMonitor: "true" + deployPodMonitor: true clusterRoleName: "pod-monitor-role" # this is a shared cluster role for all namespaces image: registry: "ghcr.io" @@ -69,7 +67,7 @@ defaults: pullPolicy: "IfNotPresent" resources: {} haproxy: - enabled: "true" + enabled: true nameOverride: "haproxy" image: registry: "docker.io" @@ -79,7 +77,7 @@ defaults: resources: {} serviceType: "LoadBalancer" envoyProxy: - enabled: "true" + enabled: true nameOverride: "envoy-proxy" image: registry: "docker.io" @@ -87,10 +85,10 @@ defaults: tag: "v1.21.1" pullPolicy: "IfNotPresent" resources: {} - loadBalancerEnabled: "false" + loadBalancerEnabled: false sidecars: recordStreamUploader: - enabled: "true" + enabled: true nameOverride: "record-stream-uploader" image: registry: "gcr.io" @@ -98,20 +96,20 @@ defaults: tag: "1.3.0" pullPolicy: "IfNotPresent" config: - debug: "true" - compression: "true" - sidecar: "true" + debug: true + compression: true + sidecar: true reaper: - enabled: "true" + enabled: true minKeep: 1 interval: 1 defaultBackoff: 1 signature: - require: "true" - prioritize: "true" + require: true + prioritize: true resources: {} eventStreamUploader: - enabled: "true" + enabled: true nameOverride: "event-stream-uploader" image: registry: "gcr.io" @@ -119,19 +117,19 @@ defaults: tag: "1.3.0" pullPolicy: "IfNotPresent" config: - debug: "true" - compression: "true" + debug: true + compression: true reaper: - enabled: "true" + enabled: true minKeep: 1 interval: 1 defaultBackoff: 1 signature: - require: "true" - prioritize: "true" + require: true + prioritize: true resources: {} accountBalanceUploader: - enabled: "true" + enabled: true nameOverride: "account-balance-uploader" image: registry: gcr.io @@ -139,19 +137,19 @@ defaults: tag: "1.3.0" # Defaults to the chart's app version if empty pullPolicy: "IfNotPresent" config: - debug: "true" - compression: "true" + debug: true + compression: true reaper: - enabled: "true" + enabled: true minKeep: 1 interval: 1 defaultBackoff: 1 signature: - require: "true" - prioritize: "true" + require: true + prioritize: true resources: {} backupUploader: - enabled: "true" + enabled: true nameOverride: "backup-uploader" image: registry: "gcr.io" @@ -162,7 +160,7 @@ defaults: backupBucket: "backup" resources: {} otelCollector: - enabled: "true" + enabled: true nameOverride: "" image: registry: "docker.io" @@ -183,7 +181,7 @@ defaults: tls: insecure: true prometheusRemoteWrite: - enabled: "false" + enabled: false endpoint: "" # e.g. http://prometheus..svc:9090/api/v1/write tls: insecure: true