Feature Toggles
Starship allows you to have toggles for some additional services to run with your infra setup. A few of them are mentioned below.
Registry
Following the schema of the cosmos/chain-registry repos,
if enabled this service spins up a rest api chain-registry service
for the infra you spin up.
Syntax
registry:
  enabled: true  # enable registry service
  localhost: true # default: true, will set chain registry output with api endpoints pointing to localhost, using the chains[].ports for localhost endpoints
  ports:
    rest: 8081   # localhost port for redirecting traffic
  # Optional: resources directive, default cpu: 0.2, memory: 200M
  resources:
    cpu: 0.5
    memory: 200M
  # Optional: image directive, default image:ghcr.io/hyperweb-io/starship/registry:20230614-7173db2
  image: ghcr.io/hyperweb-io/starship/registry:20230614-7173db2Note:
registry.localhostis set to true by default, meaning if the ports are specified in chains[].ports, then we set the various api endpoints of the chain registry tolocalhost:<port>. Make surerest,grpc,rpcare set as chain ports (opens in a new tab). If set to false, then it is set to kubernetes internal DNS endpoints.
Usage
Here is a list of available endpoints and how to use them:
| Endpoint | Returns | 
|---|---|
| /chain_ids | List of all chain-ids in the current setup | 
| /chains | List of all chain items | 
| /chains/{chain} | Chain schema for the given chain ids ( namein thechainsdirective) | 
| /chains/{chain}/assets | Assets of the given chain | 
| /chains/{chain}/keys | List of mnemonics used for the setup | 
| /ibc | List all ibc info for all chains | 
| /ibc/{chain_1}/{chain_2} | IBC information between the 2 chains specified | 
Proto definition for the service is here (opens in a new tab)
Explorer
In order to provide a full fledged emulation environment, we have a handy toggle to spin up an explorer for the infra.
Currently we support only Ping Pub explorer, but we will be adding more
Syntax
explorer:
  enabled: true  # enable registry service
  type: ping-pub # currently only support for ping-pub explorer
  ports:
    rest: 8080   # localhost port for redirecting traffic
  # Optional: resources directive, default cpu: 1, memory: 2Gi
  resources:
    cpu: 2
    memory: 4Gi
  # Optional: image directive, default image: ghcr.io/hyperweb-io/starship/ping-pub:6b7b0d096946b6bcd75d15350c7345da0d4576db
  image: ghcr.io/hyperweb-io/starship/ping-pub:6b7b0d096946b6bcd75d15350c7345da0d4576dbAvailable versions for the explorer can be found here (opens in a new tab)
Usage
After performing port-forward, open explorer at: http://localhost:8080 (opens in a new tab)
Ingress
In order to get external traffic into Starship, one can use the ingress directive to
create ingress rules on the domain.
NOTE: Prerequists include installing
cert-issuerandnginx-ingresscontroller in the k8s cluster. Domain specified, needs to be pointing to the k8s cluster in which Starship is deployed For Starship devnets, we use:cluster-setup.sh(opens in a new tab) as the setup script. Need to run just once.
Syntax
ingress:
  enabled: true
  type: nginx
  # host must be a wildcard entry, so that we can use the wildcard to create
  # service specific ingress rules.
  host: "*.thestarship.io"
  certManager:
    issuer: "cert-issuer"Above will create following endpoints with the domain, and valid certs:
- Explorer at: https://explorere.<host>(if enabled)
- Registry at: https://registry.<host>(if enabled)
- Chains at:
- RPC endpoint: https://rpc.<chain-id>-genesis.<host>
- Rest endpoint: https://rest.<chain-id>-genesis.<host>
- Chain exposer: https://rest.<chain-id>-genesis.<host>/exposer
- Chain faucet: https://rest.<chain-id>-genesis.<host>/faucet
 
- RPC endpoint: 
- Relayers at:
- Rest endpoint: https://rest.<relayer-type>-<relayer-name>.<host>
- Exposer endpoint: https://rest.<relayer-type>-<relayer-name>.<host>/exposer
 
- Rest endpoint: 
Frontends
Starship provides flexible frontend services that can be configured to run alongside your infrastructure. Frontend services can be customized with different images, ports, and resource allocations.
Syntax
frontends:
  - name: my-frontend
    type: custom
    image: ghcr.io/hyperweb-io/starship/frontend:latest
    replicas: 1
    ports:
      rest: 3000
    env:
      API_URL: http://localhost:8080
    resources:  # optional, defaults will be used
      cpu: 0.5
      memory: 512MiConfiguration Options
| Field | Type | Description | Default | 
|---|---|---|---|
| name | string | Name of the frontend service | Required | 
| type | string | Type of frontend service (e.g., custom) | Required | 
| image | string | Docker image for the frontend service | Required | 
| replicas | integer | Number of frontend service replicas | Required | 
| ports.rest | integer | Port for HTTP/REST traffic | Required | 
| env | object | Environment variables for the frontend service | |
| resources | object | Resource limits and requests | Not required |