provider

by Lava

Helm chartv1.3.2App v2.5.0Apache-2.0Verified publisher

Lava helm chart for the provider service

About this chart

provider

Lava helm chart for the provider service

Lavanet Provider Helm Chart

This Helm chart deploys a Lavanet provider service, which serves as a crucial component of the Lava network.

Lavanet providers are essential participants in the Lava ecosystem, responsible for:

  • Servicing relay requests from consumers
  • Staking on the Lava network
  • Operating RPC nodes on various Relay Chains (e.g., Cosmos, Ethereum, Osmosis, Polygon)

Providers earn LAVA tokens as fees for fulfilling these requests, creating an incentive-driven decentralized infrastructure.

Prerequisites

Before deploying the provider chart you'll need to do two imporatnt things:

  • Create wallet and export it, or export an existing one
  • Create configuration for the provider

Create wallet

In order to create a new wallet, make sure you have lavap CLI installed and run:

lavap keys add my-key

After that export the key by running:

lavap keys export my-key

Enter a password for the exported key, it's important that you note it for the next steps.

Apply wallet secrets to kubernetes

Encode both exported key and your password on base64:

base64 -w 0 <<EOF
-----BEGIN TENDERMINT PRIVATE KEY-----
kdf: bcrypt
salt: 5A21556CF5842BDEF9B9949418B0E0B8
type: secp256k1

******ngpVQsF7xr3jBFtNXUhQN4Q0pwDvRk8jQ1ubTyE/j8vg9q811iqb7gD
P7ZmrGWPZLrTvh******/InhEHq1vlLIEc9fk8=
=aGWZ
-----END TENDERMINT PRIVATE KEY-----
EOF
echo "12345678" | base64

Add two new secrets to your namespace containing the encoded exported key and the passphrase:

cat > exported-key.yaml << EOF
apiVersion: v1
kind: Secret
type: Opaque
metadata:
  name: wallet
data:
  key: >-
    LS0tLS1CRUdJTiBURU5ERVJNSU5UIFBSSVZBVEUgS0VZLS0tLS0Ka2RmOiBiY3J5cHQKc2FsdDogNUEyMTU1NkNGNTg0MkJERUY5Qjk5NDk0MThCMEUwQjgKdHlwZTogc2VjcDI1NmsxCgoqKioqKipuZ3BWUXNGN3hyM2pCRnROWFVoUU40UTBwd0R2Ums4alExdWJUeUUvajh2ZzlxODExaXFiN2dEClA3Wm1yR1dQWkxyVHZoKioqKioqL0luaEVIcTF2bExJRWM5Zms4PQo9YUdXWgotLS0tLUVORCBURU5ERVJNSU5UIFBSSVZBVEUgS0VZLS0tLS0K
  password: MTIzNDU2NzgK
EOF

kubectl apply -f exported-key.yaml -n my-namespace

Create secert configuration for provider

Most provider configurations point to secure nodes and should remain encrypted on the cluster. For this you'll have to create another secert containing the entire nodes' configuration, for example:

base64 -w 0 <<EOF
metrics-listen-address: ":3200"
endpoints:
  - api-interface: rest
    chain-id: LAVA
    network-address:
      address: "0.0.0.0:2200"
      disable-tls: true
    node-urls:
      - url: "https://****/rest/"
      - url: "https://****/rest/"
        skip-verifications:
          - pruning
        addons:
          - archive
  - api-interface: tendermintrpc
    chain-id: LAVA
    network-address:
      address: "0.0.0.0:2200"
      disable-tls: true
    node-urls:
      - url: "https://****/rpc/"
      - url: "https://****/rpc/"
        skip-verifications:
          - pruning
        addons:
          - archive
  - api-interface: grpc
    chain-id: LAVA
    network-address:
      address: "0.0.0.0:2200"
      disable-tls: true
    node-urls:
      - url: "****:443"
      - url: "****:443"
        skip-verifications:
          - pruning
        addons:
          - archive
EOF

Like before, you need to apply the config as a secret:

cat > provider-config.yaml << EOF
apiVersion: v1
kind: Secret
type: Opaque
metadata:
  name: provider-config
