Skip to content

Commit

Permalink
Merge branch 'develop' into master-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
MatusKysel committed Apr 5, 2023
2 parents 8eb5b49 + 809ba74 commit 455347e
Show file tree
Hide file tree
Showing 107 changed files with 2,114 additions and 1,303 deletions.
8 changes: 7 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,11 @@ commands:
--set consensusnode.persistence.enabled=true \
--set node.serviceMonitor.enabled=true \
--set bootnode.serviceMonitor.enabled=false \
--set consensusnode.serviceMonitor.enabled=true
--set consensusnode.serviceMonitor.enabled=true \
--set node.nodeSelector."cloud\\.google\\.com/gke-nodepool"=blockchain-prnet \
--set bootnode.nodeSelector."cloud\\.google\\.com/gke-nodepool"=blockchain-prnet \
--set consensusnode.nodeSelector."cloud\\.google\\.com/gke-nodepool"=blockchain-prnet \
--set node.indexer.enabled=true
fi
cleanup_prnet_chart:
Expand Down Expand Up @@ -568,6 +572,8 @@ jobs:
https://explorer-pr-<<pipeline.parameters.pr_number>>.prnet.taraxa.io </a></td></tr> \
<tr><td>RPC</td><td><a href=https://rpc-pr-<<pipeline.parameters.pr_number>>.prnet.taraxa.io >\
https://rpc-pr-<<pipeline.parameters.pr_number>>.prnet.taraxa.io </a></td></tr>\
<tr><td>Indexer</td><td><a href=https://indexer-pr-<<pipeline.parameters.pr_number>>.prnet.taraxa.io >\
https://indexer-pr-<<pipeline.parameters.pr_number>>.prnet.taraxa.io </a></td></tr>\
</table>\
<h4><p>Boot Nodes</p></h4>\
<table>\
Expand Down
13 changes: 11 additions & 2 deletions CMakeModules/cppcheck.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ else ()
--error-exitcode=1
--enable=all
--suppress=missingInclude
--suppress=useStlAlgorithm
# find_if - useless here
--suppress=useStlAlgorithm:${PROJECT_SOURCE_DIR}/*/pbft_sync_packet_handler.cpp
--suppress=noExplicitConstructor
--suppress=unknownMacro
# false positive
Expand All @@ -27,8 +28,16 @@ else ()
# TODO remove this when we solve correct exit of programs
--suppress=localMutex:${PROJECT_SOURCE_DIR}/*/main.cpp
# Just style warning
--suppress=unmatchedSuppression:${PROJECT_SOURCE_DIR}/*/final_chain.cpp
# exclude graphql generated
-i ${PROJECT_SOURCE_DIR}/libraries/core_libs/network/graphql/gen/
# messy files
--suppress=unmatchedSuppression:${PROJECT_SOURCE_DIR}/*/vector_ref.h
--suppress=unmatchedSuppression:${PROJECT_SOURCE_DIR}/*/Common.h
--suppress=cstyleCast:${PROJECT_SOURCE_DIR}/*/vector_ref.h
--suppress=cstyleCast:${PROJECT_SOURCE_DIR}/*/Common.h
#not an issue here
--suppress=virtualCallInConstructor:${PROJECT_SOURCE_DIR}/*/final_chain.cpp

# Only show found errors
"--quiet"

