Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
NAME := popeye
PACKAGE := github.com/derailed/$(NAME)
VERSION := v0.22.1
VERSION := v0.22.2
GIT := $(shell git rev-parse --short HEAD)
DATE := $(shell date +%FT%T%Z)
IMG_NAME := derailed/popeye
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -513,16 +513,24 @@ spec:
image: derailed/popeye:vX.Y.Z
imagePullPolicy: IfNotPresent
args:
- -o
- --out
- yaml
- --force-exit-zero
- --logs
- none
- --cluster-name
- my-cluster
- --all-namespaces
resources:
limits:
cpu: 500m
memory: 100Mi
```

The `--force-exit-zero` should be set. Otherwise, the pods will end up in an error state.
The `--logs none` argument must be set to output the log to stdout. Otherwise `kubectl logs -f` will return an empty result.
The `--cluster-name` should be set to the name of your cluster for in-cluster usage.


> NOTE! Popeye exits with a non-zero error code if any lint errors are detected.

Expand Down
10 changes: 8 additions & 2 deletions k8s/popeye/cronjob.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,16 @@ spec:
imagePullPolicy: IfNotPresent
command: ["/bin/popeye"]
args:
- -f
- --file
- /etc/config/popeye/spinach.yml
- -o
- --out
- yaml
- --force-exit-zero
- --logs
- none
- --cluster-name
- my-cluster
- --all-namespaces
resources:
limits:
cpu: 500m
Expand Down
11 changes: 11 additions & 0 deletions pkg/config/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,17 @@ func (s *S3Info) minioUpload(ctx context.Context, bucket, key, asset string, rwc
}

contentType := "application/octet-stream"
fileExtension := filepath.Ext(asset)

switch fileExtension {
case ".html":
contentType = "text/html"
case ".json":
contentType = "application/json"
case ".yaml", ".yml":
contentType = "application/yaml"
}

info, err := minioClient.PutObject(ctx,
bucket,
filepath.Join(key, asset),
Expand Down