Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
AntiTyping committed Jun 17, 2024
1 parent 1483eaf commit cb8c53f
Show file tree
Hide file tree
Showing 4 changed files with 200 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# Image URL to use all building/pushing image targets
IMG ?= controller:latest
IMG ?= ghcr.io/strangelove-ventures/cosmos-operator:v0.21.7
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.24.1

Expand Down Expand Up @@ -139,7 +139,7 @@ $(LOCALBIN):
mkdir -p $(LOCALBIN)

## Tool Binaries
KUSTOMIZE ?= $(LOCALBIN)/kustomize
KUSTOMIZE ?= kustomize
CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
ENVTEST ?= $(LOCALBIN)/setup-envtest

Expand All @@ -149,9 +149,9 @@ CONTROLLER_TOOLS_VERSION ?= v0.14.0

KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
.PHONY: kustomize
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
$(KUSTOMIZE): $(LOCALBIN)
curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN)
#kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
#$(KUSTOMIZE): $(LOCALBIN)
# curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN)

.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
Expand Down
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ kind: Kustomization
images:
- name: controller
newName: ghcr.io/strangelove-ventures/cosmos-operator
newTag: latest
newTag: v0.21.7
107 changes: 107 additions & 0 deletions cosmoshub-fullnode.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
apiVersion: cosmos.strange.love/v1
kind: CosmosFullNode
metadata:
annotations:
infra.strange.love/chain: cosmoshub
labels:
app.kubernetes.io/component: cosmos-fullnode
app.kubernetes.io/managed-by: Kustomize
app.kubernetes.io/part-of: cosmoshub
name: cosmoshub-mainnet-fullnode
namespace: cosmos-fullnode-cosmoshub-mainnet
spec:
chain:
# initScript: |-
# HOME=/home/operator/cosmos pd testnet join --external-address 127.0.0.1:26656 --moniker strangelove --archive-url "https://snapshots.penumbra.zone/testnet/pd-migrated-state-76-77.tar.gz"
# startScript: |-
# pd start --home /home/operator/cosmos/.penumbra/testnet_data/node0/pd
app:
# apiEnableUnsafeCORS: true
minGasPrice: 0.0025uatom
pruning:
interval: 17
keepRecent: 5000
minRetainBlocks: 271500
strategy: custom
binary: cometbft
chainID: penumbra-testnet-deimos-8
addrbookScript: |-
echo "No need for address book"
genesisScript: |-
echo "No need for genesis"
# config:
# corsAllowedOrigins:
# - '*'
# peers: [email protected]:26656
# seeds: [email protected]:14956,57a5297537b9b6ef8b105c08a8ad3f6ac452c423@seeds.goldenratiostaking.net:1618,[email protected]:42656,[email protected]:14956,e1b058e5cfa2b836ddaa496b10911da62dcf182e@cosmos-seed-1.allnodes.me:26656,e726816f42831689eab9378d5d577f1d06d25716@cosmos-seed-2.allnodes.me:26656
# unconditionalPeerIDs: 54f48cac59efe884be39f887e4028b6e6b12c8e3
# genesisURL: https://github.com/cosmos/mainnet/raw/master/genesis/genesis.cosmoshub-4.json.gz
network: mainnet
# skipInvariants: true
versions:
- height: 0
image: ghcr.io/strangelove-ventures/heighliner/cometbft:v0.37.5
podTemplate:
initContainers:
- name: pd-init
image: ghcr.io/strangelove-ventures/heighliner/penumbra:v0.77.2
command:
- sh
- -c
- |
export HOME=/home/heighliner/cosmos
pd testnet join --external-address 127.0.0.1:26656 --moniker strangelove --archive-url "https://snapshots.penumbra.zone/testnet/pd-migrated-state-76-77.tar.gz"
volumeMounts:
- mountPath: /home/operator/cosmos
name: vol-chain-home
- name: pd-copy
image: busybox:latest
command:
- sh
- -c
- |
export HOME=/home/heighliner/cosmos
mv $HOME/.penumbra/testnet_data/node0/cometbft $HOME/
volumeMounts:
- mountPath: /home/operator/cosmos
name: vol-chain-home
containers:
- name: pd
image: ghcr.io/strangelove-ventures/heighliner/penumbra:v0.77.2
command:
- sh
- -c
- |
export HOME=/home/heighliner/cosmos
pd start --home $HOME/.penumbra/testnet_data/node0/pd
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app.kubernetes.io/name: cosmoshub-mainnet-fullnode
topologyKey: kubernetes.io/hostname
resources:
limits:
memory: 64Gi
requests:
cpu: 4m
memory: 10Mi
replicas: 1
selfHeal:
heightDriftMitigation:
threshold: 10
pvcAutoScale:
increaseQuantity: 10%
maxSize: 5Ti
usedSpacePercentage: 75
service:
maxP2PExternalAddresses: 3
p2pTemplate:
type: NodePort
type: FullNode
volumeClaimTemplate:
resources:
requests:
storage: 30Gi
storageClassName: topolvm-provisioner-thin-striped
87 changes: 87 additions & 0 deletions cosmoshub-fullnode.yaml.backup
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
apiVersion: cosmos.strange.love/v1
kind: CosmosFullNode
metadata:
annotations:
infra.strange.love/chain: cosmoshub
labels:
app.kubernetes.io/component: cosmos-fullnode
app.kubernetes.io/managed-by: Kustomize
app.kubernetes.io/part-of: cosmoshub
name: cosmoshub-mainnet-fullnode
namespace: cosmos-fullnode-cosmoshub-mainnet
spec:
chain:
initScript: |-
HOME=/home/operator/cosmos pd testnet join --external-address 127.0.0.1:26656 --moniker strangelove --archive-url "https://snapshots.penumbra.zone/testnet/pd-migrated-state-76-77.tar.gz"
startScript: |-
pd start --home /home/operator/cosmos/.penumbra/testnet_data/node0/pd
app:
apiEnableUnsafeCORS: true
minGasPrice: 0.0025uatom
pruning:
interval: 17
keepRecent: 5000
minRetainBlocks: 271500
strategy: custom
binary: pd
chainID: cosmoshub-4
addrbookScript: |-
echo "No need for address book"
genesisScript: |-
echo "No need for genesis"
config:
corsAllowedOrigins:
- '*'
peers: [email protected]:26656
seeds: [email protected]:14956,57a5297537b9b6ef8b105c08a8ad3f6ac452c423@seeds.goldenratiostaking.net:1618,[email protected]:42656,[email protected]:14956,e1b058e5cfa2b836ddaa496b10911da62dcf182e@cosmos-seed-1.allnodes.me:26656,e726816f42831689eab9378d5d577f1d06d25716@cosmos-seed-2.allnodes.me:26656
unconditionalPeerIDs: 54f48cac59efe884be39f887e4028b6e6b12c8e3
genesisURL: https://github.com/cosmos/mainnet/raw/master/genesis/genesis.cosmoshub-4.json.gz
network: mainnet
skipInvariants: true
versions:
- height: 0
image: ghcr.io/strangelove-ventures/heighliner/penumbra:v0.77.2
podTemplate:
containers:
- name: combetbft
command:
- cometbft
- start
- --home
- /home/operator/cosmos/.penumbra/testnet_data/node0/cometbft
image: ghcr.io/strangelove-ventures/heighliner/cometbft:v0.37.5
volumeMounts:
- mountPath: /home/operator/cosmos
name: vol-chain-home

affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app.kubernetes.io/name: cosmoshub-mainnet-fullnode
topologyKey: kubernetes.io/hostname
resources:
limits:
memory: 64Gi
requests:
cpu: 4m
memory: 10Mi
replicas: 1
selfHeal:
heightDriftMitigation:
threshold: 10
pvcAutoScale:
increaseQuantity: 10%
maxSize: 5Ti
usedSpacePercentage: 75
service:
maxP2PExternalAddresses: 3
p2pTemplate:
type: NodePort
type: FullNode
volumeClaimTemplate:
resources:
requests:
storage: 20Gi
storageClassName: topolvm-provisioner-thin-striped

0 comments on commit cb8c53f

Please sign in to comment.