Expand Down
6 changes: 6 additions & 0 deletions charts/taraxa-node/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# do not include into git chart dependencies
charts/*.tgz

# Helm stuff
requirements.lock
Chart.lock
54 changes: 54 additions & 0 deletions charts/taraxa-node/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,53 @@
This file documents all notable changes to `taraxa-node` Helm Chart. The release
numbering uses [semantic versioning](http://semver.org).

## v0.3.9

### Major changes

* Rename / restrusture manifest files
* Added light nodes

### Minor changes

* Removed "@channel" from slack notifications

## v0.3.8

### Minor changes

* Added port for scrapping metrics from sidecar of rpc-nodes ([taraxa-indexer](https://github.com/Taraxa-project/taraxa-indexer))

## v0.3.7

### Minor changes

* Adds transaction generating service to replace the explorer faucet

## v0.3.6

### Minor changes

* Added labels into `StatefulSets` for [kube-monkey](https://github.com/asobti/kube-monkey)

## v0.3.5

### Minor changes

* Changed `db_path` to `data_dir` for taraxa-indexer

## v0.3.4

### Minor changes

* Enabled CORS on `Ingress` of indexer

## v0.3.3

### Major changes

* Added sidecar container to RPC nodes with [taraxa-indexer](https://github.com/Taraxa-project/taraxa-indexer)

## v0.3.2

### Minor changes
Expand All @@ -21,6 +68,13 @@ numbering uses [semantic versioning](http://semver.org).

* Separate config for genesis

## v0.2.5

### Minor changes

* Allow for different images in `StatefulSet`s for boot, rpc and consensus nodes


## v0.2.4

### Minor changes
Expand Down
2 changes: 1 addition & 1 deletion charts/taraxa-node/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "1.0"
description: Kubernetes helm chart for Taraxa blockchain full node implementation.
name: taraxa-node
version: 0.3.2
version: 0.3.9
keywords:
- blockchain
- taraxa
Expand Down
13 changes: 13 additions & 0 deletions charts/taraxa-node/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,19 @@ If release name contains chart name it will be used as a full name.
{{- end -}}
{{- end -}}

{{/*
Create a default fully qualified indexer name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "taraxa-node.indexerName" -}}
{{- if .Values.indexerNameOverride -}}
{{- .Values.indexerNameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s.%s" "indexer" .Release.Name .Values.domain | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}

{{/*
Create a default fully qualified graphql websocket.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
Expand Down
28 changes: 0 additions & 28 deletions charts/taraxa-node/templates/boot-nodes-services-loadbalancer.yaml

This file was deleted.

59 changes: 59 additions & 0 deletions charts/taraxa-node/templates/bootnode-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{{ if .Values.bootnode.enabled }}
{{- if .Values.bootnode.service.ports }}
# Note: This is a headless service
apiVersion: v1
kind: Service
metadata:
name: {{ include "taraxa-boot-node.fullname" . }}
labels:
name: boot-node
app.kubernetes.io/name: boot-node
helm.sh/chart: {{ include "taraxa-node.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
type: ClusterIP
clusterIP: None
selector:
app: boot-node
app.kubernetes.io/name: {{ .Release.Name }}-boot-node
app.kubernetes.io/instance: {{ .Release.Name }}
ports:
{{- range $port := .Values.bootnode.service.ports }}
- name: {{ $port.name | default $port.port }}
port: {{ $port.port }}
targetPort: {{ $port.targetPort | default $port.port }}
{{- if $port.protocol }}
protocol: {{ $port.protocol }}
{{- end }}
{{- end }}
{{- end }}

{{ if .Values.bootnode.loadBalancer.enabled }}
{{- range $key, $value := .Values.bootnode.loadBalancer.addresses }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ $.Release.Name }}-boot-node-udp-{{ $key }}
{{- with $.Values.bootnode.loadBalancer.serviceAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
name: {{ $.Release.Name }}-boot-node-udp-{{ $key }}
spec:
type: LoadBalancer
loadBalancerIP: {{ $value | quote }}
externalTrafficPolicy: Local
selector:
statefulset.kubernetes.io/pod-name: {{ $.Release.Name }}-boot-node-{{ $key }}
ports:
- name: udp-listen-port
port: 10002
targetPort: 10002
protocol: UDP
{{- end }}
{{- end }}

{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ metadata:
helm.sh/chart: {{ include "taraxa-node.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{ if .Values.kubemonkey.enabled }}
kube-monkey/enabled: enabled
kube-monkey/identifier: {{ include "taraxa-boot-node.fullname" . }}
kube-monkey/mtbf: {{ .Values.kubemonkey.mtbf | quote }}
kube-monkey/kill-mode: {{ .Values.kubemonkey.killMode | quote }}
kube-monkey/kill-value: {{ .Values.kubemonkey.killValue | quote }}
{{ end }}
spec:
replicas: {{ .Values.bootnode.replicaCount }}
serviceName: {{ include "taraxa-boot-node.fullname" . }}
Expand All @@ -29,13 +36,29 @@ spec:
partition: a
app.kubernetes.io/name: {{ .Release.Name }}-boot-node
app.kubernetes.io/instance: {{ .Release.Name }}
{{ if .Values.kubemonkey.enabled }}
kube-monkey/enabled: enabled
kube-monkey/identifier: {{ include "taraxa-boot-node.fullname" . }}
kube-monkey/mtbf: {{ .Values.kubemonkey.mtbf | quote }}
kube-monkey/kill-mode: {{ .Values.kubemonkey.killMode | quote }}
kube-monkey/kill-value: {{ .Values.kubemonkey.killValue | quote }}
{{ end }}
annotations:
kubernetes.io/change-cause: "Configuration through configmaps."
spec:
initContainers:
- name: config-adapter
{{- if and .Values.bootnode.image.repository .Values.bootnode.image.tag }}
image: "{{ .Values.bootnode.image.repository }}:{{ .Values.bootnode.image.tag }}"
{{- else }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
{{- end }}

{{- if .Values.bootnode.image.pullPolicy }}
imagePullPolicy: {{ .Values.bootnode.image.pullPolicy }}
{{- else }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- end }}
envFrom:
- secretRef:
name: {{ .Release.Name }}
Expand All @@ -54,8 +77,17 @@ spec:
mountPath: /root/.taraxa
containers:
- name: boot-node
{{- if and .Values.bootnode.image.repository .Values.bootnode.image.tag }}
image: "{{ .Values.bootnode.image.repository }}:{{ .Values.bootnode.image.tag }}"
{{- else }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
{{- end }}

{{- if .Values.bootnode.image.pullPolicy }}
imagePullPolicy: {{ .Values.bootnode.image.pullPolicy }}
{{- else }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- end }}
args:
{{- toYaml .Values.bootnode.args | nindent 12 }}
- --chain-id
Expand Down
Loading

0 comments on commit 455347e

Please sign in to comment.