Skip to content

Commit

Permalink
deploy: increase the requested log storage
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlJi committed Sep 11, 2024
1 parent 51af5cc commit 0589958
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
13 changes: 6 additions & 7 deletions deploy/reviewbot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
- -app-private-key=/secrets/github_app_key
- -debug=true
- -s3-credentials-file=/root/.aws/credentials.json
- -server-addr=http://qiniu-x.jfcs-k8s-qa1.qiniu.io # this is an intranet domain of qiniu.
- -server-addr=http://qiniu-x.jfcs-k8s-qa1.qiniu.io # this is an intranet domain of qiniu.
env:
- name: GITHUB_WEBHOOK_SECRET
valueFrom:
Expand Down Expand Up @@ -80,8 +80,8 @@ spec:
- mountPath: /tmp
name: reviewbot-pvc
- name: aws-credentials-volume
mountPath: /root/.aws/credentials.json
subPath: credentials.json
mountPath: /root/.aws/credentials.json
subPath: credentials.json
- name: dind
image: aslan-spock-register.qiniu.io/qa/docker:27.2.0-dind
securityContext:
Expand Down Expand Up @@ -138,7 +138,6 @@ spec:
configMap:
name: s3credentials-cm


---
apiVersion: v1
kind: Service
Expand Down Expand Up @@ -188,7 +187,7 @@ spec:
number: 8888
path: /hook
pathType: Prefix
- host: qiniu-x.jfcs-k8s-qa1.qiniu.io
- host: qiniu-x.jfcs-k8s-qa1.qiniu.io
http:
paths:
- backend:
Expand All @@ -199,7 +198,6 @@ spec:
path: /view
pathType: Prefix
---

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
Expand All @@ -210,6 +208,7 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 50Gi
storage: 1000Gi

---

5 changes: 2 additions & 3 deletions internal/storage/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/aws/smithy-go"
)

var ErrObjectNotFound = fmt.Errorf("object not found")
var ErrObjectNotFound = errors.New("object not found")

type S3Storage struct {
s3 *s3.Client
Expand Down Expand Up @@ -77,8 +77,7 @@ func (s *S3Storage) Read(ctx context.Context, key string) ([]byte, error) {
if err != nil {
var apiErr smithy.APIError
if errors.As(err, &apiErr) {
switch apiErr.ErrorCode() {
case "NoSuchKey":
if apiErr.ErrorCode() == "NoSuchKey" {
return nil, ErrObjectNotFound
}
}
Expand Down

0 comments on commit 0589958

Please sign in to comment.