-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add atlas-evm-events and atlas-evm-receipts to the atlas stack for e2…
…e testing (#131) * Add atlas-evm-blocks to the atlas stack for e2e testing * in progress * in progress * optimize resources
- Loading branch information
1 parent
e3ed5c4
commit 22d5e3a
Showing
15 changed files
with
312 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package client | ||
|
||
import "net/http" | ||
|
||
// KafkaRestClient kafka-rest client | ||
type KafkaRestClient struct { | ||
*BasicHTTPClient | ||
Config *KafkaRestConfig | ||
} | ||
|
||
// KafkaRestConfig holds config information for KafkaRestClient | ||
type KafkaRestConfig struct { | ||
URL string | ||
} | ||
|
||
// NewKafkaRestClient creates a new KafkaRestClient | ||
func NewKafkaRestClient(cfg *KafkaRestConfig) *KafkaRestClient { | ||
return &KafkaRestClient{ | ||
Config: cfg, | ||
BasicHTTPClient: NewBasicHTTPClient(&http.Client{}, cfg.URL), | ||
} | ||
} | ||
|
||
// GetTopics Get a list of Kafka topics. | ||
func (krc *KafkaRestClient) GetTopics() ([]string, error) { | ||
responseBody := []string{} | ||
_, err := krc.do(http.MethodGet, "/topics", nil, &responseBody, http.StatusOK) | ||
return responseBody, err | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
environment/templates/atlas-evm/atlas-evm-events-deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
metadata: | ||
name: atlas-evm-events | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: atlas-evm-events | ||
template: | ||
objectmeta: | ||
labels: | ||
app: atlas-evm-events | ||
spec: | ||
containers: | ||
- name: atlas-evm-events | ||
args: | ||
- events | ||
env: | ||
- name: KAFKA_BROKERS | ||
value: {{ .Values.KafkaGroup.kafka.clusterURL }} | ||
- name: KAFKA_CLIENT_ID | ||
value: "explorer" | ||
- name: KAFKA_SCHEMA_REGISTRY_URL | ||
value: {{ .Values.SchemaRegistryGroup.schema_registry.clusterURL }} | ||
- name: KAFKA_SECURITY_PROTOCOL | ||
value: PLAINTEXT | ||
- name: LOG_LEVEL | ||
value: debug | ||
- name: RPC_ENDPOINTS | ||
value: {{ .DefaultNetwork.ClusterURL }} | ||
- name: CHAIN_ID | ||
value: {{ .DefaultNetwork.ChainID }} | ||
- name: NETWORK_NAME | ||
value: {{ .DefaultNetwork.Name }} | ||
image: {{ .Config.Apps.AtlasEvm.Image }}:{{ .Config.Apps.AtlasEvm.Version }} | ||
ports: | ||
- containerPort: 9090 | ||
resources: | ||
requests: | ||
memory: 200M | ||
cpu: 0.25 | ||
limits: | ||
memory: 350m | ||
cpu: 0.4 |
10 changes: 10 additions & 0 deletions
10
environment/templates/atlas-evm/atlas-evm-events-service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
metadata: | ||
name: atlas-evm-events | ||
spec: | ||
ports: | ||
- name: "9095" | ||
port: 9095 | ||
targetPort: 9090 | ||
selector: | ||
app: atlas-evm-events | ||
type: ClusterIP |
43 changes: 43 additions & 0 deletions
43
environment/templates/atlas-evm/atlas-evm-receipts-deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
metadata: | ||
name: atlas-evm-receipts | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: atlas-evm-receipts | ||
template: | ||
objectmeta: | ||
labels: | ||
app: atlas-evm-receipts | ||
spec: | ||
containers: | ||
- name: atlas-evm-receipts | ||
args: | ||
- receipts | ||
env: | ||
- name: KAFKA_BROKERS | ||
value: {{ .Values.KafkaGroup.kafka.clusterURL }} | ||
- name: KAFKA_CLIENT_ID | ||
value: "explorer" | ||
- name: KAFKA_SCHEMA_REGISTRY_URL | ||
value: {{ .Values.SchemaRegistryGroup.schema_registry.clusterURL }} | ||
- name: KAFKA_SECURITY_PROTOCOL | ||
value: PLAINTEXT | ||
- name: LOG_LEVEL | ||
value: debug | ||
- name: RPC_ENDPOINTS | ||
value: {{ .DefaultNetwork.ClusterURL }} | ||
- name: CHAIN_ID | ||
value: {{ .DefaultNetwork.ChainID }} | ||
- name: NETWORK_NAME | ||
value: {{ .DefaultNetwork.Name }} | ||
image: {{ .Config.Apps.AtlasEvm.Image }}:{{ .Config.Apps.AtlasEvm.Version }} | ||
ports: | ||
- containerPort: 9090 | ||
resources: | ||
requests: | ||
memory: 200M | ||
cpu: 0.25 | ||
limits: | ||
memory: 350m | ||
cpu: 0.4 |
10 changes: 10 additions & 0 deletions
10
environment/templates/atlas-evm/atlas-evm-receipts-service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
metadata: | ||
name: atlas-evm-receipts | ||
spec: | ||
ports: | ||
- name: "9094" | ||
port: 9094 | ||
targetPort: 9090 | ||
selector: | ||
app: atlas-evm-receipts | ||
type: ClusterIP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.