Skip to content

Commit

Permalink
Merge pull request #1027 from ecordell/depup
Browse files Browse the repository at this point in the history
Bug 1750980: feat(olm): don't calculate a patch when updating via a replacement chain
  • Loading branch information
openshift-merge-robot authored Sep 11, 2019
2 parents 95572bc + cbcc50c commit f690ccd
Show file tree
Hide file tree
Showing 3 changed files with 422 additions and 209 deletions.
14 changes: 12 additions & 2 deletions pkg/api/wrappers/deployment_install_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,18 @@ func (c *InstallStrategyDeploymentClientForNamespace) DeleteDeployment(name stri
}

func (c *InstallStrategyDeploymentClientForNamespace) CreateOrUpdateDeployment(deployment *appsv1.Deployment) (*appsv1.Deployment, error) {
d, _, err := c.opClient.CreateOrRollingUpdateDeployment(deployment)
return d, err
_, err := c.opClient.GetDeployment(deployment.Namespace, deployment.Name)
if err != nil {
if !apierrors.IsNotFound(err) {
return nil, err
}
created, err := c.CreateDeployment(deployment)
if err != nil {
return nil, err
}
return created, err
}
return c.opClient.KubernetesInterface().AppsV1().Deployments(deployment.GetNamespace()).Update(deployment)
}

func (c *InstallStrategyDeploymentClientForNamespace) GetServiceAccountByName(serviceAccountName string) (*corev1.ServiceAccount, error) {
Expand Down
Loading

0 comments on commit f690ccd

Please sign in to comment.