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

Add reference architecture for using Kanister with Argo Workflows #1566

Merged
merged 10 commits into from
Aug 9, 2022

Conversation

aish-where-ya
Copy link
Contributor

@aish-where-ya aish-where-ya commented Jul 23, 2022

Change Overview

This PR adds a reference architecture for using Kanister with Argo Workflows to automate creation of backup ActionSets.

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

  • 💪 Manual
  • ⚡ Unit test
  • 💚 E2E

@github-actions
Copy link

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 Jul 23, 2022
docs/tasks/argo.rst Outdated Show resolved Hide resolved
docs/tasks/argo.rst Outdated Show resolved Hide resolved
docs/tasks/argo.rst Outdated Show resolved Hide resolved
docs/tasks/argo.rst Show resolved Hide resolved
docs/tasks/argo.rst Outdated Show resolved Hide resolved
docs/tasks/argo.rst Outdated Show resolved Hide resolved
docs/tasks/argo.rst Outdated Show resolved Hide resolved
docs/tasks/argo.rst Outdated Show resolved Hide resolved
docs/tasks/argo.rst Outdated Show resolved Hide resolved
docs/tasks/argo.rst Show resolved Hide resolved
Kanister automation moved this from In Progress to Review Required Jul 28, 2022
Copy link
Contributor

@pavannd1 pavannd1 left a comment

Choose a reason for hiding this comment

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

I will break down my reviews into parts to speed things up

docs/tasks/argo.rst Outdated Show resolved Hide resolved
docs/tasks/argo.rst Outdated Show resolved Hide resolved
docs/tasks/argo.rst Outdated Show resolved Hide resolved
docs/tasks/argo.rst Outdated Show resolved Hide resolved
docs/tasks/argo.rst Outdated Show resolved Hide resolved
docs/tasks/argo.rst Outdated Show resolved Hide resolved
docs/tasks/argo.rst Outdated Show resolved Hide resolved
docs/tasks/argo.rst Outdated Show resolved Hide resolved
docs/tasks/argo.rst Outdated Show resolved Hide resolved
docs/tasks/argo.rst Outdated Show resolved Hide resolved
@viveksinghggits
Copy link
Contributor

In most of the scenarios when we ask users to create an actionset using kanctl, we (kanctl) query a lot of things (k8s resources) that are passed to the kanctl command line tool.
So its, I think, I bit hard to figure out exact roles that a person need to be able to create an actionset. And that is the reason its a bit challenging to figure out the permissions that argo workflow needs to be able to create the actionset.
Also, I am not sure if giving cluster-admin role to the ServiceAccount is good idea.
Let's see what others say @pavannd1 @PrasadG193

@pavannd1
Copy link
Contributor

pavannd1 commented Aug 2, 2022

@viveksinghggits The main goal of this document is to provide a reference to scheduling actions using Argo Workflows for interested users. Consider it as a tutorial similar to the blueprint examples and the Grafana/Loki example we have in the documentation. As with those documents (we make assumptions in there too), we are only showcasing how we integrate with ArgoWorkflows and not providing a standard way to schedule actions in Kanister. Given the purpose of this tutorial, I think it's acceptable to use the cluster-admin role. However, I agree with your concerns and we could iterate and find a more fine-grained Role that works for creating ActionSets as a follow-up.

@aish-where-ya
Copy link
Contributor Author

I experimented with a lower admin role instead of cluster-admin. The pod to perform the workflow was not created.
The Argo documentation also allows you to create custom service accounts and then grant them the necessary permissions.

A note can be added saying that using the default service account and the mentioned privileges is not recommended in production and that the user can customize this based on their use case

Copy link
Contributor

@pavannd1 pavannd1 left a comment

Choose a reason for hiding this comment

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

This is looking good. I think it's well structured 👍🏼 💯
Minor improvements suggested. Should be good to merge once accepted.

One thing to follow up on in a separate PR would be to add commands to verify creations and deletions wherever they are missing.

docs/tasks/argo.rst Outdated Show resolved Hide resolved
docs/tasks/argo.rst Show resolved Hide resolved
docs/tasks/argo.rst Outdated Show resolved Hide resolved
docs/tasks/argo.rst Outdated Show resolved Hide resolved
docs/tasks/argo.rst Outdated Show resolved Hide resolved
docs/tasks/argo.rst Outdated Show resolved Hide resolved
docs/tasks/argo.rst Outdated Show resolved Hide resolved
docs/tasks/argo.rst Outdated Show resolved Hide resolved
docs/tasks/argo.rst Outdated Show resolved Hide resolved
docs/tasks/argo.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@pavannd1 pavannd1 left a comment

Choose a reason for hiding this comment

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

LGTM! Good job @aish-where-ya 🥇

@pavannd1
Copy link
Contributor

pavannd1 commented Aug 8, 2022

@viveksinghggits Please take a look

Copy link
Contributor

@viveksinghggits viveksinghggits left a comment

Choose a reason for hiding this comment

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

🚀

Kanister automation moved this from Review Required to Reviewer approved Aug 8, 2022
@pavannd1 pavannd1 added the kueue label Aug 9, 2022
@mergify mergify bot merged commit 5e850ce into master Aug 9, 2022
Kanister automation moved this from Reviewer approved to Done Aug 9, 2022
@mergify mergify bot deleted the argo-cron-workflows branch August 9, 2022 06:06
r4rajat pushed a commit to r4rajat/kanister that referenced this pull request Aug 28, 2022
…nisterio#1566)

* Add reference architecture for using Kanister with Argo Workflows

* Minor fix to underline

* Changed font in the architecture image.

* Addressed Vivek's review

* Addressed changes suggested by Vivek and Akanksha.

* Addressed Vivek's comments regarding RBAC

* Addressed Pavan's review comments.

* Addressed Pavan's additional review comments

* [nit] Update Step 2 heading

Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
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.

Kanister with Argo Workflows
4 participants