Skip to content

Commit

Permalink
Fix log rotation for test pods
Browse files Browse the repository at this point in the history
Better to create new file than to truncate old, otherwise \0 bytes get
prepended to the message.

Minor fix in README
  • Loading branch information
jvassev committed Apr 29, 2018
1 parent ae3d1b9 commit 80bfc65
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ Flags:
| `namespaces` | List of namespaces to operate on. Empty means all namespaces | `[]` |
| `interval` | How often to check for config changes (seconds) | `45` |
| `meta.key` | The metadata key (optional) | `""` |
| `meta.values` | Comma-separated key-values string (k1=v1,k2=v2,..) | Metadata to use for the key |
| `meta.values` | Metadata to use for the key | `{}`
| `fluentdResources` | Resource definitions for the fluentd container | `{}`|
| `reloaderResources` | Resource definitions for the reloader container | `{}` |
| `tolerations` | Pod tolerations | `[]` |
Expand Down
2 changes: 1 addition & 1 deletion config-reloader/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ push-image: build-image


create-test-ns:
envsubst '$$LOGGLY_TOKEN' < examples/manifests/kfo-test.yaml | kubectl apply -f -
LOGGLY_TOKEN=$(LOGGLY_TOKEN) envsubst '$$LOGGLY_TOKEN' < examples/manifests/kfo-test.yaml | kubectl apply -f -

delete-test-ns:
kubectl delete -f examples/manifests/kfo-test.yaml
Expand Down
4 changes: 2 additions & 2 deletions config-reloader/examples/manifests/kfo-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
command:
- bash
- -c
- while true; do echo `date -R` [INFO] "Random hello number $((var++)) to file"; sleep 2; [[ $(($var % 100)) == 0 ]] && :> /var/log/hello.log ;done > /var/log/hello.log
- while true; do echo `date -R` [INFO] "Random hello number $((var++)) to file"; sleep 2; [[ $(($var % 100)) == 0 ]] && rm -fr /var/log/hello.log ;done > /var/log/hello.log
volumeMounts:
- mountPath: /var/log
name: logs
Expand Down Expand Up @@ -63,7 +63,7 @@ spec:
command:
- bash
- -c
- while true; do echo `date -R` [INFO] "Random welcome number $((var++)) to file"; sleep 2; [[ $(($var % 100)) == 0 ]] && :> /var/log/welcome.log ;done > /var/log/welcome.log
- while true; do echo `date -R` [INFO] "Random welcome number $((var++)) to file"; sleep 2; [[ $(($var % 100)) == 0 ]] && rm -fr /var/log/welcome.log ;done > /var/log/welcome.log
volumeMounts:
- mountPath: /var/log
name: logs
Expand Down

0 comments on commit 80bfc65

Please sign in to comment.