Skip to content

Commit

Permalink
fix: client-side dry run to support legacy operators
Browse files Browse the repository at this point in the history
  • Loading branch information
DanStough committed Feb 17, 2022
1 parent bc1c716 commit 9c4178b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pkg/operator/applier/kubectl.go
Expand Up @@ -95,7 +95,8 @@ func (c *Kubectl) Apply(targetNamespace string, slug string, yamlDoc []byte, dry
}

if dryRun {
args = append(args, "--dry-run=server")
// SC-42122: server dry run is incompatible with legacy operators that don't support it, i.e. openebs 1.12.0
args = append(args, "--dry-run=client")
}
if wait {
args = append(args, "--wait")
Expand Down Expand Up @@ -245,7 +246,8 @@ func (c *Kubectl) kubectlCreateCommand(renderedManifestPath string, targetNamesp
}

if dryRun {
args = append(args, "--dry-run=server")
// SC-42122: server dry run is incompatible with legacy operators that don't support it, i.e. openebs 1.12.0
args = append(args, "--dry-run=client")
}
if wait {
args = append(args, "--wait")
Expand All @@ -271,7 +273,8 @@ func (c *Kubectl) kubectlPatchCommand(renderedManifestPath string, targetNamespa
}

if dryRun {
args = append(args, "--dry-run=server")
// SC-42122: server dry run is incompatible with legacy operators that don't support it, i.e. openebs 1.12.0
args = append(args, "--dry-run=client")
}
if wait {
args = append(args, "--wait")
Expand Down

0 comments on commit 9c4178b

Please sign in to comment.