Skip to content

Commit ac36765

Browse files
easyCZroboquat
authored andcommitted
[usage] Add database-waiter
1 parent 0723994 commit ac36765

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

install/installer/pkg/components/usage/deployment.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
4646
DNSPolicy: "ClusterFirst",
4747
RestartPolicy: "Always",
4848
TerminationGracePeriodSeconds: pointer.Int64(30),
49+
InitContainers: []corev1.Container{*common.DatabaseWaiterContainer(ctx)},
4950
Containers: []corev1.Container{{
5051
Name: Component,
5152
Image: ctx.ImageName(ctx.Config.Repository, Component, ctx.VersionManifest.Components.Usage.Version),

install/installer/pkg/components/usage/objects_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ func renderContextWithUsageEnabled(t *testing.T) *common.RenderContext {
5050
Usage: versions.Versioned{
5151
Version: "commit-test-latest",
5252
},
53+
ServiceWaiter: versions.Versioned{
54+
Version: "commit-test-latest",
55+
},
5356
},
5457
}, "test-namespace")
5558
require.NoError(t, err)

0 commit comments

Comments
 (0)