Skip to content

Commit

Permalink
Fix infraSet infinite loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Bisht13 committed Aug 1, 2023
1 parent fcb91fb commit b7e92f2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/deployment/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ func ApplyManifest(kubeconfig *rest.Config, kubeclientset *kubernetes.Clientset,

if _, err := dri.Create(context.Background(), unstructuredObj, metav1.CreateOptions{}); err != nil {
if _, err := dri.Update(context.Background(), unstructuredObj, metav1.UpdateOptions{}); err != nil {
if unstructuredObj.GetObjectKind().GroupVersionKind().Kind == "PersistentVolumeClaim" {
// Skip PVCs
continue
// TODO: Handle PVCs, currently on deletion of PVCs, the cluster is stuck in a loop
}
_ = dri.Delete(context.Background(), unstructuredObj.GetName(), metav1.DeleteOptions{})
watcher, err := dri.Watch(context.Background(), metav1.ListOptions{
FieldSelector: fmt.Sprintf("metadata.name=%s", unstructuredObj.GetName()),
Expand Down

0 comments on commit b7e92f2

Please sign in to comment.