Skip to content

Commit

Permalink
Remove redundant check if label includes a certain key
Browse files Browse the repository at this point in the history
Signed-off-by: Burak Sekili <buraksekili@gmail.com>
  • Loading branch information
buraksekili committed Oct 18, 2023
1 parent 88233a4 commit 3c7d27d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions predelete/predelete.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,8 @@ func PreDeleteBootstrappingJobs(clientset *kubernetes.Clientset) error {

var errCascading error
for _, job := range jobs.Items {
jobLabel, exists := job.ObjectMeta.Labels[constants.TykBootstrapLabel]
if !exists {
continue
}

// Do not need to delete pre-delete job. It will be deleted by Helm.
jobLabel := job.ObjectMeta.Labels[constants.TykBootstrapLabel]
if jobLabel != constants.TykBootstrapPreDeleteLabel {
deletePropagationType := metav1.DeletePropagationBackground

Expand Down
2 changes: 1 addition & 1 deletion readiness/readiness.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func CheckIfRequiredDeploymentsAreReady() error {
if len(notReadyPods) == 0 {
return nil
}

fmt.Printf("The following pods have containers that are NOT ready: ")
for pod, _ := range notReadyPods {
fmt.Println(pod)
Expand Down

0 comments on commit 3c7d27d

Please sign in to comment.