From 41dca939741ecc2e2ea9ce61f5f5ffc655529236 Mon Sep 17 00:00:00 2001 From: Mostafa Farghaly Date: Sat, 27 Apr 2024 23:19:30 +0300 Subject: [PATCH] aptos: update node default image --- apis/aptos/v1alpha1/defaults.go | 8 ++------ apis/aptos/v1alpha1/node_defaulting_webhook.go | 8 +------- apis/aptos/v1alpha1/node_defaulting_webhook_test.go | 2 +- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/apis/aptos/v1alpha1/defaults.go b/apis/aptos/v1alpha1/defaults.go index dc1a229d..fa638bf5 100644 --- a/apis/aptos/v1alpha1/defaults.go +++ b/apis/aptos/v1alpha1/defaults.go @@ -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 ( diff --git a/apis/aptos/v1alpha1/node_defaulting_webhook.go b/apis/aptos/v1alpha1/node_defaulting_webhook.go index 988237c1..c933a3a6 100644 --- a/apis/aptos/v1alpha1/node_defaulting_webhook.go +++ b/apis/aptos/v1alpha1/node_defaulting_webhook.go @@ -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 { diff --git a/apis/aptos/v1alpha1/node_defaulting_webhook_test.go b/apis/aptos/v1alpha1/node_defaulting_webhook_test.go index d9b6f049..487b80f5 100644 --- a/apis/aptos/v1alpha1/node_defaulting_webhook_test.go +++ b/apis/aptos/v1alpha1/node_defaulting_webhook_test.go @@ -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))