Skip to content

Commit

Permalink
revert changes for RHTAPBUGS-12 (#425)
Browse files Browse the repository at this point in the history
* revert changes for RHTAPBUGS-12

Signed-off-by: Kim Tsao <[email protected]>

* revert changes for RHTAPBUGS-12- remove dup attribute

Signed-off-by: Kim Tsao <[email protected]>

---------

Signed-off-by: Kim Tsao <[email protected]>
  • Loading branch information
kim-tsao authored Dec 4, 2023
1 parent d506e22 commit 5c90c13
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 3 additions & 1 deletion pkg/devfile/devfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ func GetResourceFromDevfile(log logr.Logger, devfileData data.DevfileData, deplo
resources.Deployments[0].Spec.Template.ObjectMeta.Labels = matchLabels
}

resources.Deployments[0].Spec.Replicas = &currentReplica
if currentReplica > 0 {
resources.Deployments[0].Spec.Replicas = &currentReplica
}

if len(resources.Deployments[0].Spec.Template.Spec.Containers) > 0 {
if image != "" {
Expand Down
4 changes: 0 additions & 4 deletions pkg/devfile/devfile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,6 @@ components:
deployment/container-port: 1111
deployment/storageLimit: 401Mi
deployment/storageRequest: 201Mi
deployment/replicas: 1
kubernetes:
deployByDefault: false
endpoints:
Expand Down Expand Up @@ -1308,7 +1307,6 @@ components:
deployment/container-port: 1111
deployment/storageLimit: 401Mi
deployment/storageRequest: 201Mi
deployment/replicas: 1
kubernetes:
deployByDefault: false
endpoints:
Expand Down Expand Up @@ -1423,7 +1421,6 @@ components:
deployment/container-port: 1111
deployment/storageLimit: 401Mi
deployment/storageRequest: 201Mi
deployment/replicas: 1
kubernetes:
deployByDefault: false
endpoints:
Expand Down Expand Up @@ -1533,7 +1530,6 @@ components:
- attributes:
api.devfile.io/k8sLikeComponent-originalURI: deploy.yaml
deployment/container-port: 5566
deployment/replicas: 1
kubernetes:
deployByDefault: false
endpoints:
Expand Down

0 comments on commit 5c90c13

Please sign in to comment.