Skip to content

Commit 9f02f86

Browse files
committed
Merge branch 'main' into chaos-generator-ci
2 parents 4bc3093 + 0e0ea8c commit 9f02f86

File tree

19 files changed

+162
-124
lines changed

19 files changed

+162
-124
lines changed

.github/workflows/k8s-publish-test-base-image.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

framework/.changeset/v0.11.10.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Only Loki + Grafana obs stack

framework/components/dockercompose/billing_platform_service/billing_platform_service.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,12 @@ func NewWithContext(ctx context.Context, in *Input) (*Output, error) {
126126
envVars["MAINNET_WORKFLOW_REGISTRY_CHAIN_SELECTOR"] = strconv.FormatUint(in.ChainSelector, 10)
127127
envVars["MAINNET_WORKFLOW_REGISTRY_CONTRACT_ADDRESS"] = in.WorkflowRegistryAddress
128128
envVars["MAINNET_WORKFLOW_REGISTRY_RPC_URL"] = in.RPCURL
129-
envVars["MAINNET_WORKFLOW_REGISTRY_FINALITY_DEPTH"] = "0" // Instant finality on devnet
130-
envVars["KMS_PROOF_SIGNING_KEY_ID"] = "00000000-0000-0000-0000-000000000001" // provisioned via LocalStack
131-
envVars["VERIFIER_INITIAL_INTERVAL"] = "0s" // reduced to force verifier to start immediately in integration tests
132-
envVars["VERIFIER_MAXIMUM_INTERVAL"] = "1s" // reduced to force verifier to start immediately in integration tests
133-
envVars["LINKING_REQUEST_COOLDOWN"] = "0s" // reduced to force consequtive linking requests to be processed immediately in integration tests
129+
envVars["MAINNET_WORKFLOW_REGISTRY_FINALITY_DEPTH"] = "0" // Instant finality on devnet
130+
envVars["KMS_PROOF_SIGNING_KEY_ID"] = "00000000-0000-0000-0000-000000000001" // provisioned via LocalStack
131+
envVars["VERIFIER_INITIAL_INTERVAL"] = "0s" // reduced to force verifier to start immediately in integration tests
132+
envVars["VERIFIER_MAXIMUM_INTERVAL"] = "1s" // reduced to force verifier to start immediately in integration tests
133+
envVars["LINKING_REQUEST_COOLDOWN"] = "0s" // reduced to force consequtive linking requests to be processed immediately in integration tests
134+
envVars["ETH_FEED_ID"] = "0x000359843a543ee2fe414dc14c7e7920ef10f4372990b79d6361cdc0dd1ba782" // set as default eth feed ID
134135

135136
envVars["MAINNET_CAPABILITIES_REGISTRY_CHAIN_SELECTOR"] = strconv.FormatUint(in.ChainSelector, 10)
136137
envVars["MAINNET_CAPABILITIES_REGISTRY_CONTRACT_ADDRESS"] = in.CapabilitiesRegistryAddress

framework/components/dockercompose/billing_platform_service/docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ services:
4040
STREAMS_API_URL: ${STREAMS_API_URL:-}
4141
STREAMS_API_KEY: ${STREAMS_API_KEY:-}
4242
STREAMS_API_SECRET: ${STREAMS_API_SECRET:-}
43+
ETH_FEED_ID: ${ETH_FEED_ID:-}
4344
DB_HOST: postgres
4445
DB_PORT: 5432
4546
DB_NAME: billing_platform
@@ -99,6 +100,7 @@ services:
99100
TEST_OWNERS: ${TEST_OWNERS:-}
100101
DISABLE_AUTH: true
101102
MAINNET_CAPABILITIES_REGISTRY_CHAIN_SELECTOR: ${MAINNET_CAPABILITIES_REGISTRY_CHAIN_SELECTOR:-}
103+
ETH_FEED_ID: ${ETH_FEED_ID:-}
102104
DB_HOST: postgres
103105
DB_PORT: 5432
104106
DB_NAME: billing_platform

framework/observability.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,29 @@ func BlockScoutDown(url string) error {
121121
return RunCommand("bash", "-c", "rm -rf blockscout/")
122122
}
123123

124+
// ObservabilityUpOnlyLoki slim stack with only Loki to verify specific logs of CL nodes or services in tests
125+
func ObservabilityUpOnlyLoki() error {
126+
L.Info().Msg("Creating local observability stack")
127+
if err := extractAllFiles("observability"); err != nil {
128+
return err
129+
}
130+
_ = DefaultNetwork(nil)
131+
if err := NewPromtail(); err != nil {
132+
return err
133+
}
134+
err := RunCommand("bash", "-c", fmt.Sprintf(`
135+
cd %s && \
136+
docker compose up -d loki grafana
137+
`, "compose"))
138+
if err != nil {
139+
return err
140+
}
141+
fmt.Println()
142+
L.Info().Msgf("Loki: %s", LocalLogsURL)
143+
return nil
144+
}
145+
146+
// ObservabilityUp standard stack with logs/metrics for load testing and observability
124147
func ObservabilityUp() error {
125148
L.Info().Msg("Creating local observability stack")
126149
if err := extractAllFiles("observability"); err != nil {
@@ -145,6 +168,7 @@ func ObservabilityUp() error {
145168
return nil
146169
}
147170

171+
// ObservabilityUpFull full stack for load testing and performance investigations
148172
func ObservabilityUpFull() error {
149173
L.Info().Msg("Creating full local observability stack")
150174
if err := extractAllFiles("observability"); err != nil {

lib/.changeset/v1.54.7.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Upgrade remote runner for main.stage

lib/charts/chainlink/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: A Helm chart for Kubernetes
55
# This is the chart version. This version number should be incremented each time you make changes
66
# to the chart and its templates, including the app version.
77
# Versions are expected to follow Semantic Versioning (https://semver.org/)
8-
version: 0.2.14
8+
version: 0.2.15
99

1010
# This is the version number of the application being deployed. This version number should be
1111
# incremented each time you make changes to the application. Versions are not expected to

lib/charts/chainlink/templates/chainlink-cm.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ data:
1414
init.sql: |
1515
CREATE EXTENSION pg_stat_statements;
1616
default.toml: |
17-
RootDir = './clroot'
17+
RootDir = '/home/chainlink'
1818
1919
[Log]
2020
JSONConsole = true

lib/charts/chainlink/templates/chainlink-deployment.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,14 @@ spec:
103103
initialDelaySeconds: 15
104104
periodSeconds: 5
105105
failureThreshold: 20
106+
securityContext:
107+
allowPrivilegeEscalation: false
108+
runAsNonRoot: true
109+
runAsUser: 14933
110+
runAsGroup: 14933
111+
capabilities:
112+
drop:
113+
- ALL
106114
resources:
107115
requests:
108116
memory: {{ $.Values.chainlink.resources.requests.memory }}
@@ -123,4 +131,4 @@ spec:
123131
{{ toYaml . | indent 8 }}
124132
{{- end }}
125133
---
126-
{{- end }}
134+
{{- end }}

lib/charts/chainlink/templates/pg-deployment.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ spec:
5050
name: {{ $.Release.Name }}-{{ $cfg.name }}-cm
5151
containers:
5252
- name: chainlink-db
53+
securityContext:
54+
allowPrivilegeEscalation: false
55+
readOnlyRootFilesystem: false
56+
runAsNonRoot: true
57+
runAsUser: 999
5358
{{- $image := $.Values.db.image.image }}
5459
{{- $tag := $.Values.db.image.version }}
5560
{{- if $cfg.db }}
@@ -127,13 +132,17 @@ spec:
127132
name: {{ $.Release.Name }}-{{ $cfg.name }}-config-map
128133
subPath: init.sql
129134
{{ if $.Values.db.stateful }}
130-
volumeMounts:
131135
- mountPath: /var/lib/postgresql/data
132136
name: postgres
133137
subPath: postgres-db
134138
{{ end }}
135139
{{- if $.Values.db.enablePrometheusPostgresExporter }}
136140
- name: prometheus-postgres-exporter
141+
securityContext:
142+
allowPrivilegeEscalation: false
143+
readOnlyRootFilesystem: false
144+
runAsNonRoot: true
145+
runAsUser: 999
137146
image: {{ $.Values.prometheusPostgresExporter.image.image }}
138147
args: ["--collector.statio_user_indexes"]
139148
resources:
@@ -163,4 +172,4 @@ spec:
163172
{{ toYaml . | indent 8 }}
164173
{{- end }}
165174
---
166-
{{- end }}
175+
{{- end }}

0 commit comments

Comments
 (0)