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

docs: kube-rs blog post #27

Merged
merged 1 commit into from
Oct 1, 2024
Merged

docs: kube-rs blog post #27

merged 1 commit into from
Oct 1, 2024

Conversation

grampelberg
Copy link
Owner

@grampelberg grampelberg commented Sep 30, 2024

Summary by Sourcery

Add a new blog post about using kube-rs for Kubernetes controllers in Rust, implement an RSS feed for the blog, and enhance TypeScript configuration and CSS styles.

New Features:

  • Introduce a new blog post titled 'Write Your Next Kubernetes Controller in Rust', discussing the advantages of using Rust for Kubernetes controllers.
  • Add an RSS feed generation feature for the blog, allowing users to subscribe to updates.

Enhancements:

  • Update TypeScript configuration to include strict null checks and enhance plugin support.
  • Improve global CSS styles to center images within articles.

Documentation:

  • Add a comprehensive blog post detailing the use of kube-rs for writing Kubernetes controllers in Rust, including code examples and comparisons with Golang.

Copy link

vercel bot commented Sep 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kty ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 1, 2024 3:58pm

Copy link

sourcery-ai bot commented Sep 30, 2024

Reviewer's Guide by Sourcery

This pull request adds a new blog post about using kube-rs for Kubernetes controllers, implements an RSS feed for the blog, and makes several configuration changes to improve TypeScript support and styling. The changes are primarily focused on documentation and configuration, with no significant functional changes to the main application code.

No sequence diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Added a new blog post about using kube-rs for Kubernetes controllers
  • Created a new MDX file with the blog post content
  • Discussed the benefits of using Rust and kube-rs for Kubernetes controllers
  • Compared kube-rs with Go-based alternatives
  • Provided code examples and explanations of key features
docs/pages/blog/2024-09-30-use-kube-rs.mdx
Implemented RSS feed functionality for the blog
  • Created a new route for generating the RSS feed
  • Added logic to compile MDX files and extract metadata
  • Implemented RSS feed generation using the 'rss' package
  • Added a link to the RSS feed in the HTML head
docs/app/rss.xml/route.ts
docs/theme.config.tsx
Updated TypeScript configuration
  • Added 'next' plugin to the TypeScript configuration
  • Enabled strict null checks
  • Updated file inclusions and exclusions
  • Reformatted the tsconfig.json file for better readability
docs/tsconfig.json
Added global CSS styles for article images
  • Applied 'mx-auto' and 'block' classes to images within article paragraphs
docs/styles/globals.css
Updated Next.js type references
  • Added reference to Next.js navigation types
  • Updated the comment about editing the file
docs/next-env.d.ts
Added basic Next.js 13 app directory structure
  • Created a root layout component
  • Added metadata for the application
docs/app/layout.tsx

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @grampelberg - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 2 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

frontMatter.date = new Date(frontMatter.date)
}

export async function GET() {
Copy link

Choose a reason for hiding this comment

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

suggestion (performance): Optimize RSS feed generation performance

The current implementation reads and processes all blog files on each request, which could become slow as the number of blog posts grows. Consider implementing a caching mechanism for the RSS feed, regenerating it only when new content is added.

export async function GET() {
  const cachedFeed = await getCachedRSSFeed();
  if (cachedFeed) {
    return new Response(cachedFeed, {
      headers: { 'Content-Type': 'application/xml' },
    });
  }
  // Existing feed generation logic goes here
}

@@ -1,3 +1,8 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

article p img {
Copy link

Choose a reason for hiding this comment

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

suggestion: Use semantic class names instead of direct Tailwind classes

While the styling choice is reasonable, consider using a more semantic class name (e.g., .article-image) and applying the Tailwind classes to that instead. This approach would make the styling more maintainable in the long run.

.article-image {
    @apply mx-auto block;
}

article p img {
    @apply article-image;
}

@grampelberg grampelberg merged commit 0367c3b into main Oct 1, 2024
10 of 11 checks passed
@grampelberg grampelberg deleted the thomas--kube-rs-blog branch October 1, 2024 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant