Skip to content

Commit a549bc5

Browse files
committed
fixup: Ensure bootstrap monitor e2e pods use tmpnet flags
1 parent 89d1b00 commit a549bc5

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

tests/fixture/bootstrapmonitor/e2e/e2e_test.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626
"github.com/ava-labs/avalanchego/tests/fixture/tmpnet"
2727
"github.com/ava-labs/avalanchego/tests/fixture/tmpnet/flags"
2828
"github.com/ava-labs/avalanchego/utils/constants"
29+
"github.com/ava-labs/avalanchego/utils/logging"
2930

3031
appsv1 "k8s.io/api/apps/v1"
3132
corev1 "k8s.io/api/core/v1"
@@ -286,7 +287,17 @@ func newNodeStatefulSet(name string, flags tmpnet.FlagsMap) *appsv1.StatefulSet
286287
}
287288

288289
func defaultPodFlags() map[string]string {
289-
return tmpnet.DefaultPodFlags(constants.LocalName, nodeDataDir)
290+
tmpnetFlags := tmpnet.DefaultTmpnetFlags()
291+
tmpnetFlags.SetDefaults(tmpnet.FlagsMap{
292+
config.DataDirKey: nodeDataDir,
293+
config.NetworkNameKey: constants.LocalName,
294+
config.SybilProtectionEnabledKey: "false",
295+
config.HealthCheckFreqKey: "500ms", // Ensure rapid detection of a healthy state
296+
config.LogDisplayLevelKey: logging.Debug.String(),
297+
config.LogLevelKey: logging.Debug.String(),
298+
config.HTTPHostKey: "0.0.0.0", // Need to bind to pod IP to ensure kubelet can access the http port for the readiness
299+
})
300+
return tmpnetFlags
290301
}
291302

292303
// waitForPodCondition waits until the specified pod reports the specified condition

tests/fixture/tmpnet/kube.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,6 @@ import (
4343
restclient "k8s.io/client-go/rest"
4444
)
4545

46-
// DefaultPodFlags defines common flags for avalanchego nodes running in a pod.
47-
func DefaultPodFlags(networkName string, dataDir string) map[string]string {
48-
return map[string]string{
49-
config.DataDirKey: dataDir,
50-
config.NetworkNameKey: networkName,
51-
config.SybilProtectionEnabledKey: "false",
52-
config.HealthCheckFreqKey: "500ms", // Ensure rapid detection of a healthy state
53-
config.LogDisplayLevelKey: logging.Debug.String(),
54-
config.LogLevelKey: logging.Debug.String(),
55-
config.HTTPHostKey: "0.0.0.0", // Need to bind to pod IP to ensure kubelet can access the http port for the readiness check
56-
}
57-
}
58-
5946
// NewNodeStatefulSet returns a statefulset for an avalanchego node.
6047
func NewNodeStatefulSet(
6148
name string,

0 commit comments

Comments
 (0)