Skip to content

Commit

Permalink
feat(olm): don't calculate a patch when updating via a replacement chain
Browse files Browse the repository at this point in the history
  • Loading branch information
ecordell committed Sep 10, 2019
1 parent 95572bc commit cbcc50c
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 cbcc50c

Please sign in to comment.