data:
  config.yml: >-
    bWV0cmljcy1saXN0ZW4tYWRkcmVzczogIjozMjAwIgplbmRwb2ludHM6CiAgLSBhcGktaW50ZXJmYWNlOiByZXN0CiAgICBjaGFpbi1pZDogTEFWMQogICAgbmV0d29yay1hZGRyZXNzOgogICAgICBhZGRyZXNzOiAiMC4wLjAuMDoyMjAwIgogICAgICBkaXNhYmxlLXRsczogdHJ1ZQogICAgbm9kZS11cmxzOgogICAgICAtIHVybDogImh0dHBzOi8vKioqKi9yZXN0LyIKICAgICAgLSB1cmw6ICJodHRwczovLyoqKiovcmVzdC8iCiAgICAgICAgc2tpcC12ZXJpZmljYXRpb25zOgogICAgICAgICAgLSBwcnVuaW5nCiAgICAgICAgYWRkb25zOgogICAgICAgICAgLSBhcmNoaXZlCiAgLSBhcGktaW50ZXJmYWNlOiB0ZW5kZXJtaW50cnBjCiAgICBjaGFpbi1pZDogTEFWMQogICAgbmV0d29yay1hZGRyZXNzOgogICAgICBhZGRyZXNzOiAiMC4wLjAuMDoyMjAwIgogICAgICBkaXNhYmxlLXRsczogdHJ1ZQogICAgbm9kZS11cmxzOgogICAgICAtIHVybDogImh0dHBzOi8vKioqKi9ycGMvIgogICAgICAtIHVybDogImh0dHBzOi8vKioqKi9ycGMvIgogICAgICAgIHNraXAtdmVyaWZpY2F0aW9uczoKICAgICAgICAgIC0gcHJ1bmluZwogICAgICAgIGFkZG9uczoKICAgICAgICAgIC0gYXJjaGl2ZQogIC0gYXBpLWludGVyZmFjZTogZ3JwYwogICAgY2hhaW4taWQ6IExBVjEKICAgIG5ldHdvcmstYWRkcmVzczoKICAgICAgYWRkcmVzczogIjAuMC4wLjA6MjIwMCIKICAgICAgZGlzYWJsZS10bHM6IHRydWUKICAgIG5vZGUtdXJsczoKICAgICAgLSB1cmw6ICIqKioqOjQ0MyIKICAgICAgLSB1cmw6ICIqKioqOjQ0MyIKICAgICAgICBza2lwLXZlcmlmaWNhdGlvbnM6CiAgICAgICAgICAtIHBydW5pbmcKICAgICAgICBhZGRvbnM6CiAgICAgICAgICAtIGFyY2hpdmUK
EOF

kubectl apply -f provider-config.yaml -n my-namespace

Modify values file

The final step is to refrence the newly created secrets in the chart's values file:

# values.yaml
service:
  port: 2200

key:
  secretName: "wallet"
  secretKey: "key"
  passwordSecretName: "wallet"
  passwordSecretKey: "password"

chains:
  - name: my-lava-provider
    id: lava
    existingConfigSecret: "provider-config"
    existingConfigSecretKey: "config.yml"

Installing the Chart

To install the chart with the release name my-provider:

helm repo add lavanet https://lavanet.github.io/helm-charts
helm repo update
helm install my-provider lavanet/provider -n lava-system --create-namespace

Requirements

Kubernetes: >=1.25.0-0

Values

