Skip to content

Commit 7b29a0c

Browse files
committed
Simplify installation and e2e manifests
1 parent 7ef8a0a commit 7b29a0c

30 files changed

+640
-675
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ go_import_path: k8s.io/ingress-nginx
2626
env:
2727
global:
2828
- CHANGE_MINIKUBE_NONE_USER=true
29-
- KUBERNETES_VERSION=v1.9.4
29+
- KUBERNETES_VERSION=v1.10.0
3030
- DOCKER=docker
3131
- BUSTED_VERSION=2.0.rc12
3232
- GH_REF=github.com/kubernetes/ingress-nginx

deploy/configmap.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
---
2+
13
kind: ConfigMap
24
apiVersion: v1
35
metadata:

deploy/default-backend.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
---
2+
13
apiVersion: extensions/v1beta1
24
kind: Deployment
35
metadata:

deploy/mandatory.yaml

+288
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,288 @@
1+
---
2+
3+
apiVersion: v1
4+
kind: Namespace
5+
metadata:
6+
name: ingress-nginx
7+
---
8+
9+
apiVersion: extensions/v1beta1
10+
kind: Deployment
11+
metadata:
12+
name: default-http-backend
13+
labels:
14+
app: default-http-backend
15+
namespace: ingress-nginx
16+
spec:
17+
replicas: 1
18+
selector:
19+
matchLabels:
20+
app: default-http-backend
21+
template:
22+
metadata:
23+
labels:
24+
app: default-http-backend
25+
spec:
26+
terminationGracePeriodSeconds: 60
27+
containers:
28+
- name: default-http-backend
29+
# Any image is permissible as long as:
30+
# 1. It serves a 404 page at /
31+
# 2. It serves 200 on a /healthz endpoint
32+
image: gcr.io/google_containers/defaultbackend:1.4
33+
livenessProbe:
34+
httpGet:
35+
path: /healthz
36+
port: 8080
37+
scheme: HTTP
38+
initialDelaySeconds: 30
39+
timeoutSeconds: 5
40+
ports:
41+
- containerPort: 8080
42+
resources:
43+
limits:
44+
cpu: 10m
45+
memory: 20Mi
46+
requests:
47+
cpu: 10m
48+
memory: 20Mi
49+
---
50+
51+
apiVersion: v1
52+
kind: Service
53+
metadata:
54+
name: default-http-backend
55+
namespace: ingress-nginx
56+
labels:
57+
app: default-http-backend
58+
spec:
59+
ports:
60+
- port: 80
61+
targetPort: 8080
62+
selector:
63+
app: default-http-backend
64+
---
65+
66+
kind: ConfigMap
67+
apiVersion: v1
68+
metadata:
69+
name: nginx-configuration
70+
namespace: ingress-nginx
71+
labels:
72+
app: ingress-nginx
73+
---
74+
75+
kind: ConfigMap
76+
apiVersion: v1
77+
metadata:
78+
name: tcp-services
79+
namespace: ingress-nginx
80+
---
81+
82+
kind: ConfigMap
83+
apiVersion: v1
84+
metadata:
85+
name: udp-services
86+
namespace: ingress-nginx
87+
---
88+
89+
apiVersion: v1
90+
kind: ServiceAccount
91+
metadata:
92+
name: nginx-ingress-serviceaccount
93+
namespace: ingress-nginx
94+
95+
---
96+
97+
apiVersion: rbac.authorization.k8s.io/v1beta1
98+
kind: ClusterRole
99+
metadata:
100+
name: nginx-ingress-clusterrole
101+
rules:
102+
- apiGroups:
103+
- ""
104+
resources:
105+
- configmaps
106+
- endpoints
107+
- nodes
108+
- pods
109+
- secrets
110+
verbs:
111+
- list
112+
- watch
113+
- apiGroups:
114+
- ""
115+
resources:
116+
- nodes
117+
verbs:
118+
- get
119+
- apiGroups:
120+
- ""
121+
resources:
122+
- services
123+
verbs:
124+
- get
125+
- list
126+
- watch
127+
- apiGroups:
128+
- "extensions"
129+
resources:
130+
- ingresses
131+
verbs:
132+
- get
133+
- list
134+
- watch
135+
- apiGroups:
136+
- ""
137+
resources:
138+
- events
139+
verbs:
140+
- create
141+
- patch
142+
- apiGroups:
143+
- "extensions"
144+
resources:
145+
- ingresses/status
146+
verbs:
147+
- update
148+
149+
---
150+
151+
apiVersion: rbac.authorization.k8s.io/v1beta1
152+
kind: Role
153+
metadata:
154+
name: nginx-ingress-role
155+
namespace: ingress-nginx
156+
rules:
157+
- apiGroups:
158+
- ""
159+
resources:
160+
- configmaps
161+
- pods
162+
- secrets
163+
- namespaces
164+
verbs:
165+
- get
166+
- apiGroups:
167+
- ""
168+
resources:
169+
- configmaps
170+
resourceNames:
171+
# Defaults to "<election-id>-<ingress-class>"
172+
# Here: "<ingress-controller-leader>-<nginx>"
173+
# This has to be adapted if you change either parameter
174+
# when launching the nginx-ingress-controller.
175+
- "ingress-controller-leader-nginx"
176+
verbs:
177+
- get
178+
- update
179+
- apiGroups:
180+
- ""
181+
resources:
182+
- configmaps
183+
verbs:
184+
- create
185+
- apiGroups:
186+
- ""
187+
resources:
188+
- endpoints
189+
verbs:
190+
- get
191+
192+
---
193+
194+
apiVersion: rbac.authorization.k8s.io/v1beta1
195+
kind: RoleBinding
196+
metadata:
197+
name: nginx-ingress-role-nisa-binding
198+
namespace: ingress-nginx
199+
roleRef:
200+
apiGroup: rbac.authorization.k8s.io
201+
kind: Role
202+
name: nginx-ingress-role
203+
subjects:
204+
- kind: ServiceAccount
205+
name: nginx-ingress-serviceaccount
206+
namespace: ingress-nginx
207+
208+
---
209+
210+
apiVersion: rbac.authorization.k8s.io/v1beta1
211+
kind: ClusterRoleBinding
212+
metadata:
213+
name: nginx-ingress-clusterrole-nisa-binding
214+
roleRef:
215+
apiGroup: rbac.authorization.k8s.io
216+
kind: ClusterRole
217+
name: nginx-ingress-clusterrole
218+
subjects:
219+
- kind: ServiceAccount
220+
name: nginx-ingress-serviceaccount
221+
namespace: ingress-nginx
222+
---
223+
224+
apiVersion: extensions/v1beta1
225+
kind: Deployment
226+
metadata:
227+
name: nginx-ingress-controller
228+
namespace: ingress-nginx
229+
spec:
230+
replicas: 1
231+
selector:
232+
matchLabels:
233+
app: ingress-nginx
234+
template:
235+
metadata:
236+
labels:
237+
app: ingress-nginx
238+
annotations:
239+
prometheus.io/port: '10254'
240+
prometheus.io/scrape: 'true'
241+
spec:
242+
serviceAccountName: nginx-ingress-serviceaccount
243+
containers:
244+
- name: nginx-ingress-controller
245+
image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.15.0
246+
args:
247+
- /nginx-ingress-controller
248+
- --default-backend-service=$(POD_NAMESPACE)/default-http-backend
249+
- --configmap=$(POD_NAMESPACE)/nginx-configuration
250+
- --tcp-services-configmap=$(POD_NAMESPACE)/tcp-services
251+
- --udp-services-configmap=$(POD_NAMESPACE)/udp-services
252+
- --publish-service=$(POD_NAMESPACE)/ingress-nginx
253+
- --annotations-prefix=nginx.ingress.kubernetes.io
254+
env:
255+
- name: POD_NAME
256+
valueFrom:
257+
fieldRef:
258+
fieldPath: metadata.name
259+
- name: POD_NAMESPACE
260+
valueFrom:
261+
fieldRef:
262+
fieldPath: metadata.namespace
263+
ports:
264+
- name: http
265+
containerPort: 80
266+
- name: https
267+
containerPort: 443
268+
livenessProbe:
269+
failureThreshold: 3
270+
httpGet:
271+
path: /healthz
272+
port: 10254
273+
scheme: HTTP
274+
initialDelaySeconds: 10
275+
periodSeconds: 10
276+
successThreshold: 1
277+
timeoutSeconds: 1
278+
readinessProbe:
279+
failureThreshold: 3
280+
httpGet:
281+
path: /healthz
282+
port: 10254
283+
scheme: HTTP
284+
periodSeconds: 10
285+
successThreshold: 1
286+
timeoutSeconds: 1
287+
securityContext:
288+
runAsNonRoot: false

deploy/namespace.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
---
2+
13
apiVersion: v1
24
kind: Namespace
35
metadata:

deploy/provider/docker-for-mac/service.yaml

-18
This file was deleted.

deploy/provider/gce-gke/service.yaml

-19
This file was deleted.

0 commit comments

Comments
 (0)