Skip to content

Commit 7980179

Browse files
committed
deployment is required for CI/CD pipeline checks
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
1 parent e7691b7 commit 7980179

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

controller/stack_resources.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ func isOwned(ownerReferences []metav1.OwnerReference) (bool, types.UID) {
4444
func (c *StackSetController) ReconcileStackDeployment(ctx context.Context, stack *zv1.Stack, existing *apps.Deployment, generateUpdated func() *apps.Deployment) error {
4545
deployment := generateUpdated()
4646

47-
if deployment == nil {
48-
return nil
49-
}
50-
5147
// Create new deployment
5248
if existing == nil {
5349
_, err := c.client.AppsV1().Deployments(deployment.Namespace).Create(ctx, deployment, metav1.CreateOptions{})

pkg/core/stack_resources.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,6 @@ func (sc *StackContainer) selector() map[string]string {
196196
// "zalando.org/forward-backend", the deployment will be set to
197197
// replicas 1.
198198
func (sc *StackContainer) GenerateDeployment() *appsv1.Deployment {
199-
if _, clusterMigration := sc.Stack.Annotations[forwardBackendAnnotation]; clusterMigration {
200-
return nil
201-
}
202199

203200
stack := sc.Stack
204201

@@ -237,6 +234,12 @@ func (sc *StackContainer) GenerateDeployment() *appsv1.Deployment {
237234
Labels: embeddedCopy.Labels,
238235
}
239236

237+
if _, clusterMigration := sc.Stack.Annotations[forwardBackendAnnotation]; clusterMigration && *updatedReplicas != 0 {
238+
updatedReplicas = wrapReplicas(1)
239+
sc.deploymentReplicas = 1
240+
sc.stackReplicas = 1
241+
}
242+
240243
deployment := &appsv1.Deployment{
241244
ObjectMeta: sc.resourceMeta(),
242245
Spec: appsv1.DeploymentSpec{

0 commit comments

Comments
 (0)