Skip to content

Commit

Permalink
merge with develop
Browse files Browse the repository at this point in the history
  • Loading branch information
skudasov committed Nov 30, 2023
1 parent 7a5239c commit 4158a3d
Show file tree
Hide file tree
Showing 6 changed files with 216 additions and 218 deletions.
42 changes: 0 additions & 42 deletions charts/chainlink-cluster/dashboard/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,48 +350,6 @@ func (m *CLClusterDashboard) generate() error {
),
),
),
// logs
dashboard.Row(
"Logs",
row.Collapse(),
row.WithTimeSeries(
"Log Counters",
timeseries.Span(12),
timeseries.Height("200px"),
timeseries.DataSource(m.PrometheusDataSourceName),
timeseries.WithPrometheusTarget(
`log_panic_count{namespace="${namespace}"}`,
prometheus.Legend("{{pod}} - panic"),
),
timeseries.WithPrometheusTarget(
`log_fatal_count{namespace="${namespace}"}`,
prometheus.Legend("{{pod}} - fatal"),
),
timeseries.WithPrometheusTarget(
`log_critical_count{namespace="${namespace}"}`,
prometheus.Legend("{{pod}} - critical"),
),
timeseries.WithPrometheusTarget(
`log_warn_count{namespace="${namespace}"}`,
prometheus.Legend("{{pod}} - warn"),
),
timeseries.WithPrometheusTarget(
`log_error_count{namespace="${namespace}"}`,
prometheus.Legend("{{pod}} - error"),
),
),
m.logsRowOption("All errors", `
{namespace="${namespace}", app="app", container="node"}
| json
| level="error"
| line_format "{{ .instance }} {{ .level }} {{ .ts }} {{ .logger }} {{ .caller }} {{ .msg }} {{ .version }} {{ .nodeTier }} {{ .nodeName }} {{ .node }} {{ .evmChainID }} {{ .nodeOrder }} {{ .mode }} {{ .nodeState }} {{ .sentryEventID }} {{ .stacktrace }}"`),
m.logsRowOption("Node 1", `{namespace="${namespace}", app="app", instance="node-1", container="node"}`),
m.logsRowOption("Node 2", `{namespace="${namespace}", app="app", instance="node-2", container="node"}`),
m.logsRowOption("Node 3", `{namespace="${namespace}", app="app", instance="node-3", container="node"}`),
m.logsRowOption("Node 4", `{namespace="${namespace}", app="app", instance="node-4", container="node"}`),
m.logsRowOption("Node 5", `{namespace="${namespace}", app="app", instance="node-5", container="node"}`),
m.logsRowOption("Node 6", `{namespace="${namespace}", app="app", instance="node-6", container="node"}`),
),
// HeadTracker
dashboard.Row("Head tracker",
row.Collapse(),
Expand Down
226 changes: 207 additions & 19 deletions charts/chainlink-cluster/devspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,18 @@ deployments:
# they can be defined the same way in values.yml
# devspace merging this "values" and "values.yml" before deploy
values:
runner:
image: ${DEVSPACE_IMAGE}
stateful: false
geth:
version: v1.12.0
wsrpc-port: 8546
httprpc-port: 8544
networkid: 1337
blocktime: 1
mockserver:
enabled: true
port: 1080
db:
stateful: false
podSecurityContext:
fsGroup: 999

chainlink:
securityContext:
capabilities:
drop:
- ALL
readOnlyRootFilesystem: false
runAsNonRoot: true
runAsUser: 14933
runAsGroup: 999
web_port: 6688
p2p_port: 6690
nodes:
Expand All @@ -76,11 +73,202 @@ deployments:
- name: node-6
image: ${DEVSPACE_IMAGE}
version: latest
prometheusMonitor: "true"
podAnnotations: {}
nodeSelector: {}
tolerations: []
affinity: {}
resources:
requests:
cpu: 350m
memory: 1024Mi
limits:
cpu: 350m
memory: 1024Mi

# each CL node have a dedicated PostgreSQL 11.15
# use StatefulSet by setting:
#
# stateful: true
# capacity 10Gi
#
# if you are running long tests
db:
securityContext:
capabilities:
drop:
- ALL
readOnlyRootFilesystem: false
runAsNonRoot: true
runAsUser: 999
runAsGroup: 999
stateful: false
resources:
requests:
cpu: 1
memory: 1024Mi
limits:
cpu: 1
memory: 1024Mi
# default cluster shipped with latest Geth ( dev mode by default )
geth:
securityContext:
capabilities:
drop:
- ALL
readOnlyRootFilesystem: false
runAsNonRoot: true
runAsUser: 999
runAsGroup: 999
version: v1.12.0
wsrpc-port: 8546
httprpc-port: 8544
networkid: 1337
blocktime: 1
resources:
requests:
cpu: 1
memory: 1024Mi
limits:
cpu: 1
memory: 1024Mi
# mockserver is https://www.mock-server.com/where/kubernetes.html
# used to stub External Adapters
mockserver:
# image: "mockserver/mockserver"
# version: "mockserver-5.15.0"
securityContext:
capabilities:
drop:
- ALL
readOnlyRootFilesystem: false
runAsNonRoot: true
runAsUser: 999
runAsGroup: 999
enabled: true
releasenameOverride: mockserver
app:
runAsUser: 999
readOnlyRootFilesystem: false
port: 1080
resources:
requests:
cpu: 1
memory: 1024Mi
limits:
cpu: 1
memory: 1024Mi
runner:
securityContext:
capabilities:
drop:
- ALL
readOnlyRootFilesystem: false
runAsNonRoot: true
runAsUser: 999
runAsGroup: 999
stateful: false
resources:
requests:
cpu: 1
memory: 512Mi
limits:
cpu: 1
memory: 512Mi
affinity: { }
tolerations: [ ]
nodeSelector: { }
ingress:
enabled: false
className: ""
hosts: [ ]
tls: [ ]
annotations: { }
service:
type: NodePort
port: 8080


# monitoring.coreos.com/v1 PodMonitor for each node
prometheusMonitor: true

# deployment placement, standard helm stuff
podAnnotations:
nodeSelector:
tolerations:
affinity:
# podSecurityContext:
# fsGroup: 999
# runner:
# image: ${DEVSPACE_IMAGE}
# stateful: false
# geth:
# podSecurityContext:
# fsGroup: 999
# securityContext:
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: false
# runAsNonRoot: true
# runAsUser: 999
# runAsGroup: 999
# version: v1.12.0
# wsrpc-port: 8546
# httprpc-port: 8544
# networkid: 1337
# blocktime: 1
# mockserver:
# enabled: true
# releasenameOverride: mockserver
# app:
# runAsUser: 999
# readOnlyRootFilesystem: false
# port: 1080
# db:
# podSecurityContext:
# fsGroup: 999
# securityContext:
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: false
# runAsNonRoot: true
# runAsUser: 999
# runAsGroup: 999
# stateful: false
# chainlink:
# podSecurityContext:
# fsGroup: 14933
# securityContext:
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: false
# runAsNonRoot: true
# runAsUser: 14933
# runAsGroup: 14933
# web_port: 6688
# p2p_port: 6690
# nodes:
# - name: node-1
# image: ${DEVSPACE_IMAGE}
# version: latest
# - name: node-2
# image: ${DEVSPACE_IMAGE}
# version: latest
# - name: node-3
# image: ${DEVSPACE_IMAGE}
# version: latest
# - name: node-4
# image: ${DEVSPACE_IMAGE}
# version: latest
# - name: node-5
# image: ${DEVSPACE_IMAGE}
# version: latest
# - name: node-6
# image: ${DEVSPACE_IMAGE}
# version: latest
# prometheusMonitor: "true"
# podAnnotations: {}
# nodeSelector: {}
# tolerations: []
# affinity: {}

profiles:
# this replaces only "runner" pod, usable when you'd like to run some system level tests inside k8s
Expand Down
2 changes: 1 addition & 1 deletion charts/chainlink-cluster/templates/mockserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
spec:
containers:
- name: {{ .Release.Name }}-mockserver
image: {{ default "mockserver/mockserver" .Values.mockserver.image }}:{{ default "mockserver-5.15.0" .Values.mockserver.version }}
image: "mockserver/mockserver:mockserver-5.15.0"
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 65534 # nonroot
Expand Down
8 changes: 7 additions & 1 deletion charts/chainlink-cluster/values-raw-helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ geth:
# mockserver is https://www.mock-server.com/where/kubernetes.html
# used to stub External Adapters
mockserver:
# image: "mockserver/mockserver"
# version: "mockserver-5.15.0"
securityContext:
capabilities:
drop:
Expand All @@ -129,6 +131,10 @@ mockserver:
runAsUser: 999
runAsGroup: 999
enabled: true
releasenameOverride: mockserver
app:
runAsUser: 999
readOnlyRootFilesystem: false
port: 1080
resources:
requests:
Expand Down Expand Up @@ -169,7 +175,7 @@ runner:


# monitoring.coreos.com/v1 PodMonitor for each node
prometheusMonitor: false
prometheusMonitor: true

# deployment placement, standard helm stuff
podAnnotations:
Expand Down
Loading

0 comments on commit 4158a3d

Please sign in to comment.