https://github.com/aledbf/watch-kube-resource
https://github.com/aledbf/watch-kube-resource
Last synced: 27 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/aledbf/watch-kube-resource
- Owner: aledbf
- Created: 2016-10-13T13:12:15.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-13T14:21:12.000Z (over 9 years ago)
- Last Synced: 2025-03-20T02:39:38.715Z (about 1 year ago)
- Language: Go
- Size: 3.92 MB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# watch-resource
**watch-resource** is a simple binary to trigger a reload when a file inside a pod changes or a Kubernetes resource (ConfigMap or Secret) is updated.
```
$ ./watch-resource-cmdrunner --help
Usage of :
--command="": Path to the script or command to execute inside the pod
--configmap="": Name of the configmap to watch. Takes the form namespace/name
--container="": Name of hte container inside the pod. An empty string uses the first container in the pod
--file="": Path to the file to watch
--pod="": Name of the pod where the command will be executed. Takes the form namespace/name.
No value means "this" pod (requires `POD_NAME` and `POD_NAMESPACE` using downward API)
--secret="": Name of the secret to watch. Takes the form namespace/name
```
The flags `--file`, `--configmap` and `--secret` are mutually exclusive".
Example:
```
/watch-resource-cmdrunner \
--command=curl http://localhost:10254/reload-template \
--file=/etc/nginx/template/nginx.tmpl \
--container=nginx-ingress-lb
```