Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deletion of the pod created by blueprint without namespace #2106

Merged
merged 3 commits into from
Jun 14, 2023

Conversation

AKhoria
Copy link
Contributor

@AKhoria AKhoria commented Jun 13, 2023

Change Overview

This PR fixes pod which aren't deleted if create by blueprints without namespace

Pull request type

Please check the type of change your PR introduces:

  • 🚧 Work in Progress
  • 🌈 Refactoring (no functional changes, no api changes)
  • 🐹 Trivial/Minor
  • 🐛 Bugfix
  • 🌻 Feature
  • 🗺️ Documentation
  • 🤖 Test

Issues

Test Plan

run blueprint without namespace:

actions:
  post-export:
    name: ""
    kind: Namespace
    phases:
      - func: KubeTask
        name: hookPhase
        args:
          command:
            - /bin/sh
            - -c
            - |
              sleep 50
          image: bitnami/kubectl

ensure that kanister-job was deleted

  • 💪 Manual
  • ⚡ Unit test
  • 💚 E2E

@github-actions
Copy link
Contributor

Thanks for submitting this pull request 🎉. The team will review it soon and get back to you.

If you haven't already, please take a moment to review our project contributing guideline and Code of Conduct document.

@infraq infraq added this to In Progress in Kanister Jun 13, 2023
@AKhoria AKhoria changed the title fix deletion of the pod created by BP without NS Fix deletion of the pod created by blueprint without namespace Jun 13, 2023
@AKhoria AKhoria requested a review from pavannd1 June 13, 2023 15:42
AKhoria and others added 2 commits June 14, 2023 09:10
Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com>
Copy link
Contributor

@e-sumin e-sumin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but I think it would be good to have unit test coverage for both cases (with and without namespace).

Kanister automation moved this from In Progress to Reviewer approved Jun 14, 2023
@AKhoria
Copy link
Contributor Author

AKhoria commented Jun 14, 2023

LGTM but I think it would be good to have unit test coverage for both cases (with and without namespace).
Do you mean StartPod function?
But this logic (choosing namespace) is performed not in pod_controller but inside pod.go which is mocked.

@AKhoria AKhoria added the kueue label Jun 14, 2023
@mergify mergify bot merged commit f90d50a into master Jun 14, 2023
14 checks passed
Kanister automation moved this from Reviewer approved to Done Jun 14, 2023
@mergify mergify bot deleted the blueprint-without-ns-delete-pod branch June 14, 2023 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants