Skip to content

Commit

Permalink
fix: apply component spec to trvy deployment
Browse files Browse the repository at this point in the history
Closes #436

Signed-off-by: He Weiwei <hweiwei@vmware.com>
  • Loading branch information
heww committed Mar 3, 2021
1 parent 1674ab1 commit 4b2d90e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions controllers/goharbor/trivy/deployments.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func (r *Reconciler) GetDeployment(ctx context.Context, trivy *goharborv1alpha2.
Value: address,
})

return &appsv1.Deployment{
deploy := &appsv1.Deployment{
ObjectMeta: metav1.ObjectMeta{
Name: name,
Namespace: namespace,
Expand Down Expand Up @@ -239,7 +239,11 @@ func (r *Reconciler) GetDeployment(ctx context.Context, trivy *goharborv1alpha2.
},
},
},
}, nil
}

trivy.Spec.ComponentSpec.ApplyToDeployment(deploy)

return deploy, nil
}

func (r *Reconciler) getProbe(ctx context.Context, trivy *goharborv1alpha2.Trivy, probePath string) *corev1.Probe {
Expand Down

0 comments on commit 4b2d90e

Please sign in to comment.