Skip to content

NeoJRotary/ingress-nginx-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ingress NGINX Backend v1.2.0

Kubernetes Ingress NGINX Backend

Docker Hub

Docker Hub
docker pull neojrotary/ingress-nginx-backend:latest

Intro

  • Support downloading confs from GCS
  • Support Nginx Hot Reload with Kubernetes ConfigMap volume mounting
  • Latest image build base on nginx:1.16.0
  • Test with Kubernetes 1.13.6
  • Check CHANGES.md for updates

How To Use

Setup ENVs, Done!
It will copy all files in your Cloud Storage / ConfigMap Volume into /etc/nginx/conf.d/.

Special Filename

Below filenames in the folder have different behavior.

  • nginx.conf
    It will move and overwrite /etc/nginx/nginx.conf.
  • before.sh
    It will be executed at root folder to let you do anything before start nginx server.

On Kubernetes

Check k8s-example folder for example configuration yaml

ENV

Cloud Storage Provider

  • ENABLE_GCS_SYNC : enable GCS sync function. Default is false.
  • SERVICE_ACCOUNT : your service account credential content in json format
  • BUCKET_NAME : bucket name
  • BUCKET_FOLDER : config files folder name in the bucket. It will download all files in it.

Nginx Module

  • ENABLE_MODULE_GEOIP : if true it will download Maxmind GeoLite and setup GeoIP module for you.

K8S ConfigMap

  • CONFIGMAP_FOLDER : folder which mount with kubernetes configmap. Default is /etc/config/.
  • CONFIGMAP_SCAN_DUR : duration between scanning of configmap in second. Default is 60s.

OTHERS

  • SHOW_RELOAD_CHECK_RESULT : set true to enable printing ConfigMap reload checking's result

Setup Service Account

You can set value directly at k8s configuration or pass by k8s secret.

Create secret :

apiVersion: v1
kind: Secret
metadata:
  name: service-account
  namespace: default
type: Opaque
data:
  storage-only: [my service account]

In your container spec :

env:
  - name: SERVICE_ACCOUNT
    valueFrom:
      secretKeyRef:
        name: service-account
        key: storage-only

About

Kubernetes Ingress NGINX Backend

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published