diff --git a/charts/hedera-network/templates/_helpers.tpl b/charts/hedera-network/templates/_helpers.tpl index d5fd0714b..95494f175 100644 --- a/charts/hedera-network/templates/_helpers.tpl +++ b/charts/hedera-network/templates/_helpers.tpl @@ -1,10 +1,3 @@ -{{/* -Namespace -*/}} -{{- define "fullstack.namespace" -}} -{{- default .Release.Namespace .Values.global.namespaceOverride -}} -{{- end -}} - {{- define "fullstack.hedera.security.context" -}} runAsUser: 2000 runAsGroup: 2000 diff --git a/charts/hedera-network/templates/configmaps/envoy-cm.yaml b/charts/hedera-network/templates/configmaps/envoy-cm.yaml index 952d30c15..c9ccc7cd3 100644 --- a/charts/hedera-network/templates/configmaps/envoy-cm.yaml +++ b/charts/hedera-network/templates/configmaps/envoy-cm.yaml @@ -5,7 +5,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: envoy-proxy-cm-{{ $node.name }} - namespace: {{ include "fullstack.namespace" $ }} + namespace: {{ default .Release.Namespace .Values.global.namespaceOverride }} data: envoy.yaml: | {{- tpl ($.Files.Get "config-files/envoy.yaml") (dict "nodeConfig" $node "Template" $.Template) | nindent 4 }} diff --git a/charts/hedera-network/templates/configmaps/haproxy-cm.yaml b/charts/hedera-network/templates/configmaps/haproxy-cm.yaml index 8b4fd914e..ecd39ebc9 100644 --- a/charts/hedera-network/templates/configmaps/haproxy-cm.yaml +++ b/charts/hedera-network/templates/configmaps/haproxy-cm.yaml @@ -5,7 +5,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: haproxy-cm-{{ $node.name }} - namespace: {{ include "fullstack.namespace" $ }} + namespace: {{ default .Release.Namespace .Values.global.namespaceOverride }} data: haproxy.cfg: | {{- tpl ($.Files.Get "config-files/haproxy.cfg") (dict "nodeConfig" $node "Template" $.Template) | nindent 4 }} diff --git a/charts/hedera-network/templates/configmaps/otel-collector-cm.yaml b/charts/hedera-network/templates/configmaps/otel-collector-cm.yaml index 823a78c54..6a1e634d2 100644 --- a/charts/hedera-network/templates/configmaps/otel-collector-cm.yaml +++ b/charts/hedera-network/templates/configmaps/otel-collector-cm.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: otel-collector-cm - namespace: {{ include "fullstack.namespace" $ }} + namespace: {{ default .Release.Namespace .Values.global.namespaceOverride }} data: config.yaml: | {{- tpl (.Files.Get "config-files/otel-collector-config.yaml") ( dict "otelDefaults" $.Values.defaults.sidecars.otelCollector "Template" $.Template ) | nindent 4 }} diff --git a/charts/hedera-network/templates/configmaps/test-cm.yaml b/charts/hedera-network/templates/configmaps/test-cm.yaml index 0685da229..67e8d9f73 100644 --- a/charts/hedera-network/templates/configmaps/test-cm.yaml +++ b/charts/hedera-network/templates/configmaps/test-cm.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: test-cm - namespace: {{ include "fullstack.namespace" $ }} + namespace: {{ default .Release.Namespace .Values.global.namespaceOverride }} data: {{- $total_nodes := len $.Values.hedera.nodes -}} {{- range $path, $_ := .Files.Glob "tests/*.*" }} diff --git a/charts/hedera-network/templates/gateway-api/envoy-grpc-web-routes.yaml b/charts/hedera-network/templates/gateway-api/envoy-grpc-web-routes.yaml index ae73ca026..750d2eef4 100644 --- a/charts/hedera-network/templates/gateway-api/envoy-grpc-web-routes.yaml +++ b/charts/hedera-network/templates/gateway-api/envoy-grpc-web-routes.yaml @@ -7,7 +7,7 @@ apiVersion: gateway.networking.k8s.io/v1beta1 kind: HTTPRoute metadata: name: envoy-grpc-web-route-{{ $node.name }} - namespace: {{ include "fullstack.namespace" $ }} + namespace: {{ default .Release.Namespace .Values.global.namespaceOverride }} labels: fullstack.hedera.com/type: http-route spec: diff --git a/charts/hedera-network/templates/gateway-api/gateway.yaml b/charts/hedera-network/templates/gateway-api/gateway.yaml index 0e739d429..378b297e2 100644 --- a/charts/hedera-network/templates/gateway-api/gateway.yaml +++ b/charts/hedera-network/templates/gateway-api/gateway.yaml @@ -3,7 +3,7 @@ apiVersion: gateway.networking.k8s.io/v1beta1 kind: GatewayClass metadata: name: {{ $.Values.gatewayApi.gatewayClass.name }} - namespace: {{ include "fullstack.namespace" $ }} + namespace: {{ default .Release.Namespace .Values.global.namespaceOverride }} labels: fullstack.hedera.com/type: gateway-class spec: @@ -15,7 +15,7 @@ apiVersion: gateway.networking.k8s.io/v1beta1 kind: Gateway metadata: name: {{ $.Values.gatewayApi.gateway.name }} - namespace: {{ include "fullstack.namespace" $ }} + namespace: {{ default .Release.Namespace .Values.global.namespaceOverride }} labels: fullstack.hedera.com/type: gateway spec: diff --git a/charts/hedera-network/templates/gateway-api/haproxy-grpc-routes.yaml b/charts/hedera-network/templates/gateway-api/haproxy-grpc-routes.yaml index 186ef5b0c..7e3800011 100644 --- a/charts/hedera-network/templates/gateway-api/haproxy-grpc-routes.yaml +++ b/charts/hedera-network/templates/gateway-api/haproxy-grpc-routes.yaml @@ -7,7 +7,7 @@ apiVersion: gateway.networking.k8s.io/v1alpha2 kind: TCPRoute metadata: name: haproxy-grpc-route-{{ $node.name }} - namespace: {{ include "fullstack.namespace" $ }} + namespace: {{ default .Release.Namespace .Values.global.namespaceOverride }} labels: fullstack.hedera.com/type: tcp-route fullstack.hedera.com/nodeName: {{ $node.name }} diff --git a/charts/hedera-network/templates/gateway-api/network-node-grpc-routes.yaml b/charts/hedera-network/templates/gateway-api/network-node-grpc-routes.yaml index 79a82ece8..aae30d6d6 100644 --- a/charts/hedera-network/templates/gateway-api/network-node-grpc-routes.yaml +++ b/charts/hedera-network/templates/gateway-api/network-node-grpc-routes.yaml @@ -7,7 +7,7 @@ apiVersion: gateway.networking.k8s.io/v1alpha2 kind: TCPRoute metadata: name: node-grpc-route-{{ $node.name }} - namespace: {{ include "fullstack.namespace" $ }} + namespace: {{ default .Release.Namespace .Values.global.namespaceOverride }} labels: fullstack.hedera.com/type: tcp-route fullstack.hedera.com/nodeName: {{ $node.name }} diff --git a/charts/hedera-network/templates/network-node-statefulset.yaml b/charts/hedera-network/templates/network-node-statefulset.yaml index df2238957..1d45ddcb3 100644 --- a/charts/hedera-network/templates/network-node-statefulset.yaml +++ b/charts/hedera-network/templates/network-node-statefulset.yaml @@ -14,7 +14,7 @@ apiVersion: apps/v1 kind: StatefulSet metadata: name: network-{{ $node.name }} - namespace: {{ include "fullstack.namespace" $ }} + namespace: {{ default .Release.Namespace .Values.global.namespaceOverride }} labels: app: network-{{ $node.name }} spec: diff --git a/charts/hedera-network/templates/proxy/envoy-deployment.yaml b/charts/hedera-network/templates/proxy/envoy-deployment.yaml index 66d6bb324..38d6b6259 100644 --- a/charts/hedera-network/templates/proxy/envoy-deployment.yaml +++ b/charts/hedera-network/templates/proxy/envoy-deployment.yaml @@ -7,7 +7,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: envoy-proxy-{{ $node.name }} - namespace: {{ include "fullstack.namespace" $ }} + namespace: {{ default .Release.Namespace .Values.global.namespaceOverride }} spec: replicas: 1 selector: diff --git a/charts/hedera-network/templates/proxy/haproxy-deployment.yaml b/charts/hedera-network/templates/proxy/haproxy-deployment.yaml index 8577f6f4b..1ba018ec0 100644 --- a/charts/hedera-network/templates/proxy/haproxy-deployment.yaml +++ b/charts/hedera-network/templates/proxy/haproxy-deployment.yaml @@ -7,7 +7,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: haproxy-{{ $node.name }} - namespace: {{ include "fullstack.namespace" $ }} + namespace: {{ default .Release.Namespace .Values.global.namespaceOverride }} spec: replicas: 1 selector: diff --git a/charts/hedera-network/templates/rbac/pod-monitor-role.yaml b/charts/hedera-network/templates/rbac/pod-monitor-role.yaml index 255d54991..ca71a23ca 100644 --- a/charts/hedera-network/templates/rbac/pod-monitor-role.yaml +++ b/charts/hedera-network/templates/rbac/pod-monitor-role.yaml @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: pod-monitoring-role - namespace: {{ include "fullstack.namespace" $ }} + namespace: {{ default .Release.Namespace .Values.global.namespaceOverride }} rules: - apiGroups: [ "" ] resources: @@ -31,11 +31,11 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: pod-monitoring-role-binding - namespace: {{ include "fullstack.namespace" $ }} + namespace: {{ default .Release.Namespace .Values.global.namespaceOverride }} subjects: - kind: ServiceAccount name: pod-monitor - namespace: {{ include "fullstack.namespace" $ }} + namespace: {{ default .Release.Namespace .Values.global.namespaceOverride }} roleRef: kind: ClusterRole name: pod-monitoring-role diff --git a/charts/hedera-network/templates/rbac/service-accounts.yaml b/charts/hedera-network/templates/rbac/service-accounts.yaml index 084cdb4fa..1e8e41c88 100644 --- a/charts/hedera-network/templates/rbac/service-accounts.yaml +++ b/charts/hedera-network/templates/rbac/service-accounts.yaml @@ -2,4 +2,4 @@ apiVersion: v1 kind: ServiceAccount metadata: name: pod-monitor - namespace: {{ include "fullstack.namespace" $ }} + namespace: {{ default .Release.Namespace .Values.global.namespaceOverride }} diff --git a/charts/hedera-network/templates/secrets/backup-uploder-secrets.yaml b/charts/hedera-network/templates/secrets/backup-uploder-secrets.yaml index f9721e59c..54e8670c0 100644 --- a/charts/hedera-network/templates/secrets/backup-uploder-secrets.yaml +++ b/charts/hedera-network/templates/secrets/backup-uploder-secrets.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Secret metadata: name: backup-uploader-secrets - namespace: {{ include "fullstack.namespace" $ }} + namespace: {{ default .Release.Namespace .Values.global.namespaceOverride }} type: Opaque data: S3_ACCESS_KEY: "" diff --git a/charts/hedera-network/templates/secrets/otel-collector-secrets.yaml b/charts/hedera-network/templates/secrets/otel-collector-secrets.yaml index aed2583b7..bb3d2b91b 100644 --- a/charts/hedera-network/templates/secrets/otel-collector-secrets.yaml +++ b/charts/hedera-network/templates/secrets/otel-collector-secrets.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Secret metadata: name: otel-collector-secrets - namespace: {{ include "fullstack.namespace" $ }} + namespace: {{ default .Release.Namespace .Values.global.namespaceOverride }} type: Opaque data: S3_ACCESS_KEY: "" diff --git a/charts/hedera-network/templates/secrets/uploder-mirror-secrets.yaml b/charts/hedera-network/templates/secrets/uploder-mirror-secrets.yaml index 8878b5744..2aa0834f3 100644 --- a/charts/hedera-network/templates/secrets/uploder-mirror-secrets.yaml +++ b/charts/hedera-network/templates/secrets/uploder-mirror-secrets.yaml @@ -7,7 +7,7 @@ apiVersion: v1 kind: Secret metadata: name: minio-secrets - namespace: {{ include "fullstack.namespace" $ }} + namespace: {{ default .Release.Namespace .Values.global.namespaceOverride }} type: Opaque data: config.env: {{ $minio_config_env | b64enc }} diff --git a/charts/hedera-network/templates/services/envoy-svc.yaml b/charts/hedera-network/templates/services/envoy-svc.yaml index 13a38f66b..91e9680a7 100644 --- a/charts/hedera-network/templates/services/envoy-svc.yaml +++ b/charts/hedera-network/templates/services/envoy-svc.yaml @@ -7,7 +7,7 @@ apiVersion: v1 kind: Service metadata: name: envoy-proxy-{{ $node.name }}-svc - namespace: {{ include "fullstack.namespace" $ }} + namespace: {{ default .Release.Namespace .Values.global.namespaceOverride }} labels: fullstack.hedera.com/type: envoy-proxy-svc fullstack.hedera.com/node-name: {{ $node.name }} diff --git a/charts/hedera-network/templates/services/haproxy-svc.yaml b/charts/hedera-network/templates/services/haproxy-svc.yaml index 4b44cfc5a..b610d2793 100644 --- a/charts/hedera-network/templates/services/haproxy-svc.yaml +++ b/charts/hedera-network/templates/services/haproxy-svc.yaml @@ -7,7 +7,7 @@ apiVersion: v1 kind: Service metadata: name: haproxy-{{ $node.name }}-svc - namespace: {{ include "fullstack.namespace" $ }} + namespace: {{ default .Release.Namespace .Values.global.namespaceOverride }} labels: fullstack.hedera.com/type: haproxy-svc fullstack.hedera.com/node-name: {{ $node.name }} diff --git a/charts/hedera-network/templates/services/network-node-svc.yaml b/charts/hedera-network/templates/services/network-node-svc.yaml index d14c56351..f16218dc1 100644 --- a/charts/hedera-network/templates/services/network-node-svc.yaml +++ b/charts/hedera-network/templates/services/network-node-svc.yaml @@ -4,7 +4,7 @@ apiVersion: v1 kind: Service metadata: name: network-{{ $nodeConfig.name }}-svc - namespace: {{ include "fullstack.namespace" $ }} + namespace: {{ default .Release.Namespace .Values.global.namespaceOverride }} labels: fullstack.hedera.com/type: network-node-svc fullstack.hedera.com/node-name: {{ $nodeConfig.name }} diff --git a/charts/hedera-network/templates/telemetry/prometheus-svc-monitor.yaml b/charts/hedera-network/templates/telemetry/prometheus-svc-monitor.yaml index 4bd355799..8e044a463 100644 --- a/charts/hedera-network/templates/telemetry/prometheus-svc-monitor.yaml +++ b/charts/hedera-network/templates/telemetry/prometheus-svc-monitor.yaml @@ -3,7 +3,7 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: network-node-monitor - namespace: {{ include "fullstack.namespace" $ }} + namespace: {{ default .Release.Namespace .Values.global.namespaceOverride }} labels: fullstack.hedera.com/type: network-node-svc-monitor spec: