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

prow-build-trusted: Add PVC for publishing-bot #5685

Merged
merged 1 commit into from
Aug 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Copy link
Member

Choose a reason for hiding this comment

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

q: There can be cases where the contents stored in the publishing bot PV can get corrupted sometime and we will have to delete and recreate it.

Ref: https://github.com/kubernetes/publishing-bot/blob/master/production.md#what-is-the-persistent-volume-for

In such a scenario, how can someone easily delete and recreate the PVC ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Since the publishing-bot pod is handled by the prowjob, I suspect (I think I'm wrong) that for each run of the prowjob we'll get a new PV (or do we want to create the PV manually? ). If that's the case, cleanup can handled differently. One alternative could be the usage of ephemeral storage in the podSpec.

Copy link
Member

Choose a reason for hiding this comment

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

Nope. We dont to have a new PV for everyrun, that will defeat the purpose. The PV is used so that we dont have to download all the repos everytime. And ephemeral storage also wont suffice our needs. A PV is what we need, and whatever changes in this are good. I was thinking of methods on how to clean it incase if it gets corrupted.

Copy link
Member

Choose a reason for hiding this comment

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

Anyways, the cleanup part we can think of later in a separate PR once the publishing-bot is migrated to test-infra.

IMHO, for adding the PVC this is good. Thank you

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Prow PVCs
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: publishing-bot-pvc
namespace: test-pods
Copy link
Member

Choose a reason for hiding this comment

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

q: Is the same namespace in which all the prow test jobs run?

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

labels:
app: publisher
spec:
storageClassName: "premium-rwo"
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 same as ssd storage class?

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

accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Gi