-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: node config per node type (#16)
* feat: node config per node type Signed-off-by: Smuu <[email protected]> * feat: config per type Signed-off-by: Smuu <[email protected]> * fix: condition Signed-off-by: Smuu <[email protected]> --------- Signed-off-by: Smuu <[email protected]>
- Loading branch information
Showing
21 changed files
with
996 additions
and
280 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ template "common.names.fullname" . }}-address | ||
namespace: {{ include "common.names.namespace" . | quote }} | ||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} | ||
app.kubernetes.io/component: node | ||
{{- if .Values.commonAnnotations }} | ||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
data: | ||
address: {{ .Values.node.settings.address }} |
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,87 @@ | ||
{{- if eq .Values.node.settings.nodeType "bridge" }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ template "common.names.fullname" . }}-configtoml | ||
namespace: {{ include "common.names.namespace" . | quote }} | ||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} | ||
app.kubernetes.io/component: node | ||
{{- if .Values.commonAnnotations }} | ||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
data: | ||
config.toml: | | ||
[Node] | ||
StartupTimeout = "{{ .Values.node.config.bridge.configtoml.Node.StartupTimeout }}" | ||
ShutdownTimeout = "{{ .Values.node.config.bridge.configtoml.Node.ShutdownTimeout }}" | ||
[Core] | ||
IP = "{{ .Values.node.config.bridge.configtoml.Core.IP }}" | ||
RPCPort = "{{ .Values.node.config.bridge.configtoml.Core.RPCPort }}" | ||
GRPCPort = "{{ .Values.node.config.bridge.configtoml.Core.GRPCPort }}" | ||
[State] | ||
KeyringAccName = "{{ .Values.node.config.bridge.configtoml.State.KeyringAccName }}" | ||
KeyringBackend = "{{ .Values.node.config.bridge.configtoml.State.KeyringBackend }}" | ||
GranterAddress = {{ .Values.node.config.bridge.configtoml.State.GranterAddress }} | ||
[P2P] | ||
ListenAddresses = [{{ range $index, $element := .Values.node.config.bridge.configtoml.P2P.ListenAddresses }}{{ if $index }}, {{ end }}"{{ $element }}"{{ end }}] | ||
AnnounceAddresses = {{ .Values.node.config.bridge.configtoml.P2P.AnnounceAddresses }} | ||
NoAnnounceAddresses = [{{ range $index, $element := .Values.node.config.bridge.configtoml.P2P.NoAnnounceAddresses }}{{ if $index }}, {{ end }}"{{ $element }}"{{ end }}] | ||
MutualPeers = {{ .Values.node.config.bridge.configtoml.P2P.MutualPeers }} | ||
PeerExchange = {{ .Values.node.config.bridge.configtoml.P2P.PeerExchange }} | ||
RoutingTableRefreshPeriod = "{{ .Values.node.config.bridge.configtoml.P2P.RoutingTableRefreshPeriod }}" | ||
[P2P.ConnManager] | ||
Low = {{ printf "%.0f" .Values.node.config.bridge.configtoml.P2P.ConnManager.Low }} | ||
High = {{ printf "%.0f" .Values.node.config.bridge.configtoml.P2P.ConnManager.High }} | ||
GracePeriod = "{{ .Values.node.config.bridge.configtoml.P2P.ConnManager.GracePeriod }}" | ||
[RPC] | ||
Address = "{{ .Values.node.config.bridge.configtoml.RPC.Address }}" | ||
Port = "{{ .Values.node.config.bridge.configtoml.RPC.Port }}" | ||
SkipAuth = {{ .Values.node.config.bridge.configtoml.RPC.SkipAuth }} | ||
[Gateway] | ||
Address = "{{ .Values.node.config.bridge.configtoml.Gateway.Address }}" | ||
Port = "{{ .Values.node.config.bridge.configtoml.Gateway.Port }}" | ||
Enabled = {{ .Values.node.config.bridge.configtoml.Gateway.Enabled }} | ||
[Share] | ||
UseShareExchange = {{ .Values.node.config.bridge.configtoml.Share.UseShareExchange }} | ||
[Share.EDSStoreParams] | ||
GCInterval = "{{ .Values.node.config.bridge.configtoml.Share.EDSStoreParams.GCInterval }}" | ||
RecentBlocksCacheSize = {{ printf "%.0f" .Values.node.config.bridge.configtoml.Share.EDSStoreParams.RecentBlocksCacheSize }} | ||
BlockstoreCacheSize = {{ printf "%.0f" .Values.node.config.bridge.configtoml.Share.EDSStoreParams.BlockstoreCacheSize }} | ||
[Share.ShrExEDSParams] | ||
ServerReadTimeout = "{{ .Values.node.config.bridge.configtoml.Share.ShrExEDSParams.ServerReadTimeout }}" | ||
ServerWriteTimeout = "{{ .Values.node.config.bridge.configtoml.Share.ShrExEDSParams.ServerWriteTimeout }}" | ||
HandleRequestTimeout = "{{ .Values.node.config.bridge.configtoml.Share.ShrExEDSParams.HandleRequestTimeout }}" | ||
ConcurrencyLimit = {{ printf "%.0f" .Values.node.config.bridge.configtoml.Share.ShrExEDSParams.ConcurrencyLimit }} | ||
BufferSize = {{ printf "%.0f" .Values.node.config.bridge.configtoml.Share.ShrExEDSParams.BufferSize }} | ||
[Share.ShrExNDParams] | ||
ServerReadTimeout = "{{ .Values.node.config.bridge.configtoml.Share.ShrExNDParams.ServerReadTimeout }}" | ||
ServerWriteTimeout = "{{ .Values.node.config.bridge.configtoml.Share.ShrExNDParams.ServerWriteTimeout }}" | ||
HandleRequestTimeout = "{{ .Values.node.config.bridge.configtoml.Share.ShrExNDParams.HandleRequestTimeout }}" | ||
ConcurrencyLimit = {{ printf "%.0f" .Values.node.config.bridge.configtoml.Share.ShrExNDParams.ConcurrencyLimit }} | ||
[Share.PeerManagerParams] | ||
PoolValidationTimeout = "{{ .Values.node.config.bridge.configtoml.Share.PeerManagerParams.PoolValidationTimeout }}" | ||
PeerCooldown = "{{ .Values.node.config.bridge.configtoml.Share.PeerManagerParams.PeerCooldown }}" | ||
GcInterval = "{{ .Values.node.config.bridge.configtoml.Share.PeerManagerParams.GcInterval }}" | ||
EnableBlackListing = {{ .Values.node.config.bridge.configtoml.Share.PeerManagerParams.EnableBlackListing }} | ||
[Share.Discovery] | ||
PeersLimit = {{ printf "%.0f" .Values.node.config.bridge.configtoml.Share.Discovery.PeersLimit }} | ||
AdvertiseInterval = "{{ .Values.node.config.bridge.configtoml.Share.Discovery.AdvertiseInterval }}" | ||
[Header] | ||
TrustedHash = "{{ .Values.node.config.bridge.configtoml.Header.TrustedHash }}" | ||
TrustedPeers = {{ .Values.node.config.bridge.configtoml.Header.TrustedPeers }} | ||
[Header.Store] | ||
StoreCacheSize = {{ printf "%.0f" .Values.node.config.bridge.configtoml.Header.Store.StoreCacheSize }} | ||
IndexCacheSize = {{ printf "%.0f" .Values.node.config.bridge.configtoml.Header.Store.IndexCacheSize }} | ||
WriteBatchSize = {{ printf "%.0f" .Values.node.config.bridge.configtoml.Header.Store.WriteBatchSize }} | ||
[Header.Syncer] | ||
TrustingPeriod = "{{ .Values.node.config.bridge.configtoml.Header.Syncer.TrustingPeriod }}" | ||
[Header.Server] | ||
WriteDeadline = "{{ .Values.node.config.bridge.configtoml.Header.Server.WriteDeadline }}" | ||
ReadDeadline = "{{ .Values.node.config.bridge.configtoml.Header.Server.ReadDeadline }}" | ||
RangeRequestTimeout = "{{ .Values.node.config.bridge.configtoml.Header.Server.RangeRequestTimeout }}" | ||
[Header.Client] | ||
MaxHeadersPerRangeRequest = {{ printf "%.0f" .Values.node.config.bridge.configtoml.Header.Client.MaxHeadersPerRangeRequest }} | ||
RangeRequestTimeout = "{{ .Values.node.config.bridge.configtoml.Header.Client.RangeRequestTimeout }}" | ||
[Pruner] | ||
EnableService = {{ .Values.node.config.bridge.configtoml.Pruner.EnableService }} | ||
{{- end }} |
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,93 @@ | ||
{{- if eq .Values.node.settings.nodeType "full" }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ template "common.names.fullname" . }}-configtoml | ||
namespace: {{ include "common.names.namespace" . | quote }} | ||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} | ||
app.kubernetes.io/component: node | ||
{{- if .Values.commonAnnotations }} | ||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
data: | ||
config.toml: | | ||
[Node] | ||
StartupTimeout = "{{ .Values.node.config.full.configtoml.Node.StartupTimeout }}" | ||
ShutdownTimeout = "{{ .Values.node.config.full.configtoml.Node.ShutdownTimeout }}" | ||
[Core] | ||
IP = "{{ .Values.node.config.full.configtoml.Core.IP }}" | ||
RPCPort = "{{ .Values.node.config.full.configtoml.Core.RPCPort }}" | ||
GRPCPort = "{{ .Values.node.config.full.configtoml.Core.GRPCPort }}" | ||
[State] | ||
KeyringAccName = "{{ .Values.node.config.full.configtoml.State.KeyringAccName }}" | ||
KeyringBackend = "{{ .Values.node.config.full.configtoml.State.KeyringBackend }}" | ||
GranterAddress = {{ .Values.node.config.full.configtoml.State.GranterAddress }} | ||
[P2P] | ||
ListenAddresses = [{{ range $index, $element := .Values.node.config.full.configtoml.P2P.ListenAddresses }}{{ if $index }}, {{ end }}"{{ $element }}"{{ end }}] | ||
AnnounceAddresses = {{ .Values.node.config.full.configtoml.P2P.AnnounceAddresses }} | ||
NoAnnounceAddresses = [{{ range $index, $element := .Values.node.config.full.configtoml.P2P.NoAnnounceAddresses }}{{ if $index }}, {{ end }}"{{ $element }}"{{ end }}] | ||
MutualPeers = {{ .Values.node.config.full.configtoml.P2P.MutualPeers }} | ||
PeerExchange = {{ .Values.node.config.full.configtoml.P2P.PeerExchange }} | ||
RoutingTableRefreshPeriod = "{{ .Values.node.config.full.configtoml.P2P.RoutingTableRefreshPeriod }}" | ||
[P2P.ConnManager] | ||
Low = {{ printf "%.0f" .Values.node.config.full.configtoml.P2P.ConnManager.Low }} | ||
High = {{ printf "%.0f" .Values.node.config.full.configtoml.P2P.ConnManager.High }} | ||
GracePeriod = "{{ .Values.node.config.full.configtoml.P2P.ConnManager.GracePeriod }}" | ||
[RPC] | ||
Address = "{{ .Values.node.config.full.configtoml.RPC.Address }}" | ||
Port = "{{ .Values.node.config.full.configtoml.RPC.Port }}" | ||
SkipAuth = {{ .Values.node.config.full.configtoml.RPC.SkipAuth }} | ||
[Gateway] | ||
Address = "{{ .Values.node.config.full.configtoml.Gateway.Address }}" | ||
Port = "{{ .Values.node.config.full.configtoml.Gateway.Port }}" | ||
Enabled = {{ .Values.node.config.full.configtoml.Gateway.Enabled }} | ||
[Share] | ||
UseShareExchange = {{ .Values.node.config.full.configtoml.Share.UseShareExchange }} | ||
[Share.EDSStoreParams] | ||
GCInterval = "{{ .Values.node.config.full.configtoml.Share.EDSStoreParams.GCInterval }}" | ||
RecentBlocksCacheSize = {{ printf "%.0f" .Values.node.config.full.configtoml.Share.EDSStoreParams.RecentBlocksCacheSize }} | ||
BlockstoreCacheSize = {{ printf "%.0f" .Values.node.config.full.configtoml.Share.EDSStoreParams.BlockstoreCacheSize }} | ||
[Share.ShrExEDSParams] | ||
ServerReadTimeout = "{{ .Values.node.config.full.configtoml.Share.ShrExEDSParams.ServerReadTimeout }}" | ||
ServerWriteTimeout = "{{ .Values.node.config.full.configtoml.Share.ShrExEDSParams.ServerWriteTimeout }}" | ||
HandleRequestTimeout = "{{ .Values.node.config.full.configtoml.Share.ShrExEDSParams.HandleRequestTimeout }}" | ||
ConcurrencyLimit = {{ printf "%.0f" .Values.node.config.full.configtoml.Share.ShrExEDSParams.ConcurrencyLimit }} | ||
BufferSize = {{ printf "%.0f" .Values.node.config.full.configtoml.Share.ShrExEDSParams.BufferSize }} | ||
[Share.ShrExNDParams] | ||
ServerReadTimeout = "{{ .Values.node.config.full.configtoml.Share.ShrExNDParams.ServerReadTimeout }}" | ||
ServerWriteTimeout = "{{ .Values.node.config.full.configtoml.Share.ShrExNDParams.ServerWriteTimeout }}" | ||
HandleRequestTimeout = "{{ .Values.node.config.full.configtoml.Share.ShrExNDParams.HandleRequestTimeout }}" | ||
ConcurrencyLimit = {{ printf "%.0f" .Values.node.config.full.configtoml.Share.ShrExNDParams.ConcurrencyLimit }} | ||
[Share.PeerManagerParams] | ||
PoolValidationTimeout = "{{ .Values.node.config.full.configtoml.Share.PeerManagerParams.PoolValidationTimeout }}" | ||
PeerCooldown = "{{ .Values.node.config.full.configtoml.Share.PeerManagerParams.PeerCooldown }}" | ||
GcInterval = "{{ .Values.node.config.full.configtoml.Share.PeerManagerParams.GcInterval }}" | ||
EnableBlackListing = {{ .Values.node.config.full.configtoml.Share.PeerManagerParams.EnableBlackListing }} | ||
[Share.Discovery] | ||
PeersLimit = {{ printf "%.0f" .Values.node.config.full.configtoml.Share.Discovery.PeersLimit }} | ||
AdvertiseInterval = "{{ .Values.node.config.full.configtoml.Share.Discovery.AdvertiseInterval }}" | ||
[Header] | ||
TrustedHash = "{{ .Values.node.config.full.configtoml.Header.TrustedHash }}" | ||
TrustedPeers = {{ .Values.node.config.full.configtoml.Header.TrustedPeers }} | ||
[Header.Store] | ||
StoreCacheSize = {{ printf "%.0f" .Values.node.config.full.configtoml.Header.Store.StoreCacheSize }} | ||
IndexCacheSize = {{ printf "%.0f" .Values.node.config.full.configtoml.Header.Store.IndexCacheSize }} | ||
WriteBatchSize = {{ printf "%.0f" .Values.node.config.full.configtoml.Header.Store.WriteBatchSize }} | ||
[Header.Syncer] | ||
TrustingPeriod = "{{ .Values.node.config.full.configtoml.Header.Syncer.TrustingPeriod }}" | ||
[Header.Server] | ||
WriteDeadline = "{{ .Values.node.config.full.configtoml.Header.Server.WriteDeadline }}" | ||
ReadDeadline = "{{ .Values.node.config.full.configtoml.Header.Server.ReadDeadline }}" | ||
RangeRequestTimeout = "{{ .Values.node.config.full.configtoml.Header.Server.RangeRequestTimeout }}" | ||
[Header.Client] | ||
MaxHeadersPerRangeRequest = {{ printf "%.0f" .Values.node.config.full.configtoml.Header.Client.MaxHeadersPerRangeRequest }} | ||
RangeRequestTimeout = "{{ .Values.node.config.full.configtoml.Header.Client.RangeRequestTimeout }}" | ||
[DASer] | ||
SamplingRange = {{ printf "%.0f" .Values.node.config.full.configtoml.DASer.SamplingRange }} | ||
ConcurrencyLimit = {{ printf "%.0f" .Values.node.config.full.configtoml.DASer.ConcurrencyLimit }} | ||
BackgroundStoreInterval = "{{ .Values.node.config.full.configtoml.DASer.BackgroundStoreInterval }}" | ||
SampleFrom = {{ printf "%.0f" .Values.node.config.full.configtoml.DASer.SampleFrom }} | ||
SampleTimeout = "{{ .Values.node.config.full.configtoml.DASer.SampleTimeout }}" | ||
[Pruner] | ||
EnableService = {{ .Values.node.config.full.configtoml.Pruner.EnableService }} | ||
{{- end }} |
Oops, something went wrong.