Skip to content

Commit 11e7f1f

Browse files
authored
fix: pulumi postgres chart version (#1140)
1 parent 81a7b28 commit 11e7f1f

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
@@ -154,6 +154,9 @@ type PostgresInstall struct {
154154

155155
// Password is the password for the Postgres database
156156
Password string `json:"password" yaml:"password"`
157+
158+
// ChartVersion is the bitnami/postgres chart version
159+
ChartVersion string `json:"chartVersion" yaml:"chartVersion"`
157160
}
158161

159162
type PostgresDatabase struct {
@@ -182,6 +185,7 @@ func (a *PostgresDatabase) toInput() *storage.PostgresDatabaseArgs {
182185
Install: &storage.PostgresInstallArgs{
183186
Username: pulumix.Val(a.Install.Username),
184187
Password: pulumix.Val(a.Install.Password),
188+
ChartVersion: pulumix.Val(a.Install.ChartVersion),
185189
},
186190
}
187191
}

deployments/pulumi/pkg/storage/component_postgres.go

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

6364
func (args *PostgresInstallArgs) SetDefaults() {
@@ -97,7 +98,7 @@ func newPostgresComponent(ctx *pulumi.Context, name string, args *PostgresCompon
9798

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

0 commit comments

Comments
 (0)