https://github.com/maayanlab/kubernetes-auto-ingress
Auto-generate kubernetes ingresses based on a deployment annotation.
https://github.com/maayanlab/kubernetes-auto-ingress
Last synced: about 1 month ago
JSON representation
Auto-generate kubernetes ingresses based on a deployment annotation.
- Host: GitHub
- URL: https://github.com/maayanlab/kubernetes-auto-ingress
- Owner: MaayanLab
- License: apache-2.0
- Created: 2020-07-24T23:30:36.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-11-13T16:35:35.000Z (over 1 year ago)
- Last Synced: 2025-01-22T03:15:05.335Z (3 months ago)
- Language: Python
- Size: 54.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kubernetes-auto-ingress
Auto-generate kubernetes ingresses based on a deployment annotation.
Assumes namespace kube-system exists, and deployments also have services created for them with the same name (as is the case for rancher deployments).
By default, it watches the default namespace for deployments with the (changable) `maayanlab.cloud/ingress` annotation key specifying the path to mount your app onto. It also expects a labeled port in your deployment spec named 'http' referring to the port to forward *to*.
```yaml
metadata:
annotations:
maayanlab.cloud/ingress: https://example.org/your_path # your path
spec:
template:
spec:
containers:
- image: your_image
ports:
- containerPort: 80 # your_http_port
name: http
protocol: TCP
```This registers an annotation with the same key-value pair, and uses it to determine whether or not it should be managed by the utility. Other ingresses without the annotation will be ignored.
## Installation
### Install
```bash
kubectl create -f https://raw.githubusercontent.com/MaayanLab/kubernetes-auto-ingress/master/deployment.yaml
```## Development
### Build
```bash
docker build -t maayanlab/kubernetes-auto-ingress:latest .
```### Publish
```bash
docker push maayanlab/kubernetes-auto-ingress:latest
```