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 Helm chart and PR Deployments #9286

Closed
wants to merge 1 commit into from
Closed

Add Helm chart and PR Deployments #9286

wants to merge 1 commit into from

Conversation

kliwniloc
Copy link
Member

@kliwniloc kliwniloc commented Sep 5, 2024

This Pull Request merges the Helm chart from https://github.com/ls1intum/artemis-helm and adds GitHub action workflows to continuously deploy pull requests to Kubernetes.

Summary by CodeRabbit

  • New Features

    • Introduced automated workflows for deploying and cleaning up Kubernetes environments for pull requests.
    • Added a workflow for building and pushing Helm charts on branch pushes.
    • Provided a guide for accessing application URLs based on different service types in the Helm chart.
    • Enhanced Helm chart templating with functions for generating resource names and labels.
  • Chores

    • Created a .gitignore file to exclude unnecessary files from version control.

Copy link

coderabbitai bot commented Sep 5, 2024

Warning

Rate limit exceeded

@kliwniloc has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 5 minutes and 42 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between 0f78fff and 8db2ec4.

Walkthrough

The changes introduce three new GitHub Actions workflows for automating the deployment and cleanup of Kubernetes resources using Helm. The workflows facilitate the deployment of pull requests, the cleanup of resources when pull requests are closed, and the building and pushing of Helm charts. Additional files include a .gitignore to manage ignored files and templates that provide user guidance and helper functions for the Helm chart.

Changes

File(s) Change Summary
.github/workflows/helm_pr_deployment.yml Introduced a workflow for deploying pull requests to Kubernetes using Helm, triggered by PR events.
.github/workflows/helm_pr_deployment_delete.yml Introduced a workflow for cleaning up Kubernetes deployments related to closed pull requests.
.github/workflows/helmchart.yml Introduced a workflow for building and pushing Helm charts on branch pushes.
helm/.gitignore Created a .gitignore file to ignore the charts directory in the Helm folder.
helm/artemis/templates/NOTES.txt Added a template file providing access instructions for the application based on service type.
helm/artemis/templates/_helpers.tpl Added helper functions for generating Kubernetes resource names and labels for the Artemis application.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 10

.github/workflows/helmchart.yml Show resolved Hide resolved
.github/workflows/helmchart.yml Outdated Show resolved Hide resolved
.github/workflows/helmchart.yml Show resolved Hide resolved
helm/artemis/templates/NOTES.txt Show resolved Hide resolved
helm/artemis/templates/_helpers.tpl Show resolved Hide resolved
helm/artemis/templates/_helpers.tpl Show resolved Hide resolved
.github/workflows/helm_pr_deployment.yml Show resolved Hide resolved
.github/workflows/helm_pr_deployment.yml Show resolved Hide resolved
.github/workflows/helm_pr_deployment.yml Show resolved Hide resolved
.github/workflows/helm_pr_deployment.yml Show resolved Hide resolved
Copy link

github-actions bot commented Sep 5, 2024

🚀 Deployed PR #9286 to https://pr9286.artemis-k8s.ase.cit.tum.de

⏳ It might take up to 10 minutes to fully start up.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

.github/workflows/helm_pr_deployment.yml Show resolved Hide resolved
coderabbitai[bot]
coderabbitai bot previously approved these changes Sep 5, 2024
Copy link

github-actions bot commented Sep 5, 2024

🚀 Deployed PR #9286 to https://pr9286.artemis-k8s.ase.cit.tum.de

⏳ It might take up to 10 minutes to fully start up.

Copy link
Contributor

@iyannsch iyannsch left a comment

Choose a reason for hiding this comment

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

What a nice idea to put the deployments on K8s!
I left you a couple of comments in the GitHub action files and briefly looked over the templates too - they are mostly copied from Matthias though, right?


on:
pull_request:
types: [opened, synchronize, reopened]
Copy link
Contributor

Choose a reason for hiding this comment

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

According to the GH documentation, those 3 values are consistent with the set of default values. I propose to omit them for clarity reasons here

Comment on lines +6 to +10
workflow_run:
workflows: ["tests"]
branches: [main]
types:
- completed
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this relate to the workflow defined in .github/workflows/test.yml?
What's the reason for adding a workflow-trigger when your only job is conditional to the action having a pull_request?

Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you need this workflow when the exact same steps are taken on pull_request anyways?

@krusche
Copy link
Member

krusche commented Sep 6, 2024

Please use the PR description template, follow the naming conventions for PR titles and branch names!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants