Skip to content

Commit

Permalink
reconcile: scale deployment to zero during all upgrades (PROJQUAY-2121)
Browse files Browse the repository at this point in the history
Fixes bug where we would only scale Quay app 'Deployment' to zero pods
during initial QuayRegistry creation, and not during every upgrade.

Signed-off-by: Alec Merdler <alecmerdler@gmail.com>
  • Loading branch information
alecmerdler committed Jun 23, 2021
1 parent be8d90e commit ad9d95e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion kustomize/base/upgrade.job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ spec:
limits:
cpu: 2000m
memory: 8Gi
# FIXME(alecmerdler): Need to determine healthcheck for alembic...
volumeMounts:
- name: config
readOnly: false
Expand Down
2 changes: 1 addition & 1 deletion pkg/kustomize/kustomize.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ func Inflate(ctx *quaycontext.QuayRegistryContext, quay *v1.QuayRegistry, baseCo
var overlay string
if rolloutBlocked(quay) {
overlay = configEditorOnlyOverlay()
} else if quay.Status.CurrentVersion == "" {
} else if quay.Status.CurrentVersion != v1.QuayVersionCurrent {
overlay = upgradeOverlayDir()
} else {
overlay = overlayDir()
Expand Down
1 change: 1 addition & 0 deletions pkg/kustomize/kustomize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ func withComponents(components []string) []client.Object {
return selectedComponents
}

// TODO(alecmerdler): Test image overrides...
var inflateTests = []struct {
name string
quayRegistry *v1.QuayRegistry
Expand Down

0 comments on commit ad9d95e

Please sign in to comment.