Skip to content

Commit

Permalink
Add note about updating manifests to PromoteSuccessMessage
Browse files Browse the repository at this point in the history
Co-authored-by: Trong Nguyen <trong.huu.nguyen@nav.no>
  • Loading branch information
mortenlj and tronghn committed Oct 3, 2024
1 parent 151fc85 commit 2f082d3
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion pkg/postgres/migrate/promote.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ At this point it is important to verify that your application works as expected,
Once you are satisfied that everything works as expected, you must perform the final finalize step:
nais postgres migrate finalize %s %s %s
At this point it is also important to update your manifests to use the new database instance.
...
spec:
gcp:
sqlInstances:
- name: %s
type: %s
tier: %s
diskSize: %d
If things are not working as expected, and you need to rollback to the previous database instance, you can run:
nais postgres migrate rollback %s %s %s
`
Expand Down Expand Up @@ -48,6 +58,12 @@ The database will be unavailable for a short period of time while the promotion
}

label := m.kubectlLabelSelector(CommandPromote)
fmt.Printf(PromoteSuccessMessage, label, m.cfg.Namespace, jobName, m.cfg.Namespace, m.cfg.AppName, m.cfg.Namespace, m.cfg.Target.InstanceName, m.cfg.AppName, m.cfg.Namespace, m.cfg.Target.InstanceName)
fmt.Printf(PromoteSuccessMessage,

Check failure on line 61 in pkg/postgres/migrate/promote.go

View workflow job for this annotation

GitHub Actions / test

fmt.Printf format %d has arg m.cfg.Target.DiskSize of wrong type github.com/nais/cli/pkg/option.Option[int]
label, m.cfg.Namespace,
jobName, m.cfg.Namespace,
m.cfg.AppName, m.cfg.Namespace, m.cfg.Target.InstanceName,
m.cfg.Target.InstanceName, m.cfg.Target.Type, m.cfg.Target.Tier, m.cfg.Target.DiskSize,
m.cfg.AppName, m.cfg.Namespace, m.cfg.Target.InstanceName,
)
return nil
}

0 comments on commit 2f082d3

Please sign in to comment.