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

Sample App: Adding the db service #5909

Merged
merged 13 commits into from Apr 10, 2024

Conversation

Leo6Leo
Copy link
Member

@Leo6Leo Leo6Leo commented Mar 14, 2024

Fixes #5891

Proposed Changes

  • Adding the yaml files to set up the postgreSQL deployment service
  • Adding the tutorial content

@knative-prow knative-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 14, 2024
@knative-prow knative-prow bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 14, 2024
Copy link

netlify bot commented Mar 14, 2024

Deploy Preview for knative ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit cc0b169
🔍 Latest deploy log https://app.netlify.com/sites/knative/deploys/66135c079ecb0d00084a32f7
😎 Deploy Preview https://deploy-preview-5909--knative.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Leo6Leo
Copy link
Member Author

Leo6Leo commented Mar 18, 2024

Closed as this PR is a guidance for the community contributor's PR. #5913

@Leo6Leo Leo6Leo closed this Mar 18, 2024
@Leo6Leo Leo6Leo reopened this Mar 27, 2024
@knative-prow knative-prow bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 27, 2024
@Leo6Leo Leo6Leo changed the title [WIP] Adding the db service Adding the db service Mar 27, 2024
@knative-prow knative-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 27, 2024
@Leo6Leo Leo6Leo changed the title Adding the db service Sample App: Adding the db service Mar 27, 2024
@Leo6Leo
Copy link
Member Author

Leo6Leo commented Mar 28, 2024

/cc @Cali0707 @pierDipi

code-samples/eventing/bookstore-sample-app/db/README.md Outdated Show resolved Hide resolved
Comment on lines 6 to 9
You might wonder, "Why not leverage Knative Serving to dynamically scale the database service in response to traffic demands?" We'll delve into the optimal scenarios for employing Knative Serving and when it's advantageous for our database service.

### BookReviews Table
## What Knative features will we learn about?
- Appropriate Use Cases for Knative Service
Copy link
Member

Choose a reason for hiding this comment

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

I feel like the sentence and the point list is out of context and eventually contextualized below in Why did we choose to deploy our PostgreSQL database using a StatefulSet instead of a Knative Service?.

I think the section below is enough

Comment on lines +99 to +102
Note box: However, Knative Service supports Volumes and Persistent Volumes, which can be used to store data. You can read more [here](https://knative.dev/docs/serving/services/storage/) about how to use Volumes and Persistent Volumes with Knative Services specially for your use case.

---
Copy link
Member

Choose a reason for hiding this comment

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

Is this the way to format a "note box"?

Copy link
Member Author

@Leo6Leo Leo6Leo Apr 4, 2024

Choose a reason for hiding this comment

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

Oh it is a note to myself. I will edit it when we are ready to render the tutorial to pages. The issue has been created to track this #5938

Comment on lines +104 to +106

You can read more about the best use cases for Knative Service [here](https://knative.dev/docs/serving/samples/)!
Copy link
Member

Choose a reason for hiding this comment

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

I don't think the samples page describes the point here

Copy link
Member Author

Choose a reason for hiding this comment

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

There is no page that describes the usage for the sample usage of Knative Service. Adding the new page or edit the current existing page to list the few sample usage is my thought:

  • E-commerce websites during sales events: traffic can spike a lot during sales events or holiday seasons. Knative Service can automatically scale the backend services up or down based on demand, ensuring that the website remains working.

  • Real-time analytics and monitoring: In IoT or data analytics applications, Knative can manage services that process data streams in real time. For example, a company monitoring environmental sensors across a city could use Knative to scale up data processing services as the volume of sensor data spikes.

  • ML model serving: serving different models based on user requirements or experimenting with A/B testing of models. It allows for the deployment of many revisions of a model and dynamically scales these services based on the request load!

  • Microservices and APIs: for those who use microservices architecture, Knative service provides a way to deploy and manage serverless APIs that scale automatically with usage. This is particularly useful for APIs with different traffic patterns

plz correct me if any of these are not accurate or may not be the best use case of knative service.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, those are accurate, however, my point is that we can have a dedicated page for this vs being part of something unrelated, in this page, we can stay concise and link to the dedicated page on "when to use ksvc vs when not to use ksvc"

Copy link
Member

Choose a reason for hiding this comment

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

Given that we don't have such content / page, we can add it later as necessary

Comment on lines +108 to +109
By following this guide, you have successfully deployed a PostgreSQL server on a Kubernetes cluster, set up persistent storage, and initialized your database using a Kubernetes job. Congratulations! Your bookstore now has the database service.
Copy link
Member

Choose a reason for hiding this comment

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

Eventually, I think this needs a link to next section?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes! In all parts of the tutorial, it will have the link navigate to the next section at the bottom to make sure the reading experience is good!

Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Leo6Leo and others added 3 commits April 4, 2024 17:02
Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
@Leo6Leo Leo6Leo requested a review from pierDipi April 8, 2024 02:53
Copy link
Member

@pierDipi pierDipi left a comment

Choose a reason for hiding this comment

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

I think we can follow up on some comments later

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Apr 10, 2024
Copy link

knative-prow bot commented Apr 10, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Leo6Leo, pierDipi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot merged commit cbeb03a into knative:main Apr 10, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sample App: Database Service: Migration
2 participants