diff --git a/charts/chainlink-cluster/templates/chainlink-cm.yaml b/charts/chainlink-cluster/templates/chainlink-cm.yaml index 6f8b043e3d1..9a99e2a5128 100644 --- a/charts/chainlink-cluster/templates/chainlink-cm.yaml +++ b/charts/chainlink-cluster/templates/chainlink-cm.yaml @@ -1,3 +1,4 @@ +{{- if .Values.chainlink.enabled }} {{- range $cfg := .Values.chainlink.nodes }} apiVersion: v1 kind: ConfigMap @@ -69,3 +70,4 @@ data: {{ end }} --- {{- end }} +{{- end }} diff --git a/charts/chainlink-cluster/templates/chainlink-db-deployment.yaml b/charts/chainlink-cluster/templates/chainlink-db-deployment.yaml index ba72c5ff8fb..0ca7c4afd71 100644 --- a/charts/chainlink-cluster/templates/chainlink-db-deployment.yaml +++ b/charts/chainlink-cluster/templates/chainlink-db-deployment.yaml @@ -1,3 +1,4 @@ +{{- if .Values.db.enabled }} {{- range $cfg := .Values.chainlink.nodes }} apiVersion: apps/v1 {{ if $.Values.db.stateful }} @@ -150,3 +151,4 @@ spec: {{- end }} --- {{- end }} +{{- end }} diff --git a/charts/chainlink-cluster/templates/chainlink-db-networkpolicy.yaml b/charts/chainlink-cluster/templates/chainlink-db-networkpolicy.yaml index 3e4c9f49b46..53664884f26 100644 --- a/charts/chainlink-cluster/templates/chainlink-db-networkpolicy.yaml +++ b/charts/chainlink-cluster/templates/chainlink-db-networkpolicy.yaml @@ -1,4 +1,4 @@ -{{- if .Values.networkPolicies.enabled }} +{{- if and .Values.db.enabled .Values.networkPolicies.enabled }} apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: @@ -18,4 +18,4 @@ spec: ports: - protocol: TCP port: 5432 -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/chainlink-cluster/templates/chainlink-db-service.yaml b/charts/chainlink-cluster/templates/chainlink-db-service.yaml index f27bd9eab20..5ed7d0ca4dd 100644 --- a/charts/chainlink-cluster/templates/chainlink-db-service.yaml +++ b/charts/chainlink-cluster/templates/chainlink-db-service.yaml @@ -1,3 +1,4 @@ +{{- if .Values.db.enabled }} {{- range $cfg := .Values.chainlink.nodes }} apiVersion: v1 kind: Service @@ -13,4 +14,5 @@ spec: port: 5432 targetPort: 5432 --- -{{- end }} \ No newline at end of file +{{- end }} +{{- end }} diff --git a/charts/chainlink-cluster/templates/chainlink-node-deployment.yaml b/charts/chainlink-cluster/templates/chainlink-node-deployment.yaml index 38676716f90..e91a400967a 100644 --- a/charts/chainlink-cluster/templates/chainlink-node-deployment.yaml +++ b/charts/chainlink-cluster/templates/chainlink-node-deployment.yaml @@ -1,3 +1,4 @@ +{{- if .Values.chainlink.enabled }} {{- range $index, $cfg := .Values.chainlink.nodes }} apiVersion: apps/v1 kind: Deployment @@ -126,3 +127,4 @@ spec: {{- end }} --- {{- end }} +{{- end }} diff --git a/charts/chainlink-cluster/templates/chainlink-node-networkpolicy.yaml b/charts/chainlink-cluster/templates/chainlink-node-networkpolicy.yaml index f2d0c02676e..8f465288767 100644 --- a/charts/chainlink-cluster/templates/chainlink-node-networkpolicy.yaml +++ b/charts/chainlink-cluster/templates/chainlink-node-networkpolicy.yaml @@ -1,4 +1,4 @@ -{{- if .Values.networkPolicies.enabled }} +{{- if and .Values.chainlink.enabled .Values.networkPolicies.enabled }} apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: @@ -15,4 +15,4 @@ spec: - podSelector: matchLabels: app: {{ $.Release.Name }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/chainlink-cluster/templates/chainlink-node-service.yaml b/charts/chainlink-cluster/templates/chainlink-node-service.yaml index 7a3b70efb4f..71b9ca498d2 100644 --- a/charts/chainlink-cluster/templates/chainlink-node-service.yaml +++ b/charts/chainlink-cluster/templates/chainlink-node-service.yaml @@ -1,3 +1,4 @@ +{{- if .Values.chainlink.enabled }} {{- range $cfg := .Values.chainlink.nodes }} apiVersion: v1 kind: Service @@ -15,4 +16,5 @@ spec: instance: {{ $cfg.name }} type: ClusterIP --- -{{- end }} \ No newline at end of file +{{- end }} +{{- end }} diff --git a/charts/chainlink-cluster/templates/chainlink-pod-monitor.yaml b/charts/chainlink-cluster/templates/chainlink-pod-monitor.yaml index 05852642a29..bb8c5d2b1a6 100644 --- a/charts/chainlink-cluster/templates/chainlink-pod-monitor.yaml +++ b/charts/chainlink-cluster/templates/chainlink-pod-monitor.yaml @@ -1,4 +1,4 @@ -{{- if $.Values.prometheusMonitor }} +{{- if and .Values.chainlink.enabled .Values.prometheusMonitor }} apiVersion: monitoring.coreos.com/v1 kind: PodMonitor metadata: diff --git a/charts/chainlink-cluster/templates/chainlink-secret.yaml b/charts/chainlink-cluster/templates/chainlink-secret.yaml index 3502c12ecfd..f0531b16511 100644 --- a/charts/chainlink-cluster/templates/chainlink-secret.yaml +++ b/charts/chainlink-cluster/templates/chainlink-secret.yaml @@ -1,3 +1,4 @@ +{{- if .Values.chainlink.enabled }} {{- range $cfg := .Values.chainlink.nodes }} apiVersion: v1 kind: Secret @@ -9,4 +10,5 @@ data: apicredentials: bm90cmVhbEBmYWtlZW1haWwuY2hudHdvY2hhaW5zCg== node-password: VC50TEhrY213ZVBUL3AsXXNZdW50andIS0FzcmhtIzRlUnM0THVLSHd2SGVqV1lBQzJKUDRNOEhpbXdnbWJhWgo= --- -{{- end }} \ No newline at end of file +{{- end }} +{{- end }} diff --git a/charts/chainlink-cluster/templates/geth-config-map.yaml b/charts/chainlink-cluster/templates/geth-config-map.yaml index 0d9abb042e3..6a5f4bacc0d 100644 --- a/charts/chainlink-cluster/templates/geth-config-map.yaml +++ b/charts/chainlink-cluster/templates/geth-config-map.yaml @@ -1,4 +1,4 @@ -{{ if (hasKey .Values "geth") }} +{{ if and (hasKey .Values "geth") .Values.geth.enabled }} {{- range $cfg := .Values.geth.chains }} apiVersion: v1 kind: ConfigMap @@ -152,4 +152,4 @@ data: } --- {{- end }} -{{ end }} \ No newline at end of file +{{- end }} diff --git a/charts/chainlink-cluster/templates/geth-deployment.yaml b/charts/chainlink-cluster/templates/geth-deployment.yaml index e8e04936ea4..6eccdbd20b4 100644 --- a/charts/chainlink-cluster/templates/geth-deployment.yaml +++ b/charts/chainlink-cluster/templates/geth-deployment.yaml @@ -1,4 +1,4 @@ -{{ if (hasKey .Values "geth") }} +{{ if and (hasKey .Values "geth") .Values.geth.enabled }} {{- range $cfg := .Values.geth.chains }} apiVersion: apps/v1 kind: Deployment @@ -127,4 +127,4 @@ spec: {{- end }} --- {{- end }} -{{ end }} \ No newline at end of file +{{- end }} diff --git a/charts/chainlink-cluster/templates/geth-networkpolicy.yaml b/charts/chainlink-cluster/templates/geth-networkpolicy.yaml index 9e823a0431b..2a37a92aaaa 100644 --- a/charts/chainlink-cluster/templates/geth-networkpolicy.yaml +++ b/charts/chainlink-cluster/templates/geth-networkpolicy.yaml @@ -1,3 +1,4 @@ +{{ if and (hasKey .Values "geth") .Values.geth.enabled }} {{- if .Values.networkPolicies.enabled }} apiVersion: networking.k8s.io/v1 kind: NetworkPolicy @@ -20,4 +21,5 @@ spec: port: 8544 - protocol: TCP port: 8546 -{{- end }} \ No newline at end of file +{{- end }} +{{- end }} diff --git a/charts/chainlink-cluster/templates/geth-service.yaml b/charts/chainlink-cluster/templates/geth-service.yaml index 3016c53048f..63a86a3d1d7 100644 --- a/charts/chainlink-cluster/templates/geth-service.yaml +++ b/charts/chainlink-cluster/templates/geth-service.yaml @@ -1,4 +1,4 @@ -{{ if (hasKey .Values "geth") }} +{{ if and (hasKey .Values "geth") .Values.geth.enabled }} {{- range $cfg := .Values.geth.chains }} apiVersion: v1 kind: Service @@ -18,4 +18,4 @@ spec: type: ClusterIP --- {{- end }} -{{ end }} \ No newline at end of file +{{- end }} diff --git a/charts/chainlink-cluster/templates/mockserver-networkpolicy.yaml b/charts/chainlink-cluster/templates/mockserver-networkpolicy.yaml index 8d167b4f924..0fa48dcfc41 100644 --- a/charts/chainlink-cluster/templates/mockserver-networkpolicy.yaml +++ b/charts/chainlink-cluster/templates/mockserver-networkpolicy.yaml @@ -1,4 +1,4 @@ -{{- if .Values.networkPolicies.enabled }} +{{- if and .Values.mockserver.enabled .Values.networkPolicies.enabled }} apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: @@ -18,4 +18,4 @@ spec: ports: - protocol: TCP port: 1080 -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/chainlink-cluster/templates/networkpolicy-default.yaml b/charts/chainlink-cluster/templates/networkpolicy-default.yaml index a2cc23ed7f9..10927c26eb6 100644 --- a/charts/chainlink-cluster/templates/networkpolicy-default.yaml +++ b/charts/chainlink-cluster/templates/networkpolicy-default.yaml @@ -1,4 +1,4 @@ -{{- if .Values.networkPolicies.enabled }} +{{- if and .Values.mockserver.enabled .Values.networkPolicies.enabled }} apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: diff --git a/charts/chainlink-cluster/values.yaml b/charts/chainlink-cluster/values.yaml index d3c1c384a2b..ed497a65ff9 100644 --- a/charts/chainlink-cluster/values.yaml +++ b/charts/chainlink-cluster/values.yaml @@ -10,6 +10,7 @@ # image: ethereum/client-go # version: stable chainlink: + enabled: true podSecurityContext: fsGroup: 14933 securityContext: @@ -88,6 +89,7 @@ chainlink: # # if you are running long tests db: + enabled: true podSecurityContext: fsGroup: 999 securityContext: @@ -109,6 +111,7 @@ db: memory: 1024Mi # default cluster shipped with latest Geth ( dev mode by default ) geth: + enabled: true podSecurityContext: fsGroup: 999 securityContext: