Skip to content

Commit

Permalink
Use Unix time instead of UTC string for value
Browse files Browse the repository at this point in the history
  • Loading branch information
eberlep committed Nov 21, 2023
1 parent e38a87b commit fab77a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/v1/postgres_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ func (p *Postgres) ToUnstructuredZalandoPostgresql(z *zalando.Postgresql, c *cor
// TODO once all the custom resources have that new label, move this part to p.ToZalandoPostgresqlMatchingLabels()
z.Labels[PartitionIDLabelName] = p.Spec.PartitionID
// TODO REMOVE temp label
z.Labels["postgres.database.fits.cloud/temp-changing-label"] = time.Now().Format(time.RFC3339)
z.Labels["postgres.database.fits.cloud/temp-changing-label"] = fmt.Sprint(time.Now().Unix())

z.Spec.NumberOfInstances = p.Spec.NumberOfInstances
z.Spec.PostgresqlParam.PgVersion = p.Spec.Version
Expand Down
2 changes: 1 addition & 1 deletion pkg/etcdmanager/etcdmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ func (m *EtcdManager) createNewClientObject(ctx context.Context, obj client.Obje
v.Spec.Template.ObjectMeta.Labels[pg.NameLabelName] = stsName
// TODO REMOVE ME
// add an ever-changing label to force a rolling update each time we reconcile etcd
v.Spec.Template.ObjectMeta.Labels["postgres.database.fits.cloud/temp-changing-label"] = time.Now().Format(time.RFC3339)
v.Spec.Template.ObjectMeta.Labels["postgres.database.fits.cloud/temp-changing-label"] = fmt.Sprint(time.Now().Unix())

m.log.Info("Updating selector")
// spec.selector.matchLabels
Expand Down

0 comments on commit fab77a6

Please sign in to comment.