a0defefb3f
ingress-nginx 0.16.2 (https://github.com/kubernetes/ingress-nginx/releases/tag/nginx-0.16.2) This patch simplify ingress-nginx deployment by default deploy on master, with customizable options; on the other hand, remove the additional Ansible group "kube-ingress" and its k8s node label injection. Reference to https://kubernetes.io/docs/concepts/services-networking/ingress/#prerequisites: GCE/Google Kubernetes Engine deploys an ingress controller on the master. By changing `ingress_nginx_nodeselector` plus custom k8s node label, user could customize the DaemonSet deployment target. If `ingress_nginx_nodeselector` is empty, will deploy DaemonSet on every k8s node.
44 lines
1.3 KiB
Django/Jinja
44 lines
1.3 KiB
Django/Jinja
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: default-backend-v{{ ingress_nginx_default_backend_image_tag }}
|
|
namespace: {{ ingress_nginx_namespace }}
|
|
labels:
|
|
k8s-app: default-backend
|
|
version: v{{ ingress_nginx_default_backend_image_tag }}
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
k8s-app: default-backend
|
|
version: v{{ ingress_nginx_default_backend_image_tag }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
k8s-app: default-backend
|
|
version: v{{ ingress_nginx_default_backend_image_tag }}
|
|
spec:
|
|
terminationGracePeriodSeconds: 60
|
|
containers:
|
|
- name: default-backend
|
|
# Any image is permissible as long as:
|
|
# 1. It serves a 404 page at /
|
|
# 2. It serves 200 on a /healthz endpoint
|
|
image: {{ ingress_nginx_default_backend_image_repo }}:{{ ingress_nginx_default_backend_image_tag }}
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: 8080
|
|
scheme: HTTP
|
|
initialDelaySeconds: 30
|
|
timeoutSeconds: 5
|
|
ports:
|
|
- containerPort: 8080
|
|
resources:
|
|
limits:
|
|
cpu: 10m
|
|
memory: 20Mi
|
|
requests:
|
|
cpu: 10m
|
|
memory: 20Mi
|