Skip to content

Commit

Permalink
handle nil configmap data in gitops (#887)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgalsaleh committed Jul 30, 2020
1 parent 94156f4 commit 50152f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kotsadm/pkg/gitops/gitops.go
Expand Up @@ -219,7 +219,7 @@ func UpdateDownstreamGitOps(appID, clusterID, uri, branch, path, format, action
}

configMapData := map[string]string{}
if configMapExists {
if configMapExists && configMap.Data != nil {
configMapData = configMap.Data
}

Expand Down
Expand Up @@ -234,7 +234,12 @@ class GitOpsDeploymentManager extends React.Component {

try {
const clusterId = downstream?.cluster?.id;
await this.props.updateAppGitOps(app.id, clusterId, gitOpsInput);

const success = await this.updateAppGitOps(app.id, clusterId, gitOpsInput);
if (!success) {
return;
}

this.props.history.push(`/app/${app.slug}/gitops`);
} catch (error) {
console.log(error);
Expand Down

0 comments on commit 50152f5

Please sign in to comment.