KeyTypeDefaultDescription
additionalArgslist[]Lavap provider additional CLI arguments
affinityobject{}Assign custom [affinity] rules to the deployment
autoscaling.behaviorobject{}Configures the scaling behavior of the target in both Up and Down directions.
autoscaling.enabledboolfalseEnable Horizontal Pod Autoscaler ([HPA]) for the Provider
autoscaling.maxReplicasint5Maximum number of replicas for the Provider [HPA]
autoscaling.minReplicasint1Minimum number of replicas for the Provider [HPA]
autoscaling.targetCPUUtilizationPercentageint50Average CPU utilization percentage for the Provider [HPA]
autoscaling.targetMemoryUtilizationPercentageint50Average memory utilization percentage for the Provider [HPA]
cache.addressstring"provider-cache:20100"Provider cache address
cache.enabledbooltrueEnable provider cache supports
certificate.additionalHostslist[]Certificate Subject Alternate Names (SANs)
certificate.annotationsobject{}Annotations to be applied to the Server Certificate
certificate.domainstring"" (defaults to global.domain)Certificate primary domain (commonName)
certificate.durationstring"" (defaults to 2160h = 90d if not specified)The requested 'duration' (i.e. lifetime) of the certificate. # Ref: https://cert-manager.io/docs/usage/certificate/#renewal
certificate.enabledboolfalseDeploy a Certificate resource (requires cert-manager)
certificate.issuer.groupstring""Certificate issuer group. Set if using an external issuer. Eg. cert-manager.io
certificate.issuer.kindstring"ClusterIssuer"Certificate issuer kind. Either Issuer or ClusterIssuer
certificate.issuer.namestring"selfsigned"Certificate issuer name. Eg. letsencrypt
certificate.privateKey.algorithmstring"RSA"Algorithm used to generate certificate private key. One of: RSA, Ed25519 or ECDSA
certificate.privateKey.encodingstring"PKCS1"The private key cryptography standards (PKCS) encoding for private key. Either: PCKS1 or PKCS8
certificate.privateKey.rotationPolicystring"Never"Rotation policy of private key when certificate is re-issued. Either: Never or Always
certificate.privateKey.sizeint2048Key bit size of the private key. If algorithm is set to Ed25519, size is ignored.
certificate.renewBeforestring"" (defaults to 360h = 15d if not specified)How long before the expiry a certificate should be renewed. # Ref: https://cert-manager.io/docs/usage/certificate/#renewal
certificate.secretTemplateAnnotationsobject{}Annotations that allow the certificate to be composed from data residing in existing Kubernetes Resources
certificate.usageslist[]Usages for the certificate ## Ref: https://cert-manager.io/docs/reference/api-docs/#cert-manager.io/v1.KeyUsage
chainIdstring"lava-mainnet-1"Lava chain id
deploymentUpdate.maxSurgestring"100%"
deploymentUpdate.maxUnavailableint0
deploymentUpdate.typestring"RollingUpdate"
fullnameOverridestring""String to fully override "provider.fullname"
geolocationstring"2"Provider geo-location can be one of the geolocations
global.domainstring"my-provider.local"Default domain used by all components # Used for ingresses, certificates, etc.
image.pullPolicystring"IfNotPresent"Image pull policy for the provider
image.repositorystring"ghcr.io/lavanet/lava/lavap"Repository to use for the provider
image.tagstring"" (defaults to Chart.appVersion)Tag to use for the provider
imagePullSecretslist[]Secrets with credentials to pull images from a private registry
ingressGrpc.annotationsobject{}Additional ingress annotations
ingressGrpc.classNamestring"nginx"Defines which ingress controller will implement the resource
ingressGrpc.enabledboolfalseEnable an ingress resource for the provider
ingressGrpc.labelsobject{}Additional ingress labels
ingressGrpc.pathstring"/"The path to Provider
ingressGrpc.pathTypestring"Prefix"Ingress path type. One of Exact, Prefix or ImplementationSpecific
ingressGrpc.tlsbooltrueEnable TLS configuration for the domain defined at global.domain # TLS certificate will be retrieved from a TLS secret with name: provider-grpc-tls
ingressGrpc.tlsSecretNamestringnilCustom Ingress TLS secret
keyobject{"passwordSecretKey":"password","passwordSecretName":"wallet","secretKey":"key","secretName":"wallet"}Information about the private key to use for the node
key.passwordSecretKeystring"password"The key in the secret that contains the password for the private key
key.passwordSecretNamestring"wallet"The secret that contains the password for the private key
key.secretKeystring"key"The key in the secret to use
key.secretNamestring"wallet"The secret name containing the private key
keyringBackendstring"test"Provider keyring backend
livenessProbe.failureThresholdint3Minimum consecutive failures for the [probe] to be considered failed after having succeeded
livenessProbe.initialDelaySecondsint10Number of seconds after the container has started before [probe] is initiated
livenessProbe.periodSecondsint10How often (in seconds) to perform the [probe]
livenessProbe.schemestring"HTTPS"Schema of the [probe], can be HTTP or HTTPS
livenessProbe.successThresholdint1Minimum consecutive successes for the [probe] to be considered successful after having failed
livenessProbe.timeoutSecondsint1Number of seconds after which the [probe] times out
log.formatstring"json"Provider log format, can be json or text
log.levelstring"info"Provider log level
metrics.enabledbooltrueShould enable prometheus metrics
metrics.portint3200Metrics service port
metrics.serviceMonitor.additionalLabelsobject{}Prometheus ServiceMonitor labels
metrics.serviceMonitor.annotationsobject{}Prometheus ServiceMonitor annotations
metrics.serviceMonitor.enabledboolfalseEnable a prometheus ServiceMonitor
metrics.serviceMonitor.intervalstring"30s"Prometheus ServiceMonitor interval
metrics.serviceMonitor.metricRelabelingslist[]Prometheus [MetricRelabelConfigs] to apply to samples before ingestion
metrics.serviceMonitor.namespacestring""Prometheus ServiceMonitor namespace
metrics.serviceMonitor.relabelingslist[]Prometheus [RelabelConfigs] to apply to samples before scraping
metrics.serviceMonitor.schemestring""Prometheus ServiceMonitor scheme
metrics.serviceMonitor.selectorobject{}Prometheus ServiceMonitor selector
metrics.serviceMonitor.tlsConfigobject{}Prometheus ServiceMonitor tlsConfig
nameOverridestring""Provide a name in place of release name
nodestring"https://lava.tendermintrpc.lava.build:443"Lava node to connect to
nodeSelectorobject{}[Node selector]
podAnnotationsobject{}Annotations for the all deployed pods
podSecurityContextobject{}
readinessProbe.failureThresholdint3Minimum consecutive failures for the [probe] to be considered failed after having succeeded
readinessProbe.initialDelaySecondsint10Number of seconds after the container has started before [probe] is initiated
readinessProbe.periodSecondsint10How often (in seconds) to perform the [probe]
readinessProbe.schemestring"HTTPS"Schema of the [probe], c

Deploy provider with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has provider on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartprovider is pinned at v1.3.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply