Skip to content

Commit a44053e

Browse files
committed
fix: pulumi postgres chart version
1 parent a53d9a7 commit a44053e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

deployments/pulumi/pkg/config/config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ type PostgresInstall struct {
157157

158158
// Password is the password for the Postgres database
159159
Password string `json:"password" yaml:"password"`
160+
161+
// ChartVersion is the bitnami/postgres chart version
162+
ChartVersion string `json:"chartVersion" yaml:"chartVersion"`
160163
}
161164

162165
type PostgresDatabase struct {
@@ -185,6 +188,7 @@ func (a *PostgresDatabase) toInput() *storage.PostgresDatabaseArgs {
185188
Install: &storage.PostgresInstallArgs{
186189
Username: pulumix.Val(a.Install.Username),
187190
Password: pulumix.Val(a.Install.Password),
191+
ChartVersion: pulumix.Val(a.Install.ChartVersion),
188192
},
189193
}
190194
}

deployments/pulumi/pkg/storage/component_postgres.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ func (cmp *PostgresDatabaseComponent) GetPort() pulumix.Input[int] {
5959
type PostgresInstallArgs struct {
6060
Username pulumix.Input[string]
6161
Password pulumix.Input[string]
62+
ChartVersion pulumix.Input[string]
6263
}
6364

6465
func (args *PostgresInstallArgs) SetDefaults() {
@@ -98,7 +99,7 @@ func newPostgresComponent(ctx *pulumi.Context, name string, args *PostgresCompon
9899

99100
cmp.Chart, err = helm.NewChart(ctx, "postgres", &helm.ChartArgs{
100101
Chart: pulumi.String("oci://registry-1.docker.io/bitnamicharts/postgresql"),
101-
Version: pulumi.String("16.4.7"),
102+
Version: args.ChartVersion.ToOutput(ctx.Context()).Untyped().(pulumi.StringOutput),
102103
Name: pulumi.String("postgres"),
103104
Namespace: args.Namespace.ToOutput(ctx.Context()).Untyped().(pulumi.StringOutput),
104105
Values: pulumi.Map{

0 commit comments

Comments
 (0)