diff --git a/.gitignore b/.gitignore index 376f5e735..1a7a77c28 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ # General files for the project -pkg/* *.pyc bin/* **bin/ @@ -40,4 +39,4 @@ Session.vim .history # Ignore docs site created -**/site/ \ No newline at end of file +**/site/ diff --git a/charts/devnet/defaults.yaml b/charts/devnet/defaults.yaml index 4fca80e8f..ed8d54635 100644 --- a/charts/devnet/defaults.yaml +++ b/charts/devnet/defaults.yaml @@ -600,77 +600,6 @@ defaultChains: png: https://raw.githubusercontent.com/cosmos/chain-registry/master/neutron/images/ntrn.png svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/neutron/images/ntrn.svg coingecko_id: neutron - eth: - storageClassName: hostpath - genesisStateUrl: https://github.com/eth-clients/merge-testnets/blob/main/sepolia/genesis.ssz - joinNetwork: false - prysmCtl: - image: gcr.io/prysmaticlabs/prysm/cmd/prysmctl:local-devnet - command: ["/app/cmd/prysmctl/prysmctl"] - args: - - testnet - - generate-genesis - - --fork=capella - - --num-validators=64 - - --output-ssz=/ethereum/consensus/genesis.ssz - - --chain-config-file=/etc/config/config.yml - - --geth-genesis-json-in=/etc/config/genesis.json - - --geth-genesis-json-out=/ethereum/consensus/genesis.json - geth: - image: ethereum/client-go:latest - args: - - --nodiscover - - --http - - --http.api=eth,net,web3,debug - - --http.addr=0.0.0.0 - - --http.corsdomain=* - - --ws - - --ws.api=eth,net,web3 - - --ws.addr=0.0.0.0 - - --ws.origins=* - - --http.vhosts=* - - --authrpc.vhosts=* - - --authrpc.addr=0.0.0.0 - - --authrpc.jwtsecret=/etc/secrets/jwt.hex - - --datadir=/ethereum/execution - - --allow-insecure-unlock - - --unlock=0x123463a4B065722E99115D6c222f267d9cABb524 - - --password=/dev/null - - --syncmode=full - - --networkid=32382 - beaconChain: - image: gcr.io/prysmaticlabs/prysm/beacon-chain:v4.0.8 - command: ["/app/cmd/beacon-chain/beacon-chain"] - args: - - --datadir=/ethereum/consensus/beacon - - --min-sync-peers=0 - - --genesis-state=/ethereum/consensus/genesis.ssz - - --bootstrap-node= - - --interop-eth1data-votes - - --chain-config-file=/etc/config/config.yml - - --chain-id=32382 - - --rpc-host=0.0.0.0 - - --contract-deployment-block=0 - - --grpc-gateway-host=0.0.0.0 - - --execution-endpoint=http://localhost:8551 - - --accept-terms-of-use - - --jwt-secret=/etc/secrets/jwt.hex - - --suggested-fee-recipient=0x123463a4B065722E99115D6c222f267d9cABb524 - - --minimum-peers-per-subnet=0 - - --enable-debug-rpc-endpoints - validator: - enabled: false - image: gcr.io/prysmaticlabs/prysm/validator:v4.0.8 - command: ["/app/cmd/validator/validator"] - args: - - --accept-terms-of-use - - --beacon-rpc-provider=localhost:4000 - - --datadir=/ethereum/consensus/validator - - --interop-num-validators=64 - - --interop-start-index=0 - - --force-clear-db - - --chain-config-file=/etc/config/config.yml - - --suggested-fee-recipient=0x0C46c2cAFE097b4f7e1BB868B89e5697eE65f934 defaultRelayers: ts-relayer: diff --git a/charts/devnet/templates/chains/cosmos/genesis.yaml b/charts/devnet/templates/chains/cosmos/genesis.yaml index 5b25bc06f..ba976cd5a 100644 --- a/charts/devnet/templates/chains/cosmos/genesis.yaml +++ b/charts/devnet/templates/chains/cosmos/genesis.yaml @@ -87,6 +87,7 @@ spec: value: "{{ $chain.numValidators }}" command: - bash + - - "-c" - | VAL_INDEX=${HOSTNAME##*-} diff --git a/cmd/starship/Makefile b/cmd/starship/Makefile index a9e502d6b..4ca8ae95f 100644 --- a/cmd/starship/Makefile +++ b/cmd/starship/Makefile @@ -8,7 +8,12 @@ all: build run .PHONY: build build: - CGO_ENABLED=0 go build -mod=readonly -o $(CURDIR)/build/ ./... + CGO_ENABLED=0 go build -o $(CURDIR)/build/ ./... + +RUN_ARGS = "../../tests/e2e/configs/two-chain.yaml" +.PHONY: run +run: + CGO_ENABLED=0 go run -mod=readonly ./... generate $(RUN_ARGS) .PHONY: build-linux build-linux: diff --git a/cmd/starship/go.mod b/cmd/starship/go.mod index 58cd1c747..78aadbbea 100644 --- a/cmd/starship/go.mod +++ b/cmd/starship/go.mod @@ -1,11 +1,15 @@ module github.com/cosmology-tech/starship/cmd/starship -go 1.19 +go 1.21.0 + +replace github.com/cosmology-tech/starship => ../../ require ( + github.com/cosmology-tech/starship v0.0.0 github.com/gofrs/flock v0.8.1 github.com/urfave/cli/v2 v2.25.3 - go.uber.org/zap v1.24.0 + go.uber.org/zap v1.26.0 + gopkg.in/yaml.v3 v3.0.1 helm.sh/helm/v3 v3.12.0 sigs.k8s.io/yaml v1.3.0 ) @@ -20,7 +24,6 @@ require ( github.com/Masterminds/sprig/v3 v3.2.3 // indirect github.com/Masterminds/squirrel v1.5.3 // indirect github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect - github.com/benbjohnson/clock v1.3.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/chai2010/gettext-go v1.0.2 // indirect @@ -41,7 +44,7 @@ require ( github.com/fatih/color v1.13.0 // indirect github.com/go-errors/errors v1.4.2 // indirect github.com/go-gorp/gorp/v3 v3.0.5 // indirect - github.com/go-logr/logr v1.2.3 // indirect + github.com/go-logr/logr v1.2.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.1 // indirect @@ -113,15 +116,14 @@ require ( go.opentelemetry.io/otel v1.14.0 // indirect go.opentelemetry.io/otel/trace v1.14.0 // indirect go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect - go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.10.0 // indirect - golang.org/x/crypto v0.7.0 // indirect - golang.org/x/net v0.8.0 // indirect + golang.org/x/crypto v0.14.0 // indirect + golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.6.0 // indirect golang.org/x/sync v0.1.0 // indirect - golang.org/x/sys v0.6.0 // indirect - golang.org/x/term v0.6.0 // indirect - golang.org/x/text v0.9.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.1.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230320184635-7606e756e683 // indirect @@ -129,18 +131,17 @@ require ( google.golang.org/protobuf v1.29.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.27.1 // indirect + k8s.io/api v0.27.7 // indirect k8s.io/apiextensions-apiserver v0.27.1 // indirect - k8s.io/apimachinery v0.27.1 // indirect + k8s.io/apimachinery v0.27.7 // indirect k8s.io/apiserver v0.27.1 // indirect k8s.io/cli-runtime v0.27.1 // indirect k8s.io/client-go v0.27.1 // indirect k8s.io/component-base v0.27.1 // indirect - k8s.io/klog/v2 v2.90.1 // indirect + k8s.io/klog/v2 v2.100.1 // indirect k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect k8s.io/kubectl v0.27.1 // indirect - k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 // indirect + k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect oras.land/oras-go v1.2.3 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/kustomize/api v0.13.2 // indirect diff --git a/cmd/starship/go.sum b/cmd/starship/go.sum index 35022e706..cd52bc62d 100644 --- a/cmd/starship/go.sum +++ b/cmd/starship/go.sum @@ -46,6 +46,7 @@ github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= +github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= @@ -59,9 +60,12 @@ github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBa github.com/Masterminds/squirrel v1.5.3 h1:YPpoceAcxuzIljlr5iWpNKaql7hLeG1KLSrhvdHpkZc= github.com/Masterminds/squirrel v1.5.3/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA400rg+riTZj10= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/Microsoft/hcsshim v0.10.0-rc.7 h1:HBytQPxcv8Oy4244zbQbe6hnOnx544eL5QPUqhJldz8= +github.com/Microsoft/hcsshim v0.10.0-rc.7/go.mod h1:ILuwjA+kNW+MrN/w5un7n3mTqkwsFu4Bp05/okFUZlE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d h1:UrqY+r/OJnIp5u0s1SbQ8dVfLCZJsnvazdBP5hS4iRs= +github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/a8m/expect v1.0.0/go.mod h1:4IwSCMumY49ScypDnjNbYEjgVeqy1/U2cEs3Lat96eA= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -72,10 +76,9 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 h1:4daAzAu0S6Vi7/lbWECcX0j45yZReDZ56BQsrVBOEEY= github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= -github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= -github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -83,10 +86,14 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= github.com/bshuster-repo/logrus-logstash-hook v1.0.0 h1:e+C0SB5R1pu//O4MQ3f9cFuPGoOVeF2fE4Og9otCc70= +github.com/bshuster-repo/logrus-logstash-hook v1.0.0/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd h1:rFt+Y/IK1aEZkEHchZRSq9OQbsSzIT/OrI8YFFmRIng= +github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b h1:otBG+dV+YK+Soembjv71DPz3uX/V/6MMlSyD9JBQ6kQ= +github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0 h1:nvj0OLI3YqYXer/kZD8Ri1aaunCxIEsOst1BVJswV0o= +github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= @@ -102,9 +109,11 @@ github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnht github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= +github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= github.com/containerd/containerd v1.7.0 h1:G/ZQr3gMZs6ZT0qPUZ15znx5QSdQdASW11nXTLTM2Pg= github.com/containerd/containerd v1.7.0/go.mod h1:QfR7Efgb/6X2BDpTPJRvPTYDE9rsF0FsXX9J8sIs/sc= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -117,6 +126,7 @@ github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHH github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/cyphar/filepath-securejoin v0.2.3 h1:YX6ebbZCZP7VkM3scTTokDgBL2TY741X51MTk3ycuNI= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -126,6 +136,7 @@ github.com/denisenkom/go-mssqldb v0.9.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27N github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2 h1:aBfCb7iqHmDEIp6fBvC/hQUddQfg+3qdYjwzaiP9Hnc= +github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2/go.mod h1:WHNsWjnIn2V1LYOrME7e8KxSeKunYHsxEm4am0BUtcI= github.com/docker/cli v23.0.1+incompatible h1:LRyWITpGzl2C9e9uGxzisptnxAn1zfZKXy13Ul2Q5oM= github.com/docker/cli v23.0.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= @@ -137,11 +148,13 @@ github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNk github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= +github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1 h1:ZClxb8laGDf5arXfYcAtECDFgAgHklGI8CxgjHnXKJ4= +github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ= github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= @@ -162,8 +175,10 @@ github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= +github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/foxcpp/go-mockdns v1.0.0 h1:7jBqxd3WDWwi/6WhDvacvH1XsN3rOLXyHM1uhvIx6FI= +github.com/foxcpp/go-mockdns v1.0.0/go.mod h1:lgRN6+KxQBawyIghpnl5CezHFGS9VLzvtVlwxvzXTQ4= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -182,8 +197,8 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= @@ -196,6 +211,7 @@ github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfC github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/gobuffalo/logger v1.0.6 h1:nnZNpxYo0zx+Aj9RfMPBm+x9zAU2OayFh/xrAWi34HU= github.com/gobuffalo/logger v1.0.6/go.mod h1:J31TBEHR1QLV2683OXTAItYIg8pv2JMHnF/quuAbMjs= github.com/gobuffalo/packd v1.0.1 h1:U2wXfRr4E9DH8IdsDLlRFwTZTK7hLfq9qT/QHXGVe/0= @@ -219,6 +235,7 @@ github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -247,6 +264,7 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/gomodule/redigo v1.8.2 h1:H5XSIre1MB5NbPYFp+i1NBbb5qN1W8Y8YAQoAYbkm8k= +github.com/gomodule/redigo v1.8.2/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -297,6 +315,7 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= +github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= @@ -451,6 +470,7 @@ github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQ github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78= +github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -472,7 +492,9 @@ github.com/nelsam/hel/v2 v2.3.3/go.mod h1:1ZTGfU2PFTOd5mx22i5O0Lc2GY933lQ2wb/ggy github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo/v2 v2.9.1 h1:zie5Ly042PD3bsCvsSOPvRnFwyo3rKe64TJlD6nu0mk= +github.com/onsi/ginkgo/v2 v2.9.1/go.mod h1:FEcmzVcCHl+4o9bQZVab+4dC9+j+91t2FHSzmGAPfuo= github.com/onsi/gomega v1.27.4 h1:Z2AnStgsdSayCMDiCU42qIz+HLqEPcgiOCXjAU/w+8E= +github.com/onsi/gomega v1.27.4/go.mod h1:riYq/GJKh8hhoM01HN6Vmuy93AarCXCBGpvFDK3q3fQ= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b h1:YWuSjZCQAPM8UUBLkYUk1e+rZcvWHJmFb6i6rM44Xs8= @@ -483,6 +505,7 @@ github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCko github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 h1:Ii+DKncOVM8Cu1Hc+ETb5K+23HdAMvESYE3ZJ5b5cMI= +github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -526,7 +549,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rubenv/sql-migrate v1.3.1 h1:Vx+n4Du8X8VTYuXbhNxdEUoh6wiJERA0GlWocR5FrbA= github.com/rubenv/sql-migrate v1.3.1/go.mod h1:YzG/Vh82CwyhTFXy+Mf5ahAiiEOpAlHurg+23VEzcsk= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -535,6 +559,7 @@ github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= @@ -579,7 +604,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= @@ -606,8 +632,11 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43 h1:+lm10QQTNSBd8DVTNGHx7o/IKu9HYDvLMffDhbyLccI= +github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50 h1:hlE8//ciYMztlGpl/VA+Zm1AcTPHYkHJPbHqE6WJUXE= +github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f h1:ERexzlUfuTvpE74urLSbIQW0Z/6hF9t8U4NsJLaioAY= +github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= @@ -620,6 +649,7 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= @@ -629,17 +659,16 @@ go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 h1:+FNtrFTmVw0YZGpBGX56XDee33 go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= -go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= +go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -654,8 +683,8 @@ golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= -golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -693,6 +722,7 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= +golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -737,8 +767,8 @@ golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -829,14 +859,14 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -848,8 +878,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -911,6 +941,7 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1054,6 +1085,7 @@ gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= +gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= helm.sh/helm/v3 v3.12.0 h1:rOq2TPVzg5jt4q5ermAZGZFxNW2uQhKjRhBneAutMEM= helm.sh/helm/v3 v3.12.0/go.mod h1:8K/469yxjUMu6BaD2EagCitkPjELUL/l2AgCO142G94= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1063,12 +1095,12 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.27.1 h1:Z6zUGQ1Vd10tJ+gHcNNNgkV5emCyW+v2XTmn+CLjSd0= -k8s.io/api v0.27.1/go.mod h1:z5g/BpAiD+f6AArpqNjkY+cji8ueZDU/WV1jcj5Jk4E= +k8s.io/api v0.27.7 h1:7yG4D3t/q4utJe2ptlRw9aPuxcSmroTsYxsofkQNl/A= +k8s.io/api v0.27.7/go.mod h1:ZNExI/Lhrs9YrLgVWx6jjHZdoWCTXfBXuFjt1X6olro= k8s.io/apiextensions-apiserver v0.27.1 h1:Hp7B3KxKHBZ/FxmVFVpaDiXI6CCSr49P1OJjxKO6o4g= k8s.io/apiextensions-apiserver v0.27.1/go.mod h1:8jEvRDtKjVtWmdkhOqE84EcNWJt/uwF8PC4627UZghY= -k8s.io/apimachinery v0.27.1 h1:EGuZiLI95UQQcClhanryclaQE6xjg1Bts6/L3cD7zyc= -k8s.io/apimachinery v0.27.1/go.mod h1:5ikh59fK3AJ287GUvpUsryoMFtH9zj/ARfWCo3AyXTM= +k8s.io/apimachinery v0.27.7 h1:Gxgtb7Y/Rsu8ymgmUEaiErkxa6RY4oTd8kNUI6SUR58= +k8s.io/apimachinery v0.27.7/go.mod h1:jBGQgTjkw99ef6q5hv1YurDd3BqKDk9YRxmX0Ozo0i8= k8s.io/apiserver v0.27.1 h1:phY+BtXjjzd+ta3a4kYbomC81azQSLa1K8jo9RBw7Lg= k8s.io/apiserver v0.27.1/go.mod h1:UGrOjLY2KsieA9Fw6lLiTObxTb8Z1xEba4uqSuMY0WU= k8s.io/cli-runtime v0.27.1 h1:MMzp5Q/Xmr5L1Lrowuc+Y/r95XINC6c6/fE3aN7JDRM= @@ -1077,14 +1109,14 @@ k8s.io/client-go v0.27.1 h1:oXsfhW/qncM1wDmWBIuDzRHNS2tLhK3BZv512Nc59W8= k8s.io/client-go v0.27.1/go.mod h1:f8LHMUkVb3b9N8bWturc+EDtVVVwZ7ueTVquFAJb2vA= k8s.io/component-base v0.27.1 h1:kEB8p8lzi4gCs5f2SPU242vOumHJ6EOsOnDM3tTuDTM= k8s.io/component-base v0.27.1/go.mod h1:UGEd8+gxE4YWoigz5/lb3af3Q24w98pDseXcXZjw+E0= -k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= -k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= +k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= k8s.io/kubectl v0.27.1 h1:9T5c5KdpburYiW8XKQSH0Uly1kMNE90aGSnbYUZNdcA= k8s.io/kubectl v0.27.1/go.mod h1:QsAkSmrRsKTPlAFzF8kODGDl4p35BIwQnc9XFhkcsy8= -k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 h1:kmDqav+P+/5e1i9tFfHq1qcF3sOrDp+YEkVDAHu7Jwk= -k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= +k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= oras.land/oras-go v1.2.3 h1:v8PJl+gEAntI1pJ/LCrDgsuk+1PKVavVEPsYIHFE5uY= oras.land/oras-go v1.2.3/go.mod h1:M/uaPdYklze0Vf3AakfarnpoEckvw0ESbRdN8Z1vdJg= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/cmd/starship/root.go b/cmd/starship/root.go index ed4478f34..b54c71acd 100644 --- a/cmd/starship/root.go +++ b/cmd/starship/root.go @@ -2,7 +2,12 @@ package main import ( "fmt" + "github.com/cosmology-tech/starship/pkg/defaults" + "github.com/cosmology-tech/starship/pkg/loader/starship" + "github.com/cosmology-tech/starship/pkg/transformer/kubernetes" + "github.com/cosmology-tech/starship/pkg/types" "github.com/urfave/cli/v2" + "go.uber.org/zap" ) func newStartCommand(config *Config) *cli.Command { @@ -99,6 +104,58 @@ func newStopCommand(config *Config) *cli.Command { } } +func newGenerateCommand(config *Config) *cli.Command { + return &cli.Command{ + Name: "generate", + Usage: "generate will generate yaml files from given starship config file", + UsageText: "generate [path to config-file] [options]", + Flags: GetCommandLineOptions("config", "verbose"), + Action: func(c *cli.Context) error { + if err := ParseCLIOptions(c, config); err != nil { + return cli.Exit(err, 1) + } + // set configfile to the Config struct from args if not set + if config.ConfigFile == "" { + if c.NArg() > 0 { + config.ConfigFile = c.Args().Get(0) + } else { + return cli.Exit("config file need to be specified", 1) + } + } + log, err := NewLogger(config) + if err != nil { + return cli.Exit(err, 1) + } + + // default config + defaultConfig := defaults.DefaultConfig() + + // convert config file to nodeConfig from loader + s := starship.NewStarship(log) + nodeConfigs, err := s.LoadFile([]string{config.ConfigFile}, defaultConfig) + if err != nil { + return cli.Exit(fmt.Sprintf("unable to load config to nodeconfigs, err: %s", err), 1) + } + log.Debug("node config", zap.Any("node-configs", nodeConfigs)) + + // convert nodeconfig to k8s objects + k := kubernetes.NewKubernetes(log) + objects, err := k.Transform(nodeConfigs, types.ConvertOptions{}) + if err != nil { + return cli.Exit(fmt.Sprintf("error transforming nodeconfig to k8s objects, err: %s", err), 1) + } + log.Debug("kubernetes runtime objects", zap.Any("k8s", objects)) + + err = objects.WriteToFile("build/generator/") + if err != nil { + return cli.Exit(err, 1) + } + + return nil + }, + } +} + func newConnectCommand(config *Config) *cli.Command { return &cli.Command{ Name: "connect", @@ -158,6 +215,7 @@ func NewApp() *cli.App { newListCommand(config), newStopCommand(config), newConnectCommand(config), + newGenerateCommand(config), } return app diff --git a/defaults.yaml b/defaults.yaml new file mode 100644 index 000000000..b9e806646 --- /dev/null +++ b/defaults.yaml @@ -0,0 +1,806 @@ +# Note: This file is embeded into the starship binary itself + +# Chain timeouts +timeouts: + time_iota_ms: 10 + timeout_propose: 400ms + timeout_propose_delta: 400ms + timeout_prevote: 400ms + timeout_prevote_delta: 400ms + timeout_precommit: 400ms + timeout_precommit_delta: 400ms + timeout_commit: 800ms + +# API for interacting with the charts for devnet +# TODO: need a way to create state reaching jobs, those will run user bash scripts +# after the chain has been initialized, get the chain to a state and then complete +# Note: Order of `coins` matters, since we take the first one as part of gentx +chains: + osmosis: + image: ghcr.io/cosmology-tech/starship/osmosis:v15.1.2-wasmvm1.1.2 + home: /root/.osmosisd + binary: osmosisd + prefix: osmo + denom: uosmo + prettyName: osmosis + coins: 100000000000000uosmo,100000000000000uion + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/osmosis-labs/osmosis + assets: + - base: uosmo + description: "The native token of Osmosis" + name: Osmosis + display: osmo + symbol: OSMO + logo_URIs: + png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/osmo.png" + svg: "https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/osmo.svg" + denom_units: + - denom: uosmo + exponent: 0 + - denom: osmo + exponent: 6 + coingecko_id: osmosis + keywords: ["staking", "dex"] + - base: uion + name: Ion + display: ion + symbol: ION + logo_URIs: + png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/ion.png" + svg: "https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/ion.svg" + denom_units: + - denom: uion + exponent: 0 + - denom: ion + exponent: 6 + coingecko_id: ion + keywords: ["memecoin"] + juno: + image: ghcr.io/cosmology-tech/starship/juno:v15.0.0 + home: /root/.juno + binary: junod + prefix: juno + denom: ujuno + prettyName: Juno + coins: 100000000000000ujuno + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/CosmosContracts/juno + assets: + - base: ujuno + description: "The native token of JUNO Chain" + name: Juno + display: juno + symbol: JUNO + logo_URIs: + png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/juno.png" + svg: "https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/juno.svg" + denom_units: + - denom: ujuno + exponent: 0 + - denom: juno + exponent: 6 + coingecko_id: juno-network + wasmd: + image: anmol1696/wasmd:latest + home: /root/.wasmd + binary: wasmd + prefix: wasm + denom: stake + prettyName: Wasm + coins: 100000000000000stake,100000000000000ucosm + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/CosmWasm/wasmd + cosmos: + image: ghcr.io/cosmology-tech/starship/gaia:v9.1.1 + home: /root/.gaia + binary: gaiad + prefix: cosmos + denom: uatom + prettyName: Cosmos Hub + coins: 100000000000000uatom,100000000000000stake + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/cosmos/gaia + assets: + - base: uatom + description: "The native staking and governance token of the Cosmos Hub." + name: Cosmos Hub Atom + display: atom + symbol: ATOM + logo_URIs: + png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/cosmoshub/images/atom.png" + svg: "https://raw.githubusercontent.com/cosmos/chain-registry/master/cosmoshub/images/atom.svg" + denom_units: + - denom: uatom + exponent: 0 + - denom: atom + exponent: 6 + coingecko_id: atom + simapp: + image: ghcr.io/cosmology-tech/starship/simapp:v0.47.3 + home: /root/.simapp + binary: simd + prefix: cosmos + denom: stake + prettyName: Sim App + coins: 100000000000000stake + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/cosmos/cosmos-sdk/tree/main/simapp + persistencecore: + image: anmol1696/persistencecore:latest + home: /root/.persistenceCore + binary: persistenceCore + prefix: persistence + denom: uxprt + prettyName: Persistence + coins: 100000000000000uxprt + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/persistenceOne/persistenceCore + stride: + image: ghcr.io/cosmology-tech/starship/stride:v9.2.1 + home: /root/.stride + binary: strided + prefix: stride + denom: ustrd + prettyName: Stride + coins: 100000000000000ustrd + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/Stride-Labs/stride + assets: + - base: ustrd + description: The native token of Stride + denom_units: + - denom: ustrd + exponent: 0 + - denom: strd + exponent: 6 + name: Stride + display: strd + symbol: STRD + logo_URIs: + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/stride/images/strd.png + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/stride/images/strd.svg + coingecko_id: stride + - base: stuatom + denom_units: + - denom: stuatom + exponent: 0 + - denom: statom + exponent: 6 + name: stATOM + display: statom + symbol: stATOM + traces: + - type: liquid-stake + counterparty: + chain_name: cosmoshub + base_denom: uatom + provider: Stride + logo_URIs: + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/stride/images/statom.png + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/stride/images/statom.svg + coingecko_id: stride-staked-atom + injective: + image: ghcr.io/cosmology-tech/starship/injective:v1.11.6 + home: /root/.injectived + binary: injectived + prefix: inj + denom: inj + prettyName: Injective + coins: 100000000000000000000000000inj + hdPath: m/44'/60'/0'/0/0 + coinType: 60 + repo: https://github.com/InjectiveLabs/injective-chain-releases + faucet: + type: starship + scripts: + createGenesis: + file: scripts/injective/create-genesis.sh + updateGenesis: + file: scripts/injective/update-genesis.sh + createValidator: + file: scripts/injective/create-validator.sh + assets: + - base: inj + description: The INJ token is the native governance token for the Injective chain. + denom_units: + - denom: inj + exponent: 0 + - denom: INJ + exponent: 18 + name: Injective + display: INJ + symbol: INJ + logo_URIs: + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/injective/images/inj.png + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/injective/images/inj.svg + coingecko_id: injective-protocol + ics: + image: ghcr.io/cosmology-tech/starship/ics:v0.1.0 + home: /root/.ics + binary: interchain-security-pd + prefix: cosmos + denom: uatom + prettyName: ICS + coins: 100000000000000uatom,100000000000000stake + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/cosmos/interchain-security + cronos: + image: ghcr.io/cosmology-tech/starship/cronos:v1.0.4 + home: /root/.cronos + binary: cronosd + prefix: crc + denom: basecro + prettyName: Cronos + coins: 100000000000000basecro + hdPath: m/44'/60'/0'/0/0 + coinType: 60 + repo: https://github.com/crypto-org-chain/cronos + assets: + - base: basecro + description: Cronos Chain - Get Instant DApp Portability with EVM Support + denom_units: + - denom: basecro + exponent: 0 + - denom: cro + exponent: 18 + name: Cronos + display: cro + symbol: CRO + logo_URIs: + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/cronos/images/cro.svg + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/cronos/images/cronos.png + coingecko_id: crypto-com-chain + cryptoorgchain: + image: ghcr.io/cosmology-tech/starship/cryptoorgchain:v4.1.2 + home: /root/.cryptoorgchain + binary: chain-maind + prefix: cro + denom: basecro + prettyName: Crypto.org Chain + coins: 100000000000000basecro + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/crypto-org-chain/chain-main + assets: + - base: basecro + description: CRO is the native token of the Crypto.org Chain, referred to as Native CRO. + denom_units: + - denom: basecro + exponent: 0 + - denom: cro + exponent: 8 + name: Cronos + display: cro + symbol: CRO + logo_URIs: + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/cronos/images/cro.svg + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/cronos/images/cronos.png + coingecko_id: crypto-com-chain + evmos: + image: ghcr.io/cosmology-tech/starship/evmos:v13.0.1 + home: /root/.evmosd + binary: evmosd + prefix: evmos + denom: aevmos + prettyName: Evmos + coins: 100000000000000000000000000aevmos + hdPath: m/44'/60'/0'/0/0 + coinType: 60 + repo: https://github.com/evmos/evmos + faucet: + type: starship + assets: + - base: aevmos + description: The native EVM, governance and staking token of the Evmos Hub + denom_units: + - denom: aevmos + exponent: 0 + - denom: evmos + exponent: 18 + name: Evmos + display: evmos + symbol: EVMOS + logo_URIs: + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/evmos/images/evmos.svg + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/evmos/images/evmos.png + coingecko_id: evmos + regen: + image: ghcr.io/cosmology-tech/starship/regen:v5.0.0 + home: /root/.regen + binary: regen + prefix: regen + denom: uregen + prettyName: Regen + coins: 100000000000000uregen + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/regen-network/regen-ledger + assets: + - base: uregen + description: REGEN coin is the token for the Regen Network Platform + denom_units: + - denom: uregen + exponent: 0 + - denom: regen + exponent: 6 + name: Regen Network + display: regen + symbol: REGEN + logo_URIs: + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/regen/images/regen.svg + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/regen/images/regen.png + coingecko_id: regen + - base: eco.uC.NCT + description: Nature Carbon Ton (NCT) is a carbon token standard backed 1:1 by carbon + credits issued by Verra, a global leader in the voluntary carbon market. NCT credits + on Regen Network have been tokenized by Toucan.earth. + denom_units: + - denom: eco.uC.NCT + exponent: 0 + - denom: nct + exponent: 6 + name: Nature Carbon Ton + display: nct + symbol: NCT + logo_URIs: + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/regen/images/nct.svg + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/regen/images/nct.png + coingecko_id: toucan-protocol-nature-carbon-tonne + quasar: + image: ghcr.io/cosmology-tech/starship/quasar:v0.1.1 + home: /root/.quasarnode + binary: quasarnoded + prefix: quasar + denom: uqsr + prettyName: Quasar + coins: 100000000000000uqsr + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/quasar-finance/quasar-preview + assets: + - base: uqsr + description: The native token of Quasar + denom_units: + - denom: uqsr + exponent: 0 + - denom: qsr + exponent: 6 + name: Quasar + display: qsr + symbol: QSR + logo_URIs: + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/quasar/images/quasar.png + quicksilver: + image: ghcr.io/cosmology-tech/starship/quicksilver:v0.6.6 + home: /root/.quicksilverd + binary: quicksilverd + prefix: quick + denom: uqck + prettyName: Quicksilver + coins: 100000000000000uqck + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/ingenuity-build/quicksilver + assets: + - description: QCK - native token of Quicksilver + denom_units: + - denom: uqck + exponent: 0 + aliases: [ ] + - denom: qck + exponent: 6 + aliases: [ ] + base: uqck + name: Quicksilver + display: qck + symbol: QCK + logo_URIs: + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/quicksilver/images/qck.png + coingecko_id: quicksilver + - description: Quicksilver Liquid Staked STARS + denom_units: + - denom: uqstars + exponent: 0 + aliases: [ ] + - denom: qstars + exponent: 6 + aliases: [ ] + base: uqstars + name: Quicksilver Liquid Staked STARS + display: qstars + symbol: qSTARS + traces: + - type: liquid-stake + counterparty: + chain_name: stargaze + base_denom: ustars + provider: Quicksilver + logo_URIs: + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/quicksilver/images/qstars.png + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/quicksilver/images/qstars.svg + - description: Quicksilver Liquid Staked ATOM + denom_units: + - denom: uqatom + exponent: 0 + aliases: [ ] + - denom: qatom + exponent: 6 + aliases: [ ] + base: uqatom + name: Quicksilver Liquid Staked ATOM + display: qatom + symbol: qATOM + traces: + - type: liquid-stake + counterparty: + chain_name: cosmoshub + base_denom: uatom + provider: Quicksilver + logo_URIs: + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/quicksilver/images/qatom.png + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/quicksilver/images/qatom.svg + sei: + image: ghcr.io/cosmology-tech/starship/sei:2.0.46beta + home: /root/.seid + binary: seid + prefix: sei + denom: usei + prettyName: Sei + coins: 100000000000000usei + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/sei-protocol/sei-chain + assets: + - description: The native staking token of Sei. + denom_units: + - denom: usei + exponent: 0 + - denom: sei + exponent: 6 + base: usei + name: Sei + display: sei + symbol: SEI + logo_URIs: + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/sei/images/sei.png + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/sei/images/sei.svg + coingecko_id: sei-network + sommelier: + image: ghcr.io/cosmology-tech/starship/sommelier:v6.0.0 + home: /root/.sommelier + binary: sommelier + prefix: somm + denom: usomm + prettyName: Sommelier + coins: 100000000000000usomm + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/PeggyJV/sommelier + assets: + - description: Somm Token (SOMM) is the native staking token of the Sommelier Chain + denom_units: + - denom: usomm + exponent: 0 + aliases: + - microsomm + - denom: msomm + exponent: 3 + aliases: + - millisomm + - denom: somm + exponent: 6 + base: usomm + name: Somm + display: somm + symbol: SOMM + logo_URIs: + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/sommelier/images/somm.png + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/sommelier/images/somm.svg + coingecko_id: sommelier + stargaze: + image: ghcr.io/cosmology-tech/starship/stargaze:v10.0.1 + home: /root/.starsd + binary: starsd + prefix: stars + denom: ustars + prettyName: Stargaze + coins: 100000000000000ustars + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/public-awesome/stargaze + assets: + - description: The native token of Stargaze + denom_units: + - denom: ustars + exponent: 0 + - denom: stars + exponent: 6 + base: ustars + name: Stargaze + display: stars + symbol: STARS + logo_URIs: + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/stargaze/images/stars.svg + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/stargaze/images/stars.png + coingecko_id: stargaze + umee: + image: ghcr.io/cosmology-tech/starship/umee:v3.1.0 + home: /root/.umee + binary: umeed + prefix: umee + denom: uumee + prettyName: Umee + coins: 100000000000000uumee + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/umee-network/umee + assets: + - description: The native token of Umee + denom_units: + - denom: uumee + exponent: 0 + - denom: umee + exponent: 6 + base: uumee + name: Umee + display: umee + symbol: UMEE + logo_URIs: + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/umee/images/umee.svg + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/umee/images/umee.png + coingecko_id: umee + cheqd: + image: ghcr.io/cosmology-tech/starship/cheqd:v1.4.4 + home: /root/.cheqdnode + binary: cheqd-noded + prefix: cheqd + denom: ncheq + prettyName: Cheqd + coins: 100000000000000ncheq + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/cheqd/cheqd-node + assets: + - description: Native token for the cheqd network + denom_units: + - denom: ncheq + exponent: 0 + - denom: cheq + exponent: 9 + base: ncheq + display: cheq + name: cheqd + symbol: CHEQ + logo_URIs: + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/cheqd/images/cheq.png + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/cheqd/images/cheq.svg + coingecko_id: cheqd-network + neutron: + image: ghcr.io/cosmology-tech/starship/neutron:v1.0.4 + home: /root/.neutrond + binary: neutrond + prefix: neutron + denom: untrn + prettyName: Neutron + coins: 100000000000000untrn + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/neutron-org/neutron + scripts: + createGenesis: + file: scripts/neutron/create-neutron-genesis.sh + assets: + - description: The native token of Neutron chain. + denom_units: + - denom: untrn + exponent: 0 + - denom: ntrn + exponent: 6 + base: untrn + name: Neutron + display: ntrn + symbol: NTRN + logo_URIs: + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/neutron/images/ntrn.png + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/neutron/images/ntrn.svg + coingecko_id: neutron + eth: + storageClassName: hostpath + genesisStateUrl: https://github.com/eth-clients/merge-testnets/blob/main/sepolia/genesis.ssz + joinNetwork: false + prysmCtl: + image: gcr.io/prysmaticlabs/prysm/cmd/prysmctl:local-devnet + command: ["/app/cmd/prysmctl/prysmctl"] + args: + - testnet + - generate-genesis + - --fork=capella + - --num-validators=64 + - --output-ssz=/ethereum/consensus/genesis.ssz + - --chain-config-file=/etc/config/config.yml + - --geth-genesis-json-in=/etc/config/genesis.json + - --geth-genesis-json-out=/ethereum/consensus/genesis.json + geth: + image: ethereum/client-go:latest + args: + - --nodiscover + - --http + - --http.api=eth,net,web3,debug + - --http.addr=0.0.0.0 + - --http.corsdomain=* + - --ws + - --ws.api=eth,net,web3 + - --ws.addr=0.0.0.0 + - --ws.origins=* + - --http.vhosts=* + - --authrpc.vhosts=* + - --authrpc.addr=0.0.0.0 + - --authrpc.jwtsecret=/etc/secrets/jwt.hex + - --datadir=/ethereum/execution + - --allow-insecure-unlock + - --unlock=0x123463a4B065722E99115D6c222f267d9cABb524 + - --password=/dev/null + - --syncmode=full + - --networkid=32382 + beaconChain: + image: gcr.io/prysmaticlabs/prysm/beacon-chain:v4.0.8 + command: ["/app/cmd/beacon-chain/beacon-chain"] + args: + - --datadir=/ethereum/consensus/beacon + - --min-sync-peers=0 + - --genesis-state=/ethereum/consensus/genesis.ssz + - --bootstrap-node= + - --interop-eth1data-votes + - --chain-config-file=/etc/config/config.yml + - --chain-id=32382 + - --rpc-host=0.0.0.0 + - --contract-deployment-block=0 + - --grpc-gateway-host=0.0.0.0 + - --execution-endpoint=http://localhost:8551 + - --accept-terms-of-use + - --jwt-secret=/etc/secrets/jwt.hex + - --suggested-fee-recipient=0x123463a4B065722E99115D6c222f267d9cABb524 + - --minimum-peers-per-subnet=0 + - --enable-debug-rpc-endpoints + validator: + enabled: false + image: gcr.io/prysmaticlabs/prysm/validator:v4.0.8 + command: ["/app/cmd/validator/validator"] + args: + - --accept-terms-of-use + - --beacon-rpc-provider=localhost:4000 + - --datadir=/ethereum/consensus/validator + - --interop-num-validators=64 + - --interop-start-index=0 + - --force-clear-db + - --chain-config-file=/etc/config/config.yml + - --suggested-fee-recipient=0x0C46c2cAFE097b4f7e1BB868B89e5697eE65f934 + +relayers: + ts-relayer: + image: ghcr.io/cosmology-tech/starship/ts-relayer:0.9.0 + hermes: + image: ghcr.io/cosmology-tech/starship/hermes:1.6.0 + config: + global: + log_level: "info" + mode: + clients: + enabled: true + refresh: true + misbehaviour: true + connections: + enabled: true + channels: + enabled: true + packets: + enabled: true + clear_interval: 100 + clear_on_start: true + tx_confirmation: true + rest: + enabled: true + host: "127.0.0.1" + port: 3000 + telemetry: + enabled: true + host: "127.0.0.1" + port: 3001 + # custom config args + event_source: + mode: push # allowed values: push, pull. Valid only for 1.6.0+ + go-relayer: + image: ghcr.io/cosmology-tech/starship/go-relayer:v2.4.1 + +scripts: + createGenesis: + name: create-genesis.sh + file: scripts/default/create-genesis.sh + updateGenesis: + name: update-genesis.sh + file: scripts/default/update-genesis.sh + updateConfig: + name: update-config.sh + file: scripts/default/update-config.sh + createValidator: + name: create-validator.sh + file: scripts/default/create-validator.sh + transferTokens: + name: transfer-tokens.sh + file: scripts/default/transfer-tokens.sh + buildChain: + name: build-chain.sh + file: scripts/default/build-chain.sh + +faucets: + cosmjs: + image: ghcr.io/cosmology-tech/starship/cosmjs-faucet:v0.31.1 + concurrency: 5 + starship: + image: ghcr.io/cosmology-tech/starship/faucet:20230915-d75e5fd + concurrency: 5 + +cometmock: + image: ghcr.io/informalsystems/cometmock:v0.37.x + +exposer: + enabled: true + image: ghcr.io/cosmology-tech/starship/exposer:20231011-cdbd60b + ports: + rest: 8081 + resources: + cpu: "0.2" + memory: "200M" + +registry: + enabled: true + image: ghcr.io/cosmology-tech/starship/registry:20230915-6b2102d + localhost: true + ports: + rest: 6060 + grpc: 7070 + resources: + cpu: "0.2" + memory: "200M" + +explorer: + # Flag to enable explorer for cluster + enabled: false + type: ping-pub + image: ghcr.io/cosmology-tech/starship/ping-pub:6b7b0d096946b6bcd75d15350c7345da0d4576db + localhost: true + ports: + rest: 8080 + # Currently the ping-pub explorer is using alot of memory dues to building the site + # at runtime (with custom configs). Anything bellow 2Gi will crash the pods on startup + # todo: make this more efficient with faster startuptime + resources: + cpu: "1" + memory: "2Gi" + +faucet: + enabled: true + type: cosmjs + ports: + rest: 8000 + resources: + cpu: "0.2" + memory: "200M" + +monitoring: + enabled: false + ports: + prometheus: 8011 + grafana: 9011 + resources: + cpu: "0.2" + memory: "400M" diff --git a/faucet/go.mod b/faucet/go.mod index ead92ddc1..ef5bda4c2 100644 --- a/faucet/go.mod +++ b/faucet/go.mod @@ -4,7 +4,6 @@ go 1.19 require ( github.com/go-chi/chi v1.5.4 - github.com/golang/protobuf v1.5.3 github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2 github.com/urfave/cli v1.22.12 @@ -18,6 +17,7 @@ require ( github.com/benbjohnson/clock v1.3.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/golang/glog v1.1.0 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/stretchr/testify v1.8.2 // indirect diff --git a/go.mod b/go.mod new file mode 100644 index 000000000..380bfbf06 --- /dev/null +++ b/go.mod @@ -0,0 +1,31 @@ +module github.com/cosmology-tech/starship + +go 1.21.0 + +require ( + github.com/stretchr/testify v1.8.4 + go.uber.org/zap v1.26.0 + gopkg.in/yaml.v3 v3.0.1 + k8s.io/api v0.27.7 + k8s.io/apimachinery v0.27.7 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-logr/logr v1.2.4 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/google/gofuzz v1.2.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + go.uber.org/multierr v1.10.0 // indirect + golang.org/x/net v0.17.0 // indirect + golang.org/x/text v0.13.0 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + k8s.io/klog/v2 v2.100.1 // indirect + k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 000000000..37856ab00 --- /dev/null +++ b/go.sum @@ -0,0 +1,97 @@ +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= +go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= +go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +k8s.io/api v0.27.7 h1:7yG4D3t/q4utJe2ptlRw9aPuxcSmroTsYxsofkQNl/A= +k8s.io/api v0.27.7/go.mod h1:ZNExI/Lhrs9YrLgVWx6jjHZdoWCTXfBXuFjt1X6olro= +k8s.io/apimachinery v0.27.7 h1:Gxgtb7Y/Rsu8ymgmUEaiErkxa6RY4oTd8kNUI6SUR58= +k8s.io/apimachinery v0.27.7/go.mod h1:jBGQgTjkw99ef6q5hv1YurDd3BqKDk9YRxmX0Ozo0i8= +k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= +k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= +k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/go.work b/go.work index 960d21613..aa09a2abd 100644 --- a/go.work +++ b/go.work @@ -1,13 +1,15 @@ -go 1.19 +go 1.21.0 use ( + + . ./clients/go/client ./cmd/starship ./examples/upgrade-test ./exposer - ./registry ./faucet + ./registry ./tests/e2e ./tools ) diff --git a/go.work.sum b/go.work.sum index 1b072c85a..80e33a282 100644 --- a/go.work.sum +++ b/go.work.sum @@ -414,11 +414,17 @@ github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pO github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw= github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I= +github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY= +github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 h1:yL7+Jz0jTC6yykIK/Wh74gnTJnrGr5AyrNMXuA0gves= github.com/antlr/antlr4/runtime/Go/antlr v1.4.10/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= +github.com/apache/arrow/go/v10 v10.0.1 h1:n9dERvixoC/1JjDmBcs9FPaEryoANa2sCgVFo6ez9cI= +github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= github.com/apache/thrift v0.13.0 h1:5hryIiq9gtn+MiLVn0wP37kb/uTeRZgN08WoCsAhIhI= +github.com/apache/thrift v0.16.0 h1:qEy6UW60iVOlUy+b9ZR0d5WzUWYGOo4HfopoyBaNmoY= +github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6 h1:G1bPvciwNyF7IUmKXNt9Ak3m6u9DE1rF+RmtIkBpVdA= github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= @@ -640,6 +646,7 @@ github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcH github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ettle/strcase v0.1.1 h1:htFueZyVeE1XNnMEfbqp5r67qAN/4r6ya1ysq8Q+Zcw= github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= @@ -691,11 +698,15 @@ github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTg github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/go-toolsmith/astcast v1.0.0 h1:JojxlmI6STnFVG9yOImLeGREv8W2ocNUM+iOhR6jE7g= github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= github.com/go-toolsmith/astcopy v1.0.1 h1:l09oBhAPyV74kLJ3ZO31iBU8htZGTwr9LTjuMCyL8go= @@ -718,6 +729,8 @@ github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b h1:khEcpUM4yFcxg4 github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/go-zookeeper/zk v1.0.2 h1:4mx0EYENAdX/B/rbunjlt5+4RTA/a9SMHBRuSKdGxPM= github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= +github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godror/godror v0.24.2 h1:uxGAD7UdnNGjX5gf4NnEIGw0JAPTIFiqAyRBZTPKwXs= @@ -755,6 +768,11 @@ github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85q github.com/gomodule/redigo v1.8.2/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= github.com/google/cel-go v0.12.6 h1:kjeKudqV0OygrAqA9fX6J55S8gj+Jre2tckIm5RoG4M= github.com/google/cel-go v0.12.6/go.mod h1:Jk7ljRzLBhkmiAwBoUxB1sZSCVBAzkqPF25olK/iRDw= +github.com/google/flatbuffers v2.0.8+incompatible h1:ivUb1cGomAB101ZM1T0nOiWz9pSrTMoa9+EiY7igmkM= +github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-github/v43 v43.0.0 h1:y+GL7LIsAIF2NZlJ46ZoC/D1W1ivZasT0lnWHMYPZ+U= github.com/google/go-github/v43 v43.0.0/go.mod h1:ZkTvvmCXBvsfPpTHXnH/d2hP9Y0cTbvN9kr5xqyXOIc= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= @@ -895,6 +913,8 @@ github.com/kisielk/errcheck v1.6.2/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kkHAIKE/contextcheck v1.1.3/go.mod h1:PG/cwd6c0705/LM0KTr1acO2gORUxkSVWyLJOFW5qoo= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/klauspost/asmfmt v1.3.2 h1:4Ri7ox3EwapiOjCki+hw14RyKk201CN4rzyCJRFLpK4= +github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.9.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= @@ -903,6 +923,8 @@ github.com/klauspost/compress v1.15.15/go.mod h1:ZcK2JAFqKOpnBlxcLsJzYfrS9X1akm9 github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.0.4 h1:g0I61F2K2DjRHz1cnxlkNSBIaePVoJIjjnHui8QHbiw= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE= github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= @@ -971,6 +993,10 @@ github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKju github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/pkcs11 v1.1.1 h1:Ugu9pdy6vAYku5DEpVWVFPYnzV+bxB+iRdbuFSu7TvU= github.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= +github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 h1:AMFGa4R4MiIpspGNG7Z948v4n35fFGB3RR3G/ry4FWs= +github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= +github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 h1:+n/aFZefKZp7spd8DFdX7uMikMLXX4oubIzJF4kv/wI= +github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible h1:aKW/4cBs+yK6gpqU3K/oIwk9Q/XICqd3zOX/UFuvqmk= @@ -1032,9 +1058,14 @@ github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1ls github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= github.com/onsi/ginkgo/v2 v2.9.1/go.mod h1:FEcmzVcCHl+4o9bQZVab+4dC9+j+91t2FHSzmGAPfuo= +github.com/onsi/ginkgo/v2 v2.9.2/go.mod h1:WHcJJG2dIlcCqVfBAwUCrJxSPFb6v4azBwgxeMeDuts= +github.com/onsi/ginkgo/v2 v2.9.4 h1:xR7vG4IXt5RWx6FfIjyAtsoMAtnc3C/rFXBBd2AjZwE= +github.com/onsi/ginkgo/v2 v2.9.4/go.mod h1:gCQYp2Q+kSoIj7ykSVb9nskRSsR6PUj4AiLywzIhbKM= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.20.0/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= github.com/onsi/gomega v1.27.3/go.mod h1:5vG284IBtfDAmDyrK+eGyZmUgUlmi+Wngqo557cZ6Gw= +github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= +github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+qQlhg= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88= github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= @@ -1072,6 +1103,8 @@ github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7 github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I= github.com/pierrec/lz4 v2.5.2+incompatible h1:WCjObylUIOlKy/+7Abdn34TLIkXiA4UWUMhxq9m9ZXI= +github.com/pierrec/lz4/v4 v4.1.15 h1:MO0/ucJhngq7299dKLwIMtgTfbkoSPF6AoMYDd8Q4q0= +github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pjbgf/sha1cd v0.2.3/go.mod h1:HOK9QrgzdHpbc2Kzip0Q1yi3M2MFGPADtR6HjG65m5M= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= @@ -1114,6 +1147,8 @@ github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8 github.com/regen-network/gocuke v0.6.2/go.mod h1:zYaqIHZobHyd0xOrHGPQjbhGJsuZ1oElx150u2o1xuk= github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s= github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/xid v1.4.0 h1:qd7wPTDkN6KQx2VmMBLrpHkiyQwgFXRnkOLacUiaSNY= @@ -1261,6 +1296,8 @@ github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= +github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0= +github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= github.com/zondax/ledger-go v0.14.0/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= gitlab.com/bosi/decorder v0.2.3 h1:gX4/RgK16ijY8V+BRQHAySfQAb354T7/xQpDB2n10P0= gitlab.com/bosi/decorder v0.2.3/go.mod h1:9K1RB5+VPNQYtXtTDAzd2OEftsZb1oV0IrJrzChSdGE= @@ -1329,6 +1366,8 @@ golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1353,6 +1392,8 @@ golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2 golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= +golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1368,6 +1409,8 @@ golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfS golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/oauth2 v0.3.0/go.mod h1:rQrIauxkUhJ6CuwEXwymO2/eh4xz2ZWF1nBkcxS+tGk= golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1388,12 +1431,20 @@ golang.org/x/sys v0.0.0-20220702020025-31831981b65f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1431,6 +1482,8 @@ golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4 golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y= +golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.8.2 h1:CCXrcPKiGGotvnN6jfUsKk4rRqm7q09/YbKb5xCEvtM= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= @@ -1443,6 +1496,7 @@ google.golang.org/api v0.108.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/ google.golang.org/api v0.110.0/go.mod h1:7FC4Vvx1Mooxh8C5HWjzZHcavuS2f6pmJpZx60ca7iI= google.golang.org/api v0.111.0/go.mod h1:qtFHvU9mhgTJegR31csQ+rwxyUTHOKFqCKWp1J0fdw0= google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= @@ -1467,6 +1521,8 @@ google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8/go.mod h1:HV8QO google.golang.org/protobuf v1.28.2-0.20230208135220-49eaa78c6c9c/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.2-0.20230222093303-bc1253ad3743/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.29.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.27 h1:kJdccidYzt3CaHD1crCFTS1hxyhSi059NhOFUf03YFo= @@ -1490,6 +1546,10 @@ gotest.tools/v3 v3.2.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= honnef.co/go/tools v0.3.3 h1:oDx7VAwstgpYpb3wv0oxiZlxY+foCpRAwY7Vk6XpAgA= honnef.co/go/tools v0.3.3/go.mod h1:jzwdWgg7Jdq75wlfblQxO4neNaFFSvgc1tD5Wv8U0Yw= +k8s.io/api v0.27.7 h1:7yG4D3t/q4utJe2ptlRw9aPuxcSmroTsYxsofkQNl/A= +k8s.io/api v0.27.7/go.mod h1:ZNExI/Lhrs9YrLgVWx6jjHZdoWCTXfBXuFjt1X6olro= +k8s.io/apimachinery v0.27.7 h1:Gxgtb7Y/Rsu8ymgmUEaiErkxa6RY4oTd8kNUI6SUR58= +k8s.io/apimachinery v0.27.7/go.mod h1:jBGQgTjkw99ef6q5hv1YurDd3BqKDk9YRxmX0Ozo0i8= k8s.io/code-generator v0.27.1 h1:GrfUeUrJ/RtPskIsnChcXOW6h0EGNqty0VxxQ9qYKlM= k8s.io/code-generator v0.27.1/go.mod h1:iWtpm0ZMG6Gc4daWfITDSIu+WFhFJArYDhj242zcbnY= k8s.io/component-helpers v0.27.1 h1:uY63v834MAHuf3fBiKGQGPq/cToU5kY5SW/58Xv0gl4= @@ -1504,9 +1564,12 @@ k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kms v0.27.1 h1:JTSQbJb+mcobScQwF0bOmZhIwP17k8GvBsiLlA6SQqw= k8s.io/kms v0.27.1/go.mod h1:VuTsw0uHlSycKLCkypCGxfFCjLfzf/5YMeATECd/zJA= +k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= +k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= k8s.io/metrics v0.27.1 h1:qIASSok+9dhKPrfAZmFreIdpgBgKTfXwkM9CQ+tNM90= k8s.io/metrics v0.27.1/go.mod h1:5sYmQTC3aeL/24kkJ5fYECVuIz0xhO6oipfGJ81JC1Y= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20230209194617-a36077c30491/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= mvdan.cc/gofumpt v0.3.1 h1:avhhrOmv0IuvQVK7fvwV91oFSGAk5/6Po8GXTzICeu8= mvdan.cc/gofumpt v0.3.1/go.mod h1:w3ymliuxvzVx8DAutBnVyDqYb1Niy/yCJt/lk821YCE= mvdan.cc/gofumpt v0.4.0/go.mod h1:PljLOHDeZqgS8opHRKLzp2It2VBuSdteAgqUfzMTxlQ= @@ -1525,4 +1588,5 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.1 h1:MB1zkK+WMOmfLx sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.1/go.mod h1:/4NLd21PQY0B+H+X0aDZdwUiVXYJQl/2NXA5KVtDiP4= sigs.k8s.io/kustomize/kustomize/v5 v5.0.1 h1:HWXbyKDNwGqol+s/sMNr/vnfNME/EoMdEraP4ZkUQek= sigs.k8s.io/kustomize/kustomize/v5 v5.0.1/go.mod h1:Q8o+soB41Pn1y26eXzG9cniuECDpTJe2eKOA1fENCU8= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0 h1:ucqkfpjg9WzSUubAO62csmucvxl4/JeW3F4I4909XkM= diff --git a/pkg/defaults/default.go b/pkg/defaults/default.go new file mode 100644 index 000000000..574383802 --- /dev/null +++ b/pkg/defaults/default.go @@ -0,0 +1,94 @@ +package defaults + +import ( + _ "embed" + "fmt" + "github.com/cosmology-tech/starship/pkg/types" + "gopkg.in/yaml.v3" +) + +//go:embed defaults.yaml +var defaultFile []byte + +func DefaultConfig() types.DefaultConfig { + config := types.DefaultConfig{} + + err := yaml.Unmarshal(defaultFile, &config) + if err != nil { + panic(fmt.Sprintf("unable to load default config file: err: %s", err)) + } + + return config +} + +func MergeConfigs(config types.Config, defaultConfig types.DefaultConfig) (types.Config, error) { + // merge chain config + chains := []*types.Chain{} + for _, chain := range config.Chains { + defaultChain, ok := defaultConfig.Chains[chain.Type] + if !ok { + continue + } + // set sidecars, scripts etc to defaultChain from defaultConfig + defaultChain.Faucet = defaultConfig.Faucet + defaultChain.Timeouts = defaultConfig.Timeouts + defaultChain.Scripts = defaultConfig.Scripts + defaultChain.Exposer = defaultConfig.Exposer + // set default resources for the chain from resources.node + defaultChain.Resources = defaultConfig.Node.Resources + + // merge defaultChain into chain + mc, err := chain.Merge(defaultChain) + if err != nil { + return types.Config{}, err + } + chains = append(chains, mc) + } + + // merge relayers config + relayers := []*types.Relayer{} + for _, relayer := range config.Relayers { + defaultRelayer, ok := defaultConfig.Relayers[relayer.Type] + if !ok { + continue + } + defaultRelayer.Resources = defaultConfig.Node.Resources + + mr, err := relayer.Merge(defaultRelayer) + if err != nil { + return types.Config{}, err + } + relayers = append(relayers, mr) + } + + mergedConfig := types.Config{ + Chains: chains, + Relayers: relayers, + } + + if config.Registry != nil { + merged, err := config.Registry.Merge(defaultConfig.Registry) + if err != nil { + return types.Config{}, err + } + mergedConfig.Registry = merged + } + + if config.Explorer != nil { + merged, err := config.Explorer.Merge(defaultConfig.Explorer) + if err != nil { + return types.Config{}, err + } + mergedConfig.Explorer = merged + } + + if config.Monitoring != nil { + merged, err := config.Monitoring.Merge(defaultConfig.Monitoring) + if err != nil { + return types.Config{}, err + } + mergedConfig.Monitoring = merged + } + + return mergedConfig, nil +} diff --git a/pkg/defaults/defaults.yaml b/pkg/defaults/defaults.yaml new file mode 100644 index 000000000..e60c7acb6 --- /dev/null +++ b/pkg/defaults/defaults.yaml @@ -0,0 +1,745 @@ +# Note: This file is embeded into the starship binary itself + +# Chain timeouts +timeouts: + time_iota_ms: 10 + timeout_propose: 400ms + timeout_propose_delta: 400ms + timeout_prevote: 400ms + timeout_prevote_delta: 400ms + timeout_precommit: 400ms + timeout_precommit_delta: 400ms + timeout_commit: 800ms + +node: + resources: + cpu: "0.5" + memory: "500M" + +wait: + resources: + cpu: "0.1" + memory: "100M" + +# API for interacting with the charts for devnet +# TODO: need a way to create state reaching jobs, those will run user bash scripts +# after the chain has been initialized, get the chain to a state and then complete +# Note: Order of `coins` matters, since we take the first one as part of gentx +chains: + osmosis: + image: ghcr.io/cosmology-tech/starship/osmosis:v15.1.2-wasmvm1.1.2 + home: /root/.osmosisd + binary: osmosisd + prefix: osmo + denom: uosmo + prettyName: osmosis + coins: 100000000000000uosmo,100000000000000uion + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/osmosis-labs/osmosis + assets: + - base: uosmo + description: "The native token of Osmosis" + name: Osmosis + display: osmo + symbol: OSMO + logo_URIs: + png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/osmo.png" + svg: "https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/osmo.svg" + denom_units: + - denom: uosmo + exponent: 0 + - denom: osmo + exponent: 6 + coingecko_id: osmosis + keywords: ["staking", "dex"] + - base: uion + name: Ion + display: ion + symbol: ION + logo_URIs: + png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/ion.png" + svg: "https://raw.githubusercontent.com/cosmos/chain-registry/master/osmosis/images/ion.svg" + denom_units: + - denom: uion + exponent: 0 + - denom: ion + exponent: 6 + coingecko_id: ion + keywords: ["memecoin"] + juno: + image: ghcr.io/cosmology-tech/starship/juno:v15.0.0 + home: /root/.juno + binary: junod + prefix: juno + denom: ujuno + prettyName: Juno + coins: 100000000000000ujuno + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/CosmosContracts/juno + assets: + - base: ujuno + description: "The native token of JUNO Chain" + name: Juno + display: juno + symbol: JUNO + logo_URIs: + png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/juno.png" + svg: "https://raw.githubusercontent.com/cosmos/chain-registry/master/juno/images/juno.svg" + denom_units: + - denom: ujuno + exponent: 0 + - denom: juno + exponent: 6 + coingecko_id: juno-network + wasmd: + image: anmol1696/wasmd:latest + home: /root/.wasmd + binary: wasmd + prefix: wasm + denom: stake + prettyName: Wasm + coins: 100000000000000stake,100000000000000ucosm + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/CosmWasm/wasmd + cosmos: + image: ghcr.io/cosmology-tech/starship/gaia:v9.1.1 + home: /root/.gaia + binary: gaiad + prefix: cosmos + denom: uatom + prettyName: Cosmos Hub + coins: 100000000000000uatom,100000000000000stake + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/cosmos/gaia + assets: + - base: uatom + description: "The native staking and governance token of the Cosmos Hub." + name: Cosmos Hub Atom + display: atom + symbol: ATOM + logo_URIs: + png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/cosmoshub/images/atom.png" + svg: "https://raw.githubusercontent.com/cosmos/chain-registry/master/cosmoshub/images/atom.svg" + denom_units: + - denom: uatom + exponent: 0 + - denom: atom + exponent: 6 + coingecko_id: atom + simapp: + image: ghcr.io/cosmology-tech/starship/simapp:v0.47.3 + home: /root/.simapp + binary: simd + prefix: cosmos + denom: stake + prettyName: Sim App + coins: 100000000000000stake + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/cosmos/cosmos-sdk/tree/main/simapp + persistencecore: + image: anmol1696/persistencecore:latest + home: /root/.persistenceCore + binary: persistenceCore + prefix: persistence + denom: uxprt + prettyName: Persistence + coins: 100000000000000uxprt + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/persistenceOne/persistenceCore + stride: + image: ghcr.io/cosmology-tech/starship/stride:v9.2.1 + home: /root/.stride + binary: strided + prefix: stride + denom: ustrd + prettyName: Stride + coins: 100000000000000ustrd + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/Stride-Labs/stride + assets: + - base: ustrd + description: The native token of Stride + denom_units: + - denom: ustrd + exponent: 0 + - denom: strd + exponent: 6 + name: Stride + display: strd + symbol: STRD + logo_URIs: + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/stride/images/strd.png + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/stride/images/strd.svg + coingecko_id: stride + - base: stuatom + denom_units: + - denom: stuatom + exponent: 0 + - denom: statom + exponent: 6 + name: stATOM + display: statom + symbol: stATOM + traces: + - type: liquid-stake + counterparty: + chain_name: cosmoshub + base_denom: uatom + provider: Stride + logo_URIs: + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/stride/images/statom.png + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/stride/images/statom.svg + coingecko_id: stride-staked-atom + injective: + image: ghcr.io/cosmology-tech/starship/injective:v1.11.6 + home: /root/.injectived + binary: injectived + prefix: inj + denom: inj + prettyName: Injective + coins: 100000000000000000000000000inj + hdPath: m/44'/60'/0'/0/0 + coinType: 60 + repo: https://github.com/InjectiveLabs/injective-chain-releases + faucet: + type: starship + scripts: + createGenesis: + file: scripts/injective/create-genesis.sh + updateGenesis: + file: scripts/injective/update-genesis.sh + createValidator: + file: scripts/injective/create-validator.sh + assets: + - base: inj + description: The INJ token is the native governance token for the Injective chain. + denom_units: + - denom: inj + exponent: 0 + - denom: INJ + exponent: 18 + name: Injective + display: INJ + symbol: INJ + logo_URIs: + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/injective/images/inj.png + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/injective/images/inj.svg + coingecko_id: injective-protocol + ics: + image: ghcr.io/cosmology-tech/starship/ics:v0.1.0 + home: /root/.ics + binary: interchain-security-pd + prefix: cosmos + denom: uatom + prettyName: ICS + coins: 100000000000000uatom,100000000000000stake + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/cosmos/interchain-security + cronos: + image: ghcr.io/cosmology-tech/starship/cronos:v1.0.4 + home: /root/.cronos + binary: cronosd + prefix: crc + denom: basecro + prettyName: Cronos + coins: 100000000000000basecro + hdPath: m/44'/60'/0'/0/0 + coinType: 60 + repo: https://github.com/crypto-org-chain/cronos + assets: + - base: basecro + description: Cronos Chain - Get Instant DApp Portability with EVM Support + denom_units: + - denom: basecro + exponent: 0 + - denom: cro + exponent: 18 + name: Cronos + display: cro + symbol: CRO + logo_URIs: + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/cronos/images/cro.svg + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/cronos/images/cronos.png + coingecko_id: crypto-com-chain + cryptoorgchain: + image: ghcr.io/cosmology-tech/starship/cryptoorgchain:v4.1.2 + home: /root/.cryptoorgchain + binary: chain-maind + prefix: cro + denom: basecro + prettyName: Crypto.org Chain + coins: 100000000000000basecro + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/crypto-org-chain/chain-main + assets: + - base: basecro + description: CRO is the native token of the Crypto.org Chain, referred to as Native CRO. + denom_units: + - denom: basecro + exponent: 0 + - denom: cro + exponent: 8 + name: Cronos + display: cro + symbol: CRO + logo_URIs: + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/cronos/images/cro.svg + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/cronos/images/cronos.png + coingecko_id: crypto-com-chain + evmos: + image: ghcr.io/cosmology-tech/starship/evmos:v13.0.1 + home: /root/.evmosd + binary: evmosd + prefix: evmos + denom: aevmos + prettyName: Evmos + coins: 100000000000000000000000000aevmos + hdPath: m/44'/60'/0'/0/0 + coinType: 60 + repo: https://github.com/evmos/evmos + faucet: + type: starship + assets: + - base: aevmos + description: The native EVM, governance and staking token of the Evmos Hub + denom_units: + - denom: aevmos + exponent: 0 + - denom: evmos + exponent: 18 + name: Evmos + display: evmos + symbol: EVMOS + logo_URIs: + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/evmos/images/evmos.svg + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/evmos/images/evmos.png + coingecko_id: evmos + regen: + image: ghcr.io/cosmology-tech/starship/regen:v5.0.0 + home: /root/.regen + binary: regen + prefix: regen + denom: uregen + prettyName: Regen + coins: 100000000000000uregen + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/regen-network/regen-ledger + assets: + - base: uregen + description: REGEN coin is the token for the Regen Network Platform + denom_units: + - denom: uregen + exponent: 0 + - denom: regen + exponent: 6 + name: Regen Network + display: regen + symbol: REGEN + logo_URIs: + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/regen/images/regen.svg + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/regen/images/regen.png + coingecko_id: regen + - base: eco.uC.NCT + description: Nature Carbon Ton (NCT) is a carbon token standard backed 1:1 by carbon + credits issued by Verra, a global leader in the voluntary carbon market. NCT credits + on Regen Network have been tokenized by Toucan.earth. + denom_units: + - denom: eco.uC.NCT + exponent: 0 + - denom: nct + exponent: 6 + name: Nature Carbon Ton + display: nct + symbol: NCT + logo_URIs: + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/regen/images/nct.svg + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/regen/images/nct.png + coingecko_id: toucan-protocol-nature-carbon-tonne + quasar: + image: ghcr.io/cosmology-tech/starship/quasar:v0.1.1 + home: /root/.quasarnode + binary: quasarnoded + prefix: quasar + denom: uqsr + prettyName: Quasar + coins: 100000000000000uqsr + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/quasar-finance/quasar-preview + assets: + - base: uqsr + description: The native token of Quasar + denom_units: + - denom: uqsr + exponent: 0 + - denom: qsr + exponent: 6 + name: Quasar + display: qsr + symbol: QSR + logo_URIs: + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/quasar/images/quasar.png + quicksilver: + image: ghcr.io/cosmology-tech/starship/quicksilver:v0.6.6 + home: /root/.quicksilverd + binary: quicksilverd + prefix: quick + denom: uqck + prettyName: Quicksilver + coins: 100000000000000uqck + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/ingenuity-build/quicksilver + assets: + - description: QCK - native token of Quicksilver + denom_units: + - denom: uqck + exponent: 0 + aliases: [ ] + - denom: qck + exponent: 6 + aliases: [ ] + base: uqck + name: Quicksilver + display: qck + symbol: QCK + logo_URIs: + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/quicksilver/images/qck.png + coingecko_id: quicksilver + - description: Quicksilver Liquid Staked STARS + denom_units: + - denom: uqstars + exponent: 0 + aliases: [ ] + - denom: qstars + exponent: 6 + aliases: [ ] + base: uqstars + name: Quicksilver Liquid Staked STARS + display: qstars + symbol: qSTARS + traces: + - type: liquid-stake + counterparty: + chain_name: stargaze + base_denom: ustars + provider: Quicksilver + logo_URIs: + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/quicksilver/images/qstars.png + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/quicksilver/images/qstars.svg + - description: Quicksilver Liquid Staked ATOM + denom_units: + - denom: uqatom + exponent: 0 + aliases: [ ] + - denom: qatom + exponent: 6 + aliases: [ ] + base: uqatom + name: Quicksilver Liquid Staked ATOM + display: qatom + symbol: qATOM + traces: + - type: liquid-stake + counterparty: + chain_name: cosmoshub + base_denom: uatom + provider: Quicksilver + logo_URIs: + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/quicksilver/images/qatom.png + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/quicksilver/images/qatom.svg + sei: + image: ghcr.io/cosmology-tech/starship/sei:2.0.46beta + home: /root/.seid + binary: seid + prefix: sei + denom: usei + prettyName: Sei + coins: 100000000000000usei + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/sei-protocol/sei-chain + assets: + - description: The native staking token of Sei. + denom_units: + - denom: usei + exponent: 0 + - denom: sei + exponent: 6 + base: usei + name: Sei + display: sei + symbol: SEI + logo_URIs: + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/sei/images/sei.png + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/sei/images/sei.svg + coingecko_id: sei-network + sommelier: + image: ghcr.io/cosmology-tech/starship/sommelier:v6.0.0 + home: /root/.sommelier + binary: sommelier + prefix: somm + denom: usomm + prettyName: Sommelier + coins: 100000000000000usomm + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/PeggyJV/sommelier + assets: + - description: Somm Token (SOMM) is the native staking token of the Sommelier Chain + denom_units: + - denom: usomm + exponent: 0 + aliases: + - microsomm + - denom: msomm + exponent: 3 + aliases: + - millisomm + - denom: somm + exponent: 6 + base: usomm + name: Somm + display: somm + symbol: SOMM + logo_URIs: + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/sommelier/images/somm.png + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/sommelier/images/somm.svg + coingecko_id: sommelier + stargaze: + image: ghcr.io/cosmology-tech/starship/stargaze:v10.0.1 + home: /root/.starsd + binary: starsd + prefix: stars + denom: ustars + prettyName: Stargaze + coins: 100000000000000ustars + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/public-awesome/stargaze + assets: + - description: The native token of Stargaze + denom_units: + - denom: ustars + exponent: 0 + - denom: stars + exponent: 6 + base: ustars + name: Stargaze + display: stars + symbol: STARS + logo_URIs: + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/stargaze/images/stars.svg + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/stargaze/images/stars.png + coingecko_id: stargaze + umee: + image: ghcr.io/cosmology-tech/starship/umee:v3.1.0 + home: /root/.umee + binary: umeed + prefix: umee + denom: uumee + prettyName: Umee + coins: 100000000000000uumee + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/umee-network/umee + assets: + - description: The native token of Umee + denom_units: + - denom: uumee + exponent: 0 + - denom: umee + exponent: 6 + base: uumee + name: Umee + display: umee + symbol: UMEE + logo_URIs: + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/umee/images/umee.svg + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/umee/images/umee.png + coingecko_id: umee + cheqd: + image: ghcr.io/cosmology-tech/starship/cheqd:v1.4.4 + home: /root/.cheqdnode + binary: cheqd-noded + prefix: cheqd + denom: ncheq + prettyName: Cheqd + coins: 100000000000000ncheq + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/cheqd/cheqd-node + assets: + - description: Native token for the cheqd network + denom_units: + - denom: ncheq + exponent: 0 + - denom: cheq + exponent: 9 + base: ncheq + display: cheq + name: cheqd + symbol: CHEQ + logo_URIs: + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/cheqd/images/cheq.png + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/cheqd/images/cheq.svg + coingecko_id: cheqd-network + neutron: + image: ghcr.io/cosmology-tech/starship/neutron:v1.0.4 + home: /root/.neutrond + binary: neutrond + prefix: neutron + denom: untrn + prettyName: Neutron + coins: 100000000000000untrn + hdPath: m/44'/118'/0'/0/0 + coinType: 118 + repo: https://github.com/neutron-org/neutron + scripts: + createGenesis: + file: scripts/neutron/create-neutron-genesis.sh + assets: + - description: The native token of Neutron chain. + denom_units: + - denom: untrn + exponent: 0 + - denom: ntrn + exponent: 6 + base: untrn + name: Neutron + display: ntrn + symbol: NTRN + logo_URIs: + png: https://raw.githubusercontent.com/cosmos/chain-registry/master/neutron/images/ntrn.png + svg: https://raw.githubusercontent.com/cosmos/chain-registry/master/neutron/images/ntrn.svg + coingecko_id: neutron + +relayers: + ts-relayer: + image: ghcr.io/cosmology-tech/starship/ts-relayer:0.9.0 + hermes: + image: ghcr.io/cosmology-tech/starship/hermes:1.6.0 + config: + global: + log_level: "info" + mode: + clients: + enabled: true + refresh: true + misbehaviour: true + connections: + enabled: true + channels: + enabled: true + packets: + enabled: true + clear_interval: 100 + clear_on_start: true + tx_confirmation: true + rest: + enabled: true + host: "127.0.0.1" + port: 3000 + telemetry: + enabled: true + host: "127.0.0.1" + port: 3001 + # custom config args + event_source: + mode: push # allowed values: push, pull. Valid only for 1.6.0+ + go-relayer: + image: ghcr.io/cosmology-tech/starship/go-relayer:v2.4.1 + +scripts: + createGenesis: + name: create-genesis.sh + file: scripts/default/create-genesis.sh + updateGenesis: + name: update-genesis.sh + file: scripts/default/update-genesis.sh + updateConfig: + name: update-config.sh + file: scripts/default/update-config.sh + createValidator: + name: create-validator.sh + file: scripts/default/create-validator.sh + transferTokens: + name: transfer-tokens.sh + file: scripts/default/transfer-tokens.sh + buildChain: + name: build-chain.sh + file: scripts/default/build-chain.sh + +faucets: + cosmjs: + image: ghcr.io/cosmology-tech/starship/cosmjs-faucet:v0.31.1 + concurrency: 5 + starship: + image: ghcr.io/cosmology-tech/starship/faucet:20230915-d75e5fd + concurrency: 5 + +cometmock: + image: ghcr.io/informalsystems/cometmock:v0.37.x + +exposer: + enabled: true + image: ghcr.io/cosmology-tech/starship/exposer:20231011-cdbd60b + ports: + rest: 8081 + resources: + cpu: "0.2" + memory: "200M" + +registry: + enabled: true + image: ghcr.io/cosmology-tech/starship/registry:20230915-6b2102d + localhost: true + ports: + rest: 6060 + grpc: 7070 + resources: + cpu: "0.2" + memory: "200M" + +explorer: + # Flag to enable explorer for cluster + enabled: false + type: ping-pub + image: ghcr.io/cosmology-tech/starship/ping-pub:6b7b0d096946b6bcd75d15350c7345da0d4576db + localhost: true + ports: + rest: 8080 + # Currently the ping-pub explorer is using alot of memory dues to building the site + # at runtime (with custom configs). Anything bellow 2Gi will crash the pods on startup + # todo: make this more efficient with faster startuptime + resources: + cpu: "1" + memory: "2Gi" + +faucet: + enabled: false + type: cosmjs + ports: + rest: 8000 + resources: + cpu: "0.2" + memory: "200M" + +monitoring: + enabled: false + ports: + prometheus: 8011 + grafana: 9011 + resources: + cpu: "0.2" + memory: "400M" diff --git a/pkg/loader/loader.go b/pkg/loader/loader.go new file mode 100644 index 000000000..aa7e56b36 --- /dev/null +++ b/pkg/loader/loader.go @@ -0,0 +1,7 @@ +package loader + +import "github.com/cosmology-tech/starship/pkg/types" + +type Loader interface { + LoadFile(files []string, defaultConfig types.DefaultConfig) (types.StarshipObject, error) +} diff --git a/pkg/loader/starship/chain.go b/pkg/loader/starship/chain.go new file mode 100644 index 000000000..9ab1dd5ef --- /dev/null +++ b/pkg/loader/starship/chain.go @@ -0,0 +1,454 @@ +package starship + +import ( + "fmt" + "github.com/cosmology-tech/starship/pkg/types" + "strconv" + "strings" +) + +func getChainPorts(hostPorts types.HostPort) []types.Ports { + // default ports + ports := []types.Ports{ + {Name: "p2p", ContainerPort: 26656, Protocol: "TCP"}, + {Name: "rpc", ContainerPort: 26657, Protocol: "TCP"}, + {Name: "address", ContainerPort: 26658, Protocol: "TCP"}, + {Name: "grpc", ContainerPort: 9090, Protocol: "TCP"}, + {Name: "rest", ContainerPort: 1317, Protocol: "TCP"}, + } + + for i, port := range ports { + hostPort := hostPorts.GetPort(port.Name) + if hostPort != 0 { + ports[i].HostPort = int32(hostPort) + } + } + + return ports +} + +func chainEnvVars(chainConfig types.Chain) []types.EnvVar { + envs := []types.EnvVar{ + {"KEYS_CONFIG", "/configs/keys.json"}, + {"NUM_VALIDATORS", strconv.Itoa(chainConfig.NumValidators)}, + {"DENOM", chainConfig.Denom}, + {"COINS", chainConfig.Coins}, + {"CHAIN_DIR", chainConfig.Home}, + {"CODE_REPO", chainConfig.Repo}, + {"DAEMON_HOME", chainConfig.Home}, + {"DAEMON_NAME", chainConfig.Binary}, + {"CHAIN_ID", chainConfig.GetChainID()}, + } + + buildEnv := types.EnvVar{"TO_BUILD", "false"} + if chainConfig.Build.Enabled { + buildEnv.Value = "true" + } + envs = append(envs, buildEnv) + + // add faucet environment vars + faucetEnv := types.EnvVar{"FUACET_ENABLED", "false"} + if chainConfig.Faucet != nil && chainConfig.Faucet.Enabled { + faucetEnv.Value = "true" + } + envs = append(envs, faucetEnv) + + // add timeout envrionment vars + for key, value := range chainConfig.Timeouts { + envs = append(envs, types.EnvVar{strings.ToUpper(key), value}) + } + + return envs +} + +// genesisInits returns object Init that indicates scripts files for +// init containers for genesis chain node +// genesisInit: [init-genesis, init-config] +func genesisInits(chainConfig types.Chain) ([]types.Init, error) { + inits := []types.Init{} + + envs := chainEnvVars(chainConfig) + + command := ` +VAL_INDEX=0 +echo "Validator Index: $VAL_INDEX" +if [ -f $CHAIN_DIR/cosmovisor/genesis/bin/$CHAIN_BIN ]; then + cp $CHAIN_DIR/cosmovisor/genesis/bin/$CHAIN_BIN /usr/bin +fi + +if [ -f $CHAIN_DIR/config/genesis.json ]; then + echo "Genesis file exists, exiting init container" + exit 0 +fi + +echo "Running setup genesis script..." +bash -e /scripts/create-genesis.sh +bash -e /scripts/update-genesis.sh + +echo "Create node id json file" +NODE_ID=$($CHAIN_BIN tendermint show-node-id) +echo '{"node_id":"'$NODE_ID'"}' > $CHAIN_DIR/config/node_id.json +` + mounts := []types.Mount{ + { + Name: "addresses", + MountPath: "/configs", + Path: "./configs", + }, + { + Name: "scripts", + MountPath: "/scripts", + Path: "./scripts", + }, + } + + // deal with overwriting genesis config map + // todo: need to implement this this + if chainConfig.Genesis != nil { + } + + genesisInit := types.Init{ + Name: "init-genesis", + Image: chainConfig.Image, + Command: []string{"bash", "-c", command}, + Environment: envs, + Mounts: mounts, + } + inits = append(inits, genesisInit) + + // init-config container + initCommand := ` +VAL_INDEX=${HOSTNAME##*-} +echo "Validator Index: $VAL_INDEX" +if [ -f $CHAIN_DIR/cosmovisor/genesis/bin/$CHAIN_BIN ]; then + cp $CHAIN_DIR/cosmovisor/genesis/bin/$CHAIN_BIN /usr/bin +fi + +echo "Running setup config script..." +bash -e /scripts/update-config.sh +` + configInit := types.Init{ + Name: "init-config", + Image: chainConfig.Image, + Environment: envs, + Command: []string{"bash", "-c", initCommand}, + Mounts: []types.Mount{ + { + Name: "configs", + MountPath: "/configs", + Path: "./configs", + }, + { + Name: "scripts", + MountPath: "/scripts", + Path: "./scripts", + }, + { + Name: "node", + MountPath: chainConfig.Home, + }, + }, + } + inits = append(inits, configInit) + + // faucet init + if chainConfig.Faucet != nil && chainConfig.Faucet.Enabled { + faucetCmd := ` +cp /bin/faucet /faucet/faucet +chmod +x /faucet/faucet +` + faucetInit := types.Init{ + Name: "init-faucet", + Image: chainConfig.Faucet.Image, + Command: []string{"bash", "-c", faucetCmd}, + WorkingDir: "", + Mounts: []types.Mount{ + { + Name: "faucet", + MountPath: "/faucet", + }, + }, + } + inits = append(inits, faucetInit) + } + + return inits, nil +} + +// validatorInits returns all the init containers for the validator node +// todo: each validator node down the line needs to be injected with following +// todo: envrionment variables: NODE_INDEX (corresponding to replica number), GENESIS_HOST (host of genesis to connect to) +// todo: GENESIS_PORT_* (all ports of the genesis node that are exposed) which to connect to. The initialization scripts will use +// todo: use them as if they are present, and then they are injected later +func validatorInits(cc types.Chain) ([]types.Init, error) { + inits := []types.Init{} + + envs := chainEnvVars(cc) + // actual values of NodeIndex is injected in the transformers, since it + // depends on the underlying implmentation + envs = append(envs, types.EnvVar{"NODE_INDEX", "0"}) + + command := `| +VAL_INDEX=${NODE_INDEX} +echo "Validator Index: $VAL_INDEX" +if [ -f $CHAIN_DIR/cosmovisor/genesis/bin/$CHAIN_BIN ]; then + cp $CHAIN_DIR/cosmovisor/genesis/bin/$CHAIN_BIN /usr/bin +fi + +if [ -f $CHAIN_DIR/config/genesis.json ]; then + echo "Genesis file exists, exiting early" + exit 0 +fi + +VAL_NAME=$(jq -r ".validators[0].name" $KEYS_CONFIG)-$VAL_INDEX +echo "Validator Index: $VAL_INDEX, Key name: $VAL_NAME" + +echo "Recover validator $VAL_NAME" +$CHAIN_BIN init $VAL_NAME --chain-id $CHAIN_ID +jq -r ".validators[0].mnemonic" $KEYS_CONFIG | $CHAIN_BIN keys add $VAL_NAME --index $VAL_INDEX --recover --keyring-backend="test" + +curl http://$GENESIS_HOST:$GENESIS_PORT_EXPOSER/genesis -o $CHAIN_DIR/config/genesis.json +echo "Genesis file that we got....." +cat $CHAIN_DIR/config/genesis.json + +echo "Create node id json file" +NODE_ID=$($CHAIN_BIN tendermint show-node-id) +echo '{"node_id":"'$NODE_ID'"}' > $CHAIN_DIR/config/node_id.json +` + + validatorInit := types.Init{ + Name: "init-validator", + Image: cc.Image, + Command: []string{"bash", "-c", command}, + Environment: envs, + } + inits = append(inits, validatorInit) + + // init-config container + // Note: NODE_INDEX is an envrionment variable that is injected into + // the system in the transformer, but the initialization scripts can use it. + initCommand := `| +VAL_INDEX=${NODE_INDEX} +echo "Validator Index: $VAL_INDEX" +if [ -f $CHAIN_DIR/cosmovisor/genesis/bin/$CHAIN_BIN ]; then + cp $CHAIN_DIR/cosmovisor/genesis/bin/$CHAIN_BIN /usr/bin +fi + +echo "Running setup config script..." +bash -e /scripts/update-config.sh +` + configInit := types.Init{ + Name: "init-config", + Image: cc.Image, + Environment: envs, + Command: []string{"bash", "-c", initCommand}, + } + inits = append(inits, configInit) + + return inits, nil +} + +func createExposerSidecar(chainConfig types.Chain) (types.NodeConfig, error) { + exposer := types.NodeConfig{ + Name: "exposer", + ContainerName: "exposer", + Image: "ghcr.io/cosmology-tech/starship/exposer:20231011-cdbd60b", + Environment: []types.EnvVar{ + { + Name: "EXPOSER_HTTP_PORT", + Value: "8081", + }, + { + Name: "EXPOSER_GRPC_PORT", + Value: "9099", + }, + { + Name: "EXPOSER_GENESIS_FILE", + Value: fmt.Sprintf("%s/config/genesis.json", chainConfig.Home), + }, + { + Name: "EXPOSER_MNEMONIC_FILE", + Value: "/configs/keys.json", + }, + { + Name: "EXPOSER_PRIV_VAL_FILE", + Value: fmt.Sprintf("%s/config/priv_validator_key.json", chainConfig.Home), + }, + { + Name: "EXPOSER_NODE_KEY_FILE", + Value: fmt.Sprintf("%s/config/node_key.json", chainConfig.Home), + }, + { + Name: "EXPOSER_NODE_ID_FILE", + Value: fmt.Sprintf("%s/config/node_id.json", chainConfig.Home), + }, + { + Name: "EXPOSER_PRIV_VAL_STATE_FILE", + Value: fmt.Sprintf("%s/data/priv_validator_state.json", chainConfig.Home), + }, + }, + Command: []string{"exposer"}, + Replicas: 1, + Resources: types.Resource{ + CPU: "100m", + Memory: "100Mi", + }, + ImagePullPolicy: "IfNotPresent", + } + + return exposer, nil +} + +// convertChainToServiceConfig creates a list of serviceConfig objects based on chain defination in config +// when a chain is converted to NodeConfig, then these containers are created: +// - {chain}-genesis +// init: [init-genesis, init-config] +// sidecars: [exposer, faucet(optional)] +// - {chain}-validator +// dependson: genesis +// init: [init-validator, init-config] +// sidecars: [exposer] +// - {chain}-cometmock (optional) +// dependson: genesis, validator +// init: [init-cometmock] +func convertChainToNodeConfig(chainConfig types.Chain) ([]types.NodeConfig, error) { + allNodes := []types.NodeConfig{} + + mounts := []types.Mount{ + { + Name: "configs", + MountPath: "/configs", + Path: "./configs", + }, + { + Name: "scripts", + MountPath: "/scripts", + Path: "./scripts", + }, + { + Name: "node", + MountPath: chainConfig.Home, + }, + } + + inits, err := genesisInits(chainConfig) + if err != nil { + return nil, err + } + + exposer, err := createExposerSidecar(chainConfig) + if err != nil { + return nil, err + } + + envs := chainEnvVars(chainConfig) + + // initialize genesis node + genesis := types.NodeConfig{ + Name: fmt.Sprintf("%s-genesis", chainConfig.Name), + ContainerName: strings.Replace(fmt.Sprintf("%s-genesis", chainConfig.Name), "_", "-", -1), + Controller: "statefulset", // this is specific to k8s, and is ignored for others + Image: chainConfig.Image, + Port: getChainPorts(chainConfig.Ports), + Environment: envs, + Command: nil, + ScriptFiles: nil, + WorkingDir: "", + Init: inits, + DependsOn: nil, + Replicas: 1, + Labels: map[string]string{ + "instance": chainConfig.GetName(), + "type": chainConfig.Type, + "rawname": chainConfig.Name, + }, + Annotations: map[string]string{ + "quality": "release", + "role": "node", + "sla": "medium", + "tier": "genesis", + }, + Sidecars: []*types.NodeConfig{&exposer}, + Resources: chainConfig.Resources, + ImagePullPolicy: "IfNotPresent", + Mounts: mounts, + } + allNodes = append(allNodes, genesis) + + // return early incase of no validators + if chainConfig.NumValidators <= 1 { + return allNodes, nil + } + + validatorInits, err := validatorInits(chainConfig) + if err != nil { + return nil, err + } + + validatorExposer, err := createExposerSidecar(chainConfig) + if err != nil { + return nil, err + } + + validatorCmd := ` +set -eux +START_ARGS="" + +# Starting the chain +if [ -f $CHAIN_DIR/cosmovisor/genesis/bin/$CHAIN_BIN ]; then + cp $CHAIN_DIR/cosmovisor/genesis/bin/$CHAIN_BIN /usr/bin + /usr/bin/cosmovisor start $START_ARGS +else + $CHAIN_BIN start $START_ARGS +fi +` + postStartCmd := ` +set -eux +VAL_INDEX=${NODE_INDEX} +VAL_NAME="$(jq -r ".validators[0].name" $KEYS_CONFIG)-$VAL_INDEX" +echo "Validator Index: $VAL_INDEX, Key name: $VAL_NAME. Chain bin $CHAIN_BIN" + +VAL_ADDR=$($CHAIN_BIN keys show $VAL_NAME -a --keyring-backend="test") +echo "Transfer tokens to address $VAL_ADDR before trying to create validator. Best effort" +bash -e /scripts/transfer-tokens.sh \ + $VAL_ADDR \ + $DENOM \ + http://$GENESIS_HOST:$GENESIS_PORT_FAUCET/credit \ + "$FAUCET_ENABLED" || true + +$CHAIN_BIN keys list --keyring-backend test | jq +VAL_NAME=$VAL_NAME bash -e /scripts/create-validator.sh +` + + validatorNodes := types.NodeConfig{ + Name: fmt.Sprintf("%s-validator", chainConfig.Name), + ContainerName: strings.Replace(fmt.Sprintf("%s-validator", chainConfig.Name), "_", "-", -1), + Controller: "statefulset", + Image: chainConfig.Image, + Environment: envs, + Port: getChainPorts(chainConfig.Ports), + Command: []string{"bash", "\"-c\"", validatorCmd}, + Init: validatorInits, + DependsOn: []*types.NodeConfig{&genesis}, + Replicas: chainConfig.NumValidators - 1, + Sidecars: []*types.NodeConfig{&validatorExposer}, + Resources: chainConfig.Resources, + ImagePullPolicy: "IfNotPresent", + Mounts: mounts, + Labels: map[string]string{ + "instance": chainConfig.GetName(), + "type": chainConfig.Type, + "rawname": chainConfig.Name, + }, + Annotations: map[string]string{ + "quality": "release", + "role": "node", + "sla": "medium", + "tier": "validator", + }, + PostStart: []string{"bash", "\"-c\"", "\"-e\"", postStartCmd}, + } + allNodes = append(allNodes, validatorNodes) + + return allNodes, nil +} diff --git a/pkg/loader/starship/starship.go b/pkg/loader/starship/starship.go new file mode 100644 index 000000000..48056b025 --- /dev/null +++ b/pkg/loader/starship/starship.go @@ -0,0 +1,62 @@ +package starship + +import ( + "errors" + "github.com/cosmology-tech/starship/pkg/defaults" + "github.com/cosmology-tech/starship/pkg/types" + "go.uber.org/zap" + "gopkg.in/yaml.v3" + "os" +) + +// Starship is starship config file loader, implements Loader interface +type Starship struct { + logger *zap.Logger +} + +func NewStarship(logger *zap.Logger) Starship { + return Starship{logger: logger} +} + +func (s *Starship) LoadFile(files []string, defaultConfig types.DefaultConfig) ([]types.NodeConfig, error) { + if len(files) > 1 { + return nil, errors.New("loading from multiple files not supported, yet") + } + config, err := s.loadConfig(files[0]) + if err != nil { + return nil, err + } + mergedConfig, err := defaults.MergeConfigs(config, defaultConfig) + + return convertConfigToObject(mergedConfig) +} + +// loadConfig reads the file into config object +func (s *Starship) loadConfig(file string) (types.Config, error) { + config := &types.Config{} + yamlFile, err := os.ReadFile(file) + if err != nil { + return types.Config{}, err + } + err = yaml.Unmarshal(yamlFile, config) + if err != nil { + return types.Config{}, err + } + + return *config, nil +} + +// convertConfigToObject converts basic Config object into Starship object, this would prefill informations +// based on chains, relayers and explorers +func convertConfigToObject(config types.Config) ([]types.NodeConfig, error) { + nodes := []types.NodeConfig{} + for _, cc := range config.Chains { + chainNodes, err := convertChainToNodeConfig(*cc) + if err != nil { + return nil, err + } + nodes = append(nodes, chainNodes...) + } + + return nodes, nil +} diff --git a/pkg/transformer/kubernetes/kubernetes.go b/pkg/transformer/kubernetes/kubernetes.go new file mode 100644 index 000000000..c1a3f5559 --- /dev/null +++ b/pkg/transformer/kubernetes/kubernetes.go @@ -0,0 +1,138 @@ +package kubernetes + +import ( + "fmt" + "github.com/cosmology-tech/starship/pkg/types" + "go.uber.org/zap" + appsv1 "k8s.io/api/apps/v1" + api "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +// Kubernetes implements Transformer interface and represents Kubernetes transformer +type Kubernetes struct { + logger *zap.Logger + // the user provided options from the command line + Opt types.ConvertOptions +} + +func NewKubernetes(logger *zap.Logger) Kubernetes { + return Kubernetes{logger: logger} +} + +const ( + // DeploymentController is controller type for Deployment + DeploymentController = "deployment" + // DaemonSetController is controller type for DaemonSet + DaemonSetController = "daemonset" + // StatefulStateController is controller type for StatefulSet + StatefulStateController = "statefulset" +) + +func (k *Kubernetes) configAllLabels(name string, labels map[string]string) map[string]string { + base := ConfigLabels(name) + for key, v := range labels { + newKey := fmt.Sprintf("apps.kubernetes.io/%s", key) + base[newKey] = v + } + return base +} + +func (k *Kubernetes) nodeConfigToStatefulSets(nodeConfig types.NodeConfig) (*appsv1.StatefulSet, error) { + podSpec, err := k.PodSpecWithNodeConfig(nodeConfig) + if err != nil { + return nil, err + } + rp := int32(nodeConfig.Replicas) + ds := &appsv1.StatefulSet{ + TypeMeta: metav1.TypeMeta{ + Kind: "StatefulSet", + APIVersion: "apps/v1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: nodeConfig.ContainerName, + }, + Spec: appsv1.StatefulSetSpec{ + Replicas: &rp, + Template: api.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: k.configAllLabels(nodeConfig.ContainerName, nodeConfig.Labels), + Annotations: nodeConfig.Annotations, + }, + Spec: podSpec, + }, + Selector: &metav1.LabelSelector{ + MatchLabels: k.configAllLabels(nodeConfig.ContainerName, nodeConfig.Labels), + }, + ServiceName: nodeConfig.ContainerName, + }, + } + return ds, nil +} + +func (k *Kubernetes) ContainerFromNodeConfig(nodeConfig types.NodeConfig) (api.Container, error) { + resources, err := ResourceRequirementsFromConfig(nodeConfig.Resources) + if err != nil { + return api.Container{}, err + } + + vms := VolumeMountsFromNodeConfig(nodeConfig) + + return api.Container{ + Name: nodeConfig.ContainerName, + Image: nodeConfig.Image, + Command: nodeConfig.Command, + WorkingDir: nodeConfig.WorkingDir, + Env: EnvVarFromNodeConfig(nodeConfig), + Resources: resources, + VolumeMounts: vms, + ImagePullPolicy: api.PullPolicy(nodeConfig.ImagePullPolicy), + }, nil +} + +func (k *Kubernetes) PodSpecWithNodeConfig(nodeConfig types.NodeConfig) (api.PodSpec, error) { + initContainers, err := InitContainers(nodeConfig) + if err != nil { + return api.PodSpec{}, err + } + + container, err := k.ContainerFromNodeConfig(nodeConfig) + pod := api.PodSpec{ + RestartPolicy: api.RestartPolicyOnFailure, + InitContainers: initContainers, + Containers: []api.Container{container}, + } + + // return early incase of no sidecars + if nodeConfig.Sidecars == nil { + return pod, nil + } + + for _, sidecar := range nodeConfig.Sidecars { + sidecarContainer, err := k.ContainerFromNodeConfig(*sidecar) + if err != nil { + return api.PodSpec{}, err + } + pod.Containers = append(pod.Containers, sidecarContainer) + } + + return pod, nil +} + +func (k *Kubernetes) Transform(nodeConfigs []types.NodeConfig, opts types.ConvertOptions) (RuntimeObjects, error) { + var allobjects []runtime.Object + + for _, nodeConfig := range nodeConfigs { + if nodeConfig.Controller == StatefulStateController { + nss, err := k.nodeConfigToStatefulSets(nodeConfig) + if err != nil { + return RuntimeObjects{}, err + } + k.logger.Info("converted nodeconfig to statefulset", zap.Any("statefulset", nss)) + allobjects = append(allobjects, nss) + } + } + + return RuntimeObjects{allobjects}, nil +} diff --git a/pkg/transformer/kubernetes/object.go b/pkg/transformer/kubernetes/object.go new file mode 100644 index 000000000..8c0df9a50 --- /dev/null +++ b/pkg/transformer/kubernetes/object.go @@ -0,0 +1,48 @@ +package kubernetes + +import ( + "errors" + "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "os" + "path/filepath" +) + +// RuntimeObjects holds the return type for the Transformer, which implements +// transformer.Objects interface +type RuntimeObjects struct { + Objects []runtime.Object +} + +// WriteToFile implements the transformer.Object interface +func (ro *RuntimeObjects) WriteToFile(dir string) error { + err := os.MkdirAll(dir, os.ModePerm) + if err != nil { + return err + } + + // create files + for _, obj := range ro.Objects { + data, err := marshal(obj, false, 2) + if err != nil { + return err + } + + mo, ok := obj.(metav1.Object) + if !ok { + fmt.Println("unstructured object", mo) + return errors.New("unable to change interface") + } + file := filepath.Join(dir, mo.GetName()) + ".yaml" + if err := os.WriteFile(file, data, 0644); err != nil { + return errors.New("Failed to write: " + err.Error()) + } + } + + return nil +} + +func (ro *RuntimeObjects) Validate() error { + return nil +} diff --git a/pkg/transformer/kubernetes/utils.go b/pkg/transformer/kubernetes/utils.go new file mode 100644 index 000000000..46dcb4f90 --- /dev/null +++ b/pkg/transformer/kubernetes/utils.go @@ -0,0 +1,208 @@ +package kubernetes + +import ( + "bytes" + "encoding/json" + "fmt" + "github.com/cosmology-tech/starship/pkg/types" + "gopkg.in/yaml.v3" + api "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + "k8s.io/apimachinery/pkg/runtime" +) + +const Selector = "apps.kubernetes.io/name" + +// ConfigLabels configures label name alone +func ConfigLabels(name string) map[string]string { + return map[string]string{Selector: name} +} + +func ResourceRequirementsFromConfig(r types.Resource) (api.ResourceRequirements, error) { + rr := api.ResourceRequirements{ + Requests: api.ResourceList{}, + Limits: api.ResourceList{}, + } + + if r.CPU != "" { + cpu, err := resource.ParseQuantity(r.CPU) + if err != nil { + return rr, err + } + rr.Requests[api.ResourceCPU] = cpu + rr.Limits[api.ResourceCPU] = cpu + } + + if r.Memory != "" { + mem, err := resource.ParseQuantity(r.Memory) + if err != nil { + return rr, err + } + rr.Requests[api.ResourceMemory] = mem + rr.Limits[api.ResourceMemory] = mem + } + + return rr, nil +} + +func InitWaitContainer(nodeConfig types.NodeConfig) (api.Container, error) { + cmdfmt := ` +while [ $(curl -sw '%s' http://%s.$NAMESPACE.svc.cluster.local:%s/%s -o /dev/null) -ne 200 ]; do + echo "Genesis validator does not seem to be ready for: %s. Waiting for it to start..." + sleep 10; +done +` + cmd := "" + for _, deps := range nodeConfig.DependsOn { + // note: add exposer port for waiting for chain + // todo: make this dependent on NodeConfig readiness information + cmd = cmd + "\n" + fmt.Sprintf(cmdfmt, "%{http_code}", deps.ContainerName, "8081", "node_id", deps.ContainerName) + } + + // set default resources to 100m and 100Mi for container + resources, err := ResourceRequirementsFromConfig(types.Resource{CPU: "100m", Memory: "100Mi"}) + if err != nil { + return api.Container{}, err + } + + wait := api.Container{ + Name: "wait", + Image: "curlimages/curl", + ImagePullPolicy: api.PullPolicy(nodeConfig.ImagePullPolicy), + Command: []string{ + "bash", + "-c", + cmd, + }, + Env: []api.EnvVar{ + { + Name: "NAMESPACE", + ValueFrom: &api.EnvVarSource{ + FieldRef: &api.ObjectFieldSelector{ + FieldPath: "metadata.namespace", + }, + }, + }, + }, + Resources: resources, + } + + return wait, nil +} + +func EnvVarFromNodeConfig(nodeConfig types.NodeConfig) []api.EnvVar { + envs := []api.EnvVar{} + for _, nenv := range nodeConfig.Environment { + envs = append(envs, api.EnvVar{ + Name: nenv.Name, + Value: nenv.Value, + }) + } + return envs +} + +func VolumeMountsFromNodeConfig(nodeConfig types.NodeConfig) []api.VolumeMount { + volumeMounts := []api.VolumeMount{} + for _, mount := range nodeConfig.Mounts { + vm := api.VolumeMount{ + Name: mount.Name, + MountPath: mount.MountPath, + } + volumeMounts = append(volumeMounts, vm) + } + + return volumeMounts +} + +func InitContainers(nodeConfig types.NodeConfig) ([]api.Container, error) { + initContainers := []api.Container{} + + res, err := ResourceRequirementsFromConfig(nodeConfig.Resources) + if err != nil { + return nil, err + } + + volumeMounts := VolumeMountsFromNodeConfig(nodeConfig) + + // add init-wait containers based on nodeConfig.DependsOn + if len(nodeConfig.DependsOn) > 0 { + waitInitContainer, err := InitWaitContainer(nodeConfig) + if err != nil { + return nil, err + } + initContainers = append(initContainers, waitInitContainer) + } + + for _, init := range nodeConfig.Init { + envs := []api.EnvVar{} + for _, nenv := range nodeConfig.Environment { + envs = append(envs, api.EnvVar{ + Name: nenv.Name, + Value: nenv.Value, + }) + } + initContainer := api.Container{ + Name: init.Name, + Image: init.Image, + ImagePullPolicy: api.PullPolicy(nodeConfig.ImagePullPolicy), + Env: EnvVarFromNodeConfig(nodeConfig), + Command: init.Command, + Resources: res, + VolumeMounts: volumeMounts, + } + initContainers = append(initContainers, initContainer) + } + return initContainers, nil +} + +// marshal object runtime.Object and return byte array +func marshal(obj runtime.Object, jsonFormat bool, indent int) (data []byte, err error) { + // convert data to yaml or json + if jsonFormat { + data, err = json.MarshalIndent(obj, "", " ") + } else { + data, err = marshalWithIndent(obj, indent) + } + if err != nil { + data = nil + } + return +} + +// Convert JSON to YAML. +func jsonToYaml(j []byte, spaces int) ([]byte, error) { + // Convert the JSON to an object. + var jsonObj interface{} + // We are using yaml.Unmarshal here (instead of json.Unmarshal) because the + // Go JSON library doesn't try to pick the right number type (int, float, + // etc.) when unmarshling to interface{}, it just picks float64 + // universally. go-yaml does go through the effort of picking the right + // number type, so we can preserve number type throughout this process. + err := yaml.Unmarshal(j, &jsonObj) + if err != nil { + return nil, err + } + + var b bytes.Buffer + + encoder := yaml.NewEncoder(&b) + encoder.SetIndent(spaces) + if err := encoder.Encode(jsonObj); err != nil { + return nil, err + } + return b.Bytes(), nil +} + +func marshalWithIndent(o interface{}, indent int) ([]byte, error) { + j, err := json.Marshal(o) + if err != nil { + return nil, fmt.Errorf("error marshaling into JSON: %s", err.Error()) + } + + y, err := jsonToYaml(j, indent) + if err != nil { + return nil, fmt.Errorf("error converting JSON to YAML: %s", err.Error()) + } + + return y, nil +} diff --git a/pkg/transformer/transform.go b/pkg/transformer/transform.go new file mode 100644 index 000000000..c029f800c --- /dev/null +++ b/pkg/transformer/transform.go @@ -0,0 +1,14 @@ +package transformer + +import ( + "github.com/cosmology-tech/starship/pkg/types" +) + +type Objects interface { + WriteToFile(dir string) error + Validate() error +} + +type Transformer interface { + Transform([]types.NodeConfig, types.ConvertOptions) (Objects, error) +} diff --git a/pkg/types/config.go b/pkg/types/config.go new file mode 100644 index 000000000..eaeac5b1b --- /dev/null +++ b/pkg/types/config.go @@ -0,0 +1,284 @@ +package types + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" +) + +type Chain struct { + Name string `name:"name" json:"name,omitempty" yaml:"name"` + Type string `name:"type" json:"type,omitempty" yaml:"type"` + NumValidators int `name:"num-validators" json:"num_validators,omitempty" yaml:"numValidators"` + Image string `name:"image" json:"image,omitempty" yaml:"image,omitempty"` + // Chain specifics + Home string `name:"home" json:"home,omitempty" yaml:"home,omitempty"` + Binary string `name:"binary" json:"binary,omitempty" yaml:"binary,omitempty"` + Prefix string `name:"prefix" json:"prefix,omitempty" yaml:"prefix,omitempty"` + Denom string `name:"denom" json:"denom,omitempty" yaml:"denom,omitempty"` + PrettyName string `name:"pretty-name" json:"pretty_name,omitempty" yaml:"prettyName,omitempty"` + Coins string `name:"coins" json:"coins,omitempty" yaml:"coins,omitempty"` + HDPath string `name:"hd-path" json:"hd_path,omitempty" yaml:"hdPath,omitempty"` + CoinType string `name:"coin-type" json:"coin_type,omitempty" yaml:"coinType,omitempty"` + Repo string `name:"repo" json:"repo,omitempty" yaml:"repo,omitempty"` + // Custom modifications + Scripts map[string]ScriptData `name:"scripts" json:"scripts,omitempty" yaml:"scripts"` + Upgrade Upgrade `name:"upgrade" json:"upgrade,omitempty" yaml:"upgrade"` + Genesis map[string]interface{} `name:"genesis" json:"genesis,omitempty" yaml:"genesis"` + Timeouts map[string]string `name:"timeouts" json:"timeouts,omitempty" yaml:"timeouts"` + // Feature toggles + Build Build `name:"build" json:"build,omitempty" yaml:"build,omitempty"` + Cometmock *Feature `name:"cometmock" json:"cometmock,omitempty" yaml:"cometmock,omitempty"` + ICS *Feature `name:"ics" json:"ics,omitempty" yaml:"ics,omitempty"` + // Chain sidecars + Faucet *Faucet `name:"facuet" json:"faucet,omitempty" yaml:"faucet,omitempty"` + Exposer *Feature `name:"exposer" json:"exposer,omitempty" yaml:"exposer,omitempty"` + // Additional information + Ports HostPort `name:"ports" json:"ports,omitempty" yaml:"ports,omitempty"` + Resources Resource `name:"resource" json:"resources,omitempty" yaml:"resources,omitempty"` +} + +func (c *Chain) GetName() string { + return strings.Replace(c.Name, "_", "-", -1) +} + +func (c *Chain) GetChainID() string { + return c.Name +} + +func (c *Chain) GetRPCAddr() string { + return fmt.Sprintf("http://localhost:%d", c.Ports.Rpc) +} + +func (c *Chain) GetRESTAddr() string { + return fmt.Sprintf("http://localhost:%d", c.Ports.Rest) +} + +func (c *Chain) ToMap() (map[string]interface{}, error) { + var chainMap map[string]interface{} + oj, err := json.Marshal(c) + if err != nil { + return nil, err + } + err = json.Unmarshal(oj, &chainMap) + if err != nil { + return nil, err + } + + return chainMap, nil +} + +// Merge performs a strategic merge with the given chain, returns a new pointer +func (c *Chain) Merge(chain *Chain) (*Chain, error) { + originalMap, err := c.ToMap() + if err != nil { + return nil, err + } + overrideMap, err := chain.ToMap() + if err != nil { + return nil, err + } + + mergedChain := &Chain{} + // note the order of args is important + mergedMap := mergeMaps(overrideMap, originalMap) + bz, err := json.Marshal(mergedMap) + if err != nil { + return nil, err + } + err = json.Unmarshal(bz, mergedChain) + if err != nil { + return nil, err + } + + return mergedChain, nil +} + +type ScriptData struct { + File string `name:"file" json:"file,omitempty" yaml:"file"` + Data string `name:"data" json:"data,omitempty" yaml:"data"` +} + +type Upgrade struct { + Enabled bool `name:"eanbled" json:"enabled" yaml:"enabled"` + Type string `name:"type" json:"type" yaml:"type"` + Genesis string `name:"genesis" json:"genesis" yaml:"genesis"` + Upgrades []struct { + Name string `name:"name" json:"name" yaml:"name"` + Version string `name:"version" json:"version" yaml:"version"` + } `name:"upgrades" json:"upgrades" yaml:"upgrades"` +} + +type Build struct { + Enabled bool `name:"enabled" json:"enabled,omitempty" yaml:"enabled,omitempty"` + Source string `name:"source" json:"source,omitempty" yaml:"source,omitempty"` +} + +type HostPort struct { + Rest int `name:"rest" json:"rest" yaml:"rest"` + Rpc int `name:"rpc" json:"rpc" yaml:"rpc"` + Grpc int `name:"grpc" json:"grpc" yaml:"grpc"` + Exposer int `name:"exposer" json:"exposer" yaml:"exposer"` + Faucet int `name:"faucet" json:"faucet" yaml:"faucet"` + Prometheus int `name:"prometheus" json:"prometheus,omitempty" yaml:"prometheus,omitempty"` + Grafana int `name:"grafana" json:"grafana,omitempty" yaml:"grafana,omitempty"` +} + +func (p HostPort) GetPort(port string) int { + t := reflect.TypeOf(p) + v := reflect.ValueOf(p) + + for i := 0; i < t.NumField(); i++ { + field := t.Field(i) + value := v.Field(i).Int() + fieldName := field.Tag.Get("name") + + if fieldName == port { + return int(value) + } + } + return 0 +} + +type Relayer struct { + Name string `name:"name" json:"name" yaml:"name"` + Type string `name:"type" json:"type" yaml:"type"` + Image string `name:"image" json:"image,omitempty" yaml:"image,omitempty"` + Replicas int `name:"replicas" json:"replicas" yaml:"replicas"` + Chains []string `name:"chains" json:"chains" yaml:"chains"` + Config interface{} `name:"config" json:"config,omitempty" yaml:"config,omitempty"` + Resources Resource `name:"resources" json:"resources,omitempty" yaml:"resources,omitempty"` +} + +// Merge performs a stratigic merge between relayer and given +// todo: implement, how to deal with Relayer.Config?? +func (r *Relayer) Merge(relayer *Relayer) (*Relayer, error) { + return r, nil +} + +type Faucet struct { + Enabled bool `name:"enabled" json:"enabled" yaml:"enabled"` + Type string `name:"type" json:"type,omitempty" yaml:"type,omitempty"` + Image string `name:"image" json:"image,omitempty" yaml:"image,omitempty"` + Localhost bool `name:"localhost" json:"localhost,omitempty" yaml:"localhost,omitempty"` + Ports HostPort `name:"ports" json:"ports,omitempty" yaml:"ports,omitempty"` + Resources Resource `name:"resources" json:"resources,omitempty" yaml:"resources,omitempty"` + Concurrency int `name:"concurrency" json:"concurrency,omitempty" yaml:"concurrency,omitempty"` +} + +type Feature struct { + Enabled bool `name:"enabled" json:"enabled" yaml:"enabled"` + Type string `name:"type" json:"type,omitempty" yaml:"type,omitempty"` + Image string `name:"image" json:"image,omitempty" yaml:"image,omitempty"` + Localhost bool `name:"localhost" json:"localhost,omitempty" yaml:"localhost,omitempty"` + Ports HostPort `name:"ports" json:"ports,omitempty" yaml:"ports,omitempty"` + Resources Resource `name:"resources" json:"resources,omitempty" yaml:"resources,omitempty"` +} + +func (f *Feature) GetRPCAddr() string { + return fmt.Sprintf("http://localhost:%d", f.Ports.Rpc) +} + +func (f *Feature) GetRESTAddr() string { + return fmt.Sprintf("http://localhost:%d", f.Ports.Rest) +} + +func (f *Feature) ToMap() (map[string]interface{}, error) { + var newMap map[string]interface{} + oj, err := json.Marshal(f) + if err != nil { + return nil, err + } + err = json.Unmarshal(oj, &newMap) + if err != nil { + return nil, err + } + + return newMap, nil +} + +func (f *Feature) Merge(other *Feature) (*Feature, error) { + originalMap, err := f.ToMap() + if err != nil { + return nil, err + } + overrideMap, err := other.ToMap() + if err != nil { + return nil, err + } + + merged := &Feature{} + // note the order of args is important + mergedMap := mergeMaps(overrideMap, originalMap) + bz, err := json.Marshal(mergedMap) + if err != nil { + return nil, err + } + err = json.Unmarshal(bz, merged) + if err != nil { + return nil, err + } + + return merged, nil +} + +// Config is the struct for the config.yaml setup file +// Need not be fully compatible with the values.schema.json file, just need +// parts of the config file for performing various functions, mainly port-forwarding +// todo: move this to a more common place, outside just tests +// todo: can be moved to proto defination +type Config struct { + Timeouts map[string]string `name:"timeouts" json:"timeouts,omitempty" yaml:"timeouts,omitempty"` + Chains []*Chain `name:"chains" json:"chains,omitempty" yaml:"chains,omitempty"` + Relayers []*Relayer `name:"relayers" json:"relayers,omitempty" yaml:"relayers,omitempty"` + Explorer *Feature `name:"explorer" json:"explorer,omitempty" yaml:"explorer,omitempty"` + Registry *Feature `name:"registry" json:"registry,omitempty" yaml:"registry,omitempty"` + Monitoring *Feature `name:"monitoring" json:"monitoring,omitempty" yaml:"monitoring,omitempty"` +} + +// HasChainId returns true if chain id found in list of chains +func (c *Config) HasChainId(chainId string) bool { + for _, chain := range c.Chains { + if chain.Name == chainId { + return true + } + } + + return false +} + +// GetChain returns the Chain object pointer for the given chain id +func (c *Config) GetChain(chainId string) *Chain { + for _, chain := range c.Chains { + if chain.Name == chainId { + return chain + } + } + + return nil +} + +// DefaultConfig is a struct that holds the default config for various aspects +type DefaultConfig struct { + Timeouts map[string]string `name:"timeouts" json:"timeouts" yaml:"timeouts"` + Chains map[string]*Chain `name:"chains" json:"chains" yaml:"chains"` + Relayers map[string]*Relayer `name:"relayers" json:"relayers" yaml:"relayers"` + Faucets map[string]*Faucet `name:"faucets" json:"faucets" yaml:"faucets"` + Scripts map[string]ScriptData `name:"scripts" json:"scripts,omitempty" yaml:"scripts"` + // chain sidecars + Exposer *Feature `name:"exposer" json:"exposer,omitempty" yaml:"exposer,omitempty"` + Faucet *Faucet `name:"faucet" json:"faucet,omitempty" yaml:"faucet,omitempty"` + Cometmock *Feature `name:"cometmock" json:"cometmock,omitempty" yaml:"cometmock,omitempty"` + // feature toggles + Registry *Feature `name:"registry" json:"registry,omitempty" yaml:"registry,omitempty"` + Explorer *Feature `name:"explorer" json:"explorer,omitempty" yaml:"explorer,omitempty"` + Monitoring *Feature `name:"monitoring" json:"monitoring,omitempty" yaml:"monitoring,omitempty"` + // default resources + Node DefaultResource `name:"node" json:"node,omitempty" yaml:"node,omitempty"` + Wait DefaultResource `name:"wait" json:"wait,omitempty" yaml:"wait,omitempty"` +} + +type DefaultResource struct { + Resources Resource `name:"resources" json:"resources,omitempty" yaml:"resources,omitempty"` +} diff --git a/pkg/types/config_test.go b/pkg/types/config_test.go new file mode 100644 index 000000000..1cb874c79 --- /dev/null +++ b/pkg/types/config_test.go @@ -0,0 +1,173 @@ +package types + +import ( + "github.com/stretchr/testify/require" + "testing" +) + +func TestHostPorts(t *testing.T) { + baseInput := HostPort{ + Rest: 1317, + Rpc: 26657, + Grpc: 9090, + Exposer: 8000, + Faucet: 8001, + } + + testCases := map[string]struct { + input HostPort + expected map[string]int + }{ + "happy-path": { + input: baseInput, + expected: map[string]int{ + "rest": 1317, + "rpc": 26657, + "grpc": 9090, + "exposer": 8000, + "faucet": 8001, + "notexistent": 0, + }, + }, + "partial-ports": { + input: HostPort{Rpc: 26657}, + expected: map[string]int{ + "rpc": 26657, + "grpc": 0, + "rest": 0, + "faucet": 0, + "nonexsistent": 0, + }, + }, + } + + for _, testCase := range testCases { + for portType, expectedPort := range testCase.expected { + port := testCase.input.GetPort(portType) + require.Equal(t, expectedPort, port) + } + } +} + +func TestMergeChains(t *testing.T) { + testCases := map[string]struct { + chain1 *Chain + chain2 *Chain + expected *Chain // merged chain + }{ + "non-conflicting": { + chain1: &Chain{ + Name: "osmosis-1", + Type: "osmosis", + }, + chain2: &Chain{ + Type: "osmosis", + Home: "/root/.osmosisd", + }, + expected: &Chain{ + Name: "osmosis-1", + Type: "osmosis", + Home: "/root/.osmosisd", + }, + }, + "override-values": { + chain1: &Chain{ + Name: "osmosis-1", + }, + chain2: &Chain{ + Name: "osmosis-2", + }, + expected: &Chain{ + Name: "osmosis-1", + }, + }, + "num-override": { + chain1: &Chain{ + Name: "osmosis-1", + Type: "osmosis", + NumValidators: 2, + }, + chain2: &Chain{ + Name: "osmosis-1", + Type: "osmosis", + NumValidators: 1, + }, + expected: &Chain{ + Name: "osmosis-1", + Type: "osmosis", + NumValidators: 2, + }, + }, + "bool-overrides": { + chain1: &Chain{ + Name: "osmosis-1", + Type: "osmosis", + Exposer: &Feature{ + Enabled: true, + }, + }, + chain2: &Chain{ + Name: "osmosis-1", + Type: "osmosis", + }, + expected: &Chain{ + Name: "osmosis-1", + Type: "osmosis", + Exposer: &Feature{ + Enabled: true, + }, + }, + }, + "reverse-bool-override": { + chain1: &Chain{ + Name: "osmosis-1", + Type: "osmosis", + }, + chain2: &Chain{ + Name: "osmosis-1", + Type: "osmosis", + Exposer: &Feature{ + Enabled: true, + }, + }, + expected: &Chain{ + Name: "osmosis-1", + Type: "osmosis", + Exposer: &Feature{ + Enabled: true, + }, + }, + }, + "explicit-overrides": { + chain1: &Chain{ + Name: "osmosis-1", + Type: "osmosis", + Exposer: &Feature{ + Enabled: false, + }, + }, + chain2: &Chain{ + Name: "osmosis-1", + Type: "osmosis", + Exposer: &Feature{ + Enabled: true, + Image: "test-image", + }, + }, + expected: &Chain{ + Name: "osmosis-1", + Type: "osmosis", + Exposer: &Feature{ + Enabled: false, + Image: "test-image", + }, + }, + }, + } + + for _, testCase := range testCases { + merged, err := testCase.chain1.Merge(testCase.chain2) + require.NoError(t, err) + require.Equal(t, testCase.expected, merged) + } +} diff --git a/pkg/types/object.go b/pkg/types/object.go new file mode 100644 index 000000000..f503782df --- /dev/null +++ b/pkg/types/object.go @@ -0,0 +1,73 @@ +package types + +type StarshipObject struct { + ServiceConfigs map[string]NodeConfig +} + +type EnvVar struct { + Name string + Value string +} + +type Ports struct { + Name string + HostPort int32 + ContainerPort int32 + HostIP string + Protocol string +} + +type Mount struct { + Name string + MountPath string // mount path on container + Path string // path on localhost to read file from +} + +// Init describes precontainer creation steps. These can be either as docker containers +// or just scripts. These are supposed to run to completion +type Init struct { + Name string + Image string // optional + Environment []EnvVar + EnvFile []string + Command []string + WorkingDir string + Mounts []Mount +} + +type Resource struct { + CPU string `name:"cpu" json:"cpu,omitempty" yaml:"cpu,omitempty"` + Memory string `name:"memory" json:"memory,omitempty" yaml:"memory,omitempty"` +} + +type File struct { + Name string + Path string + Content []byte + MountPath string +} + +// NodeConfig describes containers and objects without specifics of underlying infra +type NodeConfig struct { + Name string + ContainerName string + Controller string + Image string + Environment []EnvVar + EnvFile []string + Port []Ports + Command []string + ScriptFiles []string + WorkingDir string + Init []Init + DependsOn []*NodeConfig // Pointer to serviceconfig this would depend on + Replicas int + Labels map[string]string + Annotations map[string]string + Sidecars []*NodeConfig // pointers to serviceconfig that are run as sidecars + Resources Resource + ImagePullPolicy string + Files []File + Mounts []Mount // Mount are added to all the sidecars and init-containers + PostStart []string // PostStart commands +} diff --git a/pkg/types/options.go b/pkg/types/options.go new file mode 100644 index 000000000..3efdd078f --- /dev/null +++ b/pkg/types/options.go @@ -0,0 +1,4 @@ +package types + +type ConvertOptions struct { +} diff --git a/pkg/types/utils.go b/pkg/types/utils.go new file mode 100644 index 000000000..a51a94a11 --- /dev/null +++ b/pkg/types/utils.go @@ -0,0 +1,20 @@ +package types + +func mergeMaps(a, b map[string]interface{}) map[string]interface{} { + out := make(map[string]interface{}, len(a)) + for k, v := range a { + out[k] = v + } + for k, v := range b { + if v, ok := v.(map[string]interface{}); ok { + if bv, ok := out[k]; ok { + if bv, ok := bv.(map[string]interface{}); ok { + out[k] = mergeMaps(bv, v) + continue + } + } + } + out[k] = v + } + return out +}