Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: when the user specifies a replicas other than 2 it is not properly reflected in the Helm chart values.yaml #918

Merged
merged 1 commit into from
Nov 29, 2022

Conversation

HarikrishnanBalagopal
Copy link
Contributor

@HarikrishnanBalagopal HarikrishnanBalagopal commented Nov 29, 2022

Bug

Steps to reproduce

  1. Run move2kube plan -s src and move2kube transform
  2. Specify a different number of replicas
? Provide the minimum number of replicas each service should have
ID: move2kube.minreplicas
Hints:
- If the value is 0 pods won't be started by default

 33

Expected behaviour

The output yamls and helm chart values.yaml should have the replicas set to 33

Actual behaviour

In the output deploy/yamls/ all the Deployment yamls have the replicas set to 33.
In the output deploy/yamls-parameterized/ folder has Helm chart, Kustomize and Openshift Template all of which have replicas set to 2.

This is because the default value in a parameterizer yaml always replaces the original value at the location.
https://github.com/konveyor/move2kube/blob/main/assets/built-in/transformers/kubernetes/parameterizer/parameterizers/replicas.yaml#L9

Fix

Add a new option to allow keeping the original value if present.

Signed-off-by: Harikrishnan Balagopal harikrishmenon@gmail.com

…ly reflected in the Helm chart values.yaml

Signed-off-by: Harikrishnan Balagopal <harikrishmenon@gmail.com>
@github-actions
Copy link

Thanks for making a pull request! 😃
One of the maintainers will review and advise on the next steps.

@github-actions github-actions bot added the fix label Nov 29, 2022
@codecov
Copy link

codecov bot commented Nov 29, 2022

Codecov Report

Base: 15.30% // Head: 15.35% // Increases project coverage by +0.05% 🎉

Coverage data is based on head (a13e711) compared to base (339e5b7).
Patch coverage: 42.85% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #918      +/-   ##
==========================================
+ Coverage   15.30%   15.35%   +0.05%     
==========================================
  Files          50       50              
  Lines        4568     4578      +10     
==========================================
+ Hits          699      703       +4     
- Misses       3696     3699       +3     
- Partials      173      176       +3     
Impacted Files Coverage Δ
...nsformer/kubernetes/parameterizer/parameterizer.go 47.30% <33.33%> (-0.26%) ⬇️
transformer/kubernetes/parameterizer/utils.go 60.96% <100.00%> (+0.42%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ashokponkumar ashokponkumar merged commit 9507667 into konveyor:main Nov 29, 2022
@HarikrishnanBalagopal HarikrishnanBalagopal deleted the fix/parameterize branch November 29, 2022 13:15
deewhyweb pushed a commit to deewhyweb/move2kube that referenced this pull request Nov 30, 2022
Signed-off-by: Harikrishnan Balagopal <harikrishmenon@gmail.com>
Signed-off-by: Philip Hayes <philip@deewhy.ie>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants