Skip to content

Commit

Permalink
[PLAT-16326] Kubernetes Pause Resume does not need overrides file
Browse files Browse the repository at this point in the history
Summary:
Because resume is using --reuse-values, it will reuse all the values of
the previous helm release (which, is from before the pause). Pause does
not create a new helm release, and instead edits the stateful set
directly using kubectl.

In fact, the overrides file was not getting generated correctly either,
causing ybc.enabled to always be false and masterAddresses to get passed
as null.

Test Plan:
tested multiple pause resumes
1. master addresses always set
2. ybc is enabled when its suppose to be

Reviewers: anijhawan, #yba-api-review

Reviewed By: anijhawan, #yba-api-review

Subscribers: yugaware

Differential Revision: https://phorge.dev.yugabyte.com/D40682
  • Loading branch information
shubin-yb committed Dec 16, 2024
1 parent fd7ba0f commit 4c3b9e2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1578,6 +1578,7 @@ public KubernetesCommandExecutor createResumeKubernetesUniverseTaskAZ(
UUID providerUUID) {
KubernetesCommandExecutor.Params params = new KubernetesCommandExecutor.Params();
Universe universe = Universe.getOrBadRequest(taskParams().getUniverseUUID());
Provider provider = Provider.getOrBadRequest(providerUUID);
params.universeName = universeName;
params.commandType = KubernetesCommandExecutor.CommandType.RESUME_AZ;
params.azCode = azCode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,16 +504,14 @@ && taskParams().namespace == null) {

break;
case RESUME_AZ:
overridesFile = this.generateHelmOverride();
kubernetesManagerFactory
.getManager()
.helmResume(
taskParams().getUniverseUUID(),
taskParams().ybSoftwareVersion,
config,
taskParams().helmReleaseName,
taskParams().namespace,
overridesFile);
taskParams().namespace);

break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,7 @@ public void helmResume(
String ybSoftwareVersion,
Map<String, String> config,
String helmReleaseName,
String namespace,
String overridesFile) {
String namespace) {

String helmPackagePath = this.getHelmPackagePath(ybSoftwareVersion);
List<String> commandList =
Expand All @@ -238,8 +237,6 @@ public void helmResume(
helmPackagePath,
"--debug",
"--reuse-values",
"-f",
overridesFile,
"--namespace",
namespace,
"--timeout",
Expand Down

0 comments on commit 4c3b9e2

Please sign in to comment.