Skip to content

Commit

Permalink
aptos: update node default image
Browse files Browse the repository at this point in the history
  • Loading branch information
mFarghaly committed Apr 27, 2024
1 parent 5134dd9 commit 41dca93
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
8 changes: 2 additions & 6 deletions apis/aptos/v1alpha1/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@ const (
)

const (
// DefaultAptosCoreMainnetImage is the default Aptos core Mainnet client image
DefaultAptosCoreMainnetImage = "aptoslabs/validator@sha256:06ca1753786724805e7efb525bd2dbfbc5a114e8792a8d05ef522dba9830b613"
// DefaultAptosCoreDevnetImage is the default Aptos core Devnet client image
DefaultAptosCoreDevnetImage = "aptoslabs/validator@sha256:d017e7f56781ff26c4755c2a379810b9d9c2f263c5ade15a26ccb719c743f7de"
// DefaultAptosCoreTestnetImage is the default Aptos core Testnet client image
DefaultAptosCoreTestnetImage = "aptoslabs/validator@sha256:c109ab86066fc35cbff5d7f57340ea6da9ed480896d08cd1bbd30c3dec683033"
// DefaultAptosCoreImage is the default Aptos core client image
DefaultAptosCoreImage = "aptoslabs/validator:aptos-node-v1.11.2"
)

const (
Expand Down
8 changes: 1 addition & 7 deletions apis/aptos/v1alpha1/node_defaulting_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,7 @@ func (r *Node) Default() {
r.DefaultNodeResources()

if r.Spec.Image == "" {
if r.Spec.Network == Mainnet {
r.Spec.Image = DefaultAptosCoreMainnetImage
} else if r.Spec.Network == Devnet {
r.Spec.Image = DefaultAptosCoreDevnetImage
} else if r.Spec.Network == Testnet {
r.Spec.Image = DefaultAptosCoreTestnetImage
}
r.Spec.Image = DefaultAptosCoreImage
}

if r.Spec.Replicas == nil {
Expand Down
2 changes: 1 addition & 1 deletion apis/aptos/v1alpha1/node_defaulting_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var _ = Describe("Aptos node defaulting", func() {

node.Default()

Expect(node.Spec.Image).To(Equal(DefaultAptosCoreDevnetImage))
Expect(node.Spec.Image).To(Equal(DefaultAptosCoreImage))
Expect(*node.Spec.Replicas).To(Equal(DefaltReplicas))
Expect(node.Spec.CPU).To(Equal(DefaultNodeCPURequest))
Expect(node.Spec.CPULimit).To(Equal(DefaultNodeCPULimit))
Expand Down

0 comments on commit 41dca93

Please sign in to comment.