Skip to content

Commit a07a30b

Browse files
authored
fix: ingress-apisix version of deploy image tag and document (#1968) (#1972)
1 parent d91757a commit a07a30b

4 files changed

Lines changed: 97 additions & 53 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ for us to fix.
109109

110110
## Community
111111

112-
* Mailing List: Mail to dev-subscribe@apisix.apache.org, follow the reply to subscribe the mailing list.
112+
* Mailing List: Mail to <dev-subscribe@apisix.apache.org>, follow the reply to subscribe the mailing list.
113113
* QQ Group - 578997126
114114
* ![Twitter Follow](https://img.shields.io/twitter/follow/ApacheAPISIX?style=social) - follow and interact with us using hashtag `#ApacheAPISIX`
115115
* [Bilibili video](https://space.bilibili.com/551921247)

docs/en/latest/composite.md

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ title: Composite Architecture
2121
#
2222
-->
2323

24-
**Please note that this is a preview feature**
24+
:::note
25+
26+
**This feature is experimental**
27+
28+
:::
2529

2630
## Background
2731

@@ -49,10 +53,30 @@ Since apisix strongly relies on the etcd API, the control-plane will simulate th
4953

5054
## Installation
5155

56+
Save the APISIX Ingress version to an environment variable to be used next:
57+
58+
```bash
59+
APISIX_INGRESS_VERSION="1.7.0"
60+
```
61+
62+
Clone the APISIX Ingress source code of this version into a new directory apisix-APISIX_VERSION:
63+
64+
```bash
65+
git clone --depth 1 --branch ${APISIX_INGRESS_VERSION} https://github.com/apache/apisix-ingress-controller.git ingress-apisix-${APISIX_INGRESS_VERSION}
66+
```
67+
5268
Install the CRDs and ingress-apisix:
5369

70+
```bash
71+
cd ingress-apisix-${APISIX_INGRESS_VERSION}
72+
# install CRDs
73+
kubectl apply -k samples/deploy/crd/v1
74+
# install ingress-apisix
75+
kubectl apply -f samples/deploy/composite.yaml
76+
```
77+
5478
```shell
55-
$ kubectl apply -f samples/deploy/composite.yaml
79+
# install ingress-apisix output
5680
namespace/ingress-apisix created
5781
clusterrole.rbac.authorization.k8s.io/apisix-view-clusterrole created
5882
serviceaccount/apisix-view-serviceaccount created
@@ -65,11 +89,15 @@ service/ingress-apisix-gateway created
6589
Check the pod status to confirm successful installation:
6690

6791
```shell
68-
$ kubectl get service -n ingress-apisix # check service
92+
kubectl get service -n ingress-apisix # check service
93+
kubectl get pods -n ingress-apisix # check pod
94+
```
95+
96+
```shell
97+
# service
6998
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
7099
ingress-apisix-gateway NodePort 10.99.236.58 <none> 80:31143/TCP,443:30166/TCP 90s
71-
72-
$ kubectl get pods -n ingress-apisix # check pod
100+
# pod
73101
NAME READY STATUS RESTARTS AGE
74102
ingress-apisix-composite-deployment-5df9bc99c7-xxpvq 2/2 Running 0 100s
75103
```
@@ -82,12 +110,16 @@ Install the ApisixRoute and httpbin app:
82110
kubectl apply -f samples/httpbin/httpbin-route.yaml
83111
```
84112

85-
After forwarding the local port 9080 to the service port 80, send a request:
113+
After forwarding the local port 9080 to the `ingress-apisix-gateway` service port 80, send a request:
86114

87-
```shell
88-
$ kubectl port-forward service/ingress-apisix-gateway 9080:80 -n ingress-apisix &
115+
```bash
116+
# forward local port 9080 to ingress-apisix-gateway service port 80
117+
kubectl port-forward service/ingress-apisix-gateway 9080:80 -n ingress-apisix &
118+
# send a request
119+
curl http://127.0.0.1:9080/headers -H 'Host: httpbin.org'
120+
```
89121

90-
$ curl http://127.0.0.1:9080/headers -H 'Host: httpbin.org'
122+
```shell
91123
{
92124
"headers": {
93125
"Accept": "*/*",

docs/en/latest/config.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@
7979
"type": "doc",
8080
"id": "design"
8181
},
82+
{
83+
"type": "doc",
84+
"id": "composite"
85+
},
8286
{
8387
"type": "doc",
8488
"id": "contribute"

samples/deploy/composite.yaml

Lines changed: 51 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ metadata:
2323
name: ingress-apisix
2424

2525
---
26-
2726
apiVersion: rbac.authorization.k8s.io/v1
2827
kind: ClusterRole
2928
metadata:
@@ -136,7 +135,7 @@ rules:
136135
- ingresses/status
137136
- networkpolicies
138137
verbs:
139-
- '*'
138+
- "*"
140139
- apiGroups:
141140
- metrics.k8s.io
142141
resources:
@@ -163,13 +162,13 @@ rules:
163162
- apisixglobalrules
164163
- apisixglobalrules/status
165164
verbs:
166-
- '*'
165+
- "*"
167166
- apiGroups:
168167
- coordination.k8s.io
169168
resources:
170169
- leases
171170
verbs:
172-
- '*'
171+
- "*"
173172
- apiGroups:
174173
- discovery.k8s.io
175174
resources:
@@ -202,15 +201,13 @@ rules:
202201
- list
203202

204203
---
205-
206204
apiVersion: v1
207205
kind: ServiceAccount
208206
metadata:
209207
name: apisix-view-serviceaccount
210208
namespace: ingress-apisix
211209

212210
---
213-
214211
apiVersion: rbac.authorization.k8s.io/v1
215212
kind: ClusterRoleBinding
216213
metadata:
@@ -224,9 +221,7 @@ subjects:
224221
name: apisix-view-serviceaccount
225222
namespace: ingress-apisix
226223

227-
228224
---
229-
230225
apiVersion: v1
231226
kind: ConfigMap
232227
metadata:
@@ -352,7 +347,6 @@ data:
352347
enable_export_server: false
353348
354349
---
355-
356350
apiVersion: apps/v1
357351
kind: Deployment
358352
metadata:
@@ -374,32 +368,48 @@ spec:
374368
name: apisix-gw-config.yaml
375369
defaultMode: 420
376370
containers:
377-
- name: ingress-apisix
378-
image: apache/apisix-ingress-controller:dev
371+
- livenessProbe:
372+
tcpSocket:
373+
port: 8080
374+
initialDelaySeconds: 15
375+
timeoutSeconds: 2
376+
periodSeconds: 2
377+
successThreshold: 1
378+
failureThreshold: 3
379+
readinessProbe:
380+
tcpSocket:
381+
port: 8080
382+
initialDelaySeconds: 10
383+
timeoutSeconds: 2
384+
periodSeconds: 10
385+
successThreshold: 1
386+
failureThreshold: 3
387+
name: ingress-apisix
388+
image: apache/apisix-ingress-controller:1.7.0
379389
command:
380390
- /ingress-apisix/apisix-ingress-controller
381391
- ingress
382-
- '--log-output'
392+
- "--log-output"
383393
- stdout
384-
- '--apisix-resource-sync-interval'
394+
- "--apisix-resource-sync-interval"
385395
- 1h
386-
- '--apisix-resource-sync-comparison=true'
387-
- '--http-listen'
388-
- ':8080'
389-
- '--https-listen'
390-
- ':8443'
391-
- '--default-apisix-cluster-name'
396+
- "--apisix-resource-sync-comparison=true"
397+
- "--http-listen"
398+
- ":8080"
399+
- "--https-listen"
400+
- ":8443"
401+
- "--default-apisix-cluster-name"
392402
- default
393-
- '--default-apisix-cluster-base-url'
403+
- "--default-apisix-cluster-base-url"
394404
- http://127.0.0.1:9180/apisix/admin
395-
- '--default-apisix-cluster-admin-key'
405+
- "--default-apisix-cluster-admin-key"
396406
- edd1c9f034335f136f87ad84b625c8f1
397-
- '--api-version'
407+
- "--api-version"
398408
- apisix.apache.org/v2
399-
- '--ingress-status-address'
400-
- ''
401-
- '--disable-status-updates=false'
402-
- '--etcd-server-enabled=true'
409+
- "--ingress-status-address"
410+
- ""
411+
- "--disable-status-updates=false"
412+
- "--etcd-server-enabled=true"
403413
ports:
404414
- name: http
405415
containerPort: 8080
@@ -422,26 +432,26 @@ spec:
422432
apiVersion: v1
423433
fieldPath: metadata.name
424434
resources: {}
425-
livenessProbe:
426-
tcpSocket:
427-
port: 8080
428-
initialDelaySeconds: 5
429-
timeoutSeconds: 2
435+
terminationMessagePath: /dev/termination-log
436+
terminationMessagePolicy: File
437+
imagePullPolicy: IfNotPresent
438+
- livenessProbe:
439+
failureThreshold: 3
440+
initialDelaySeconds: 20
430441
periodSeconds: 2
431442
successThreshold: 1
432-
failureThreshold: 3
433-
readinessProbe:
434443
tcpSocket:
435-
port: 8080
436-
initialDelaySeconds: 5
444+
port: 9080
437445
timeoutSeconds: 2
438-
periodSeconds: 10
439-
successThreshold: 1
446+
readinessProbe:
440447
failureThreshold: 3
441-
terminationMessagePath: /dev/termination-log
442-
terminationMessagePolicy: File
443-
imagePullPolicy: IfNotPresent
444-
- name: apisix
448+
initialDelaySeconds: 15
449+
periodSeconds: 2
450+
successThreshold: 1
451+
tcpSocket:
452+
port: 9080
453+
timeoutSeconds: 1
454+
name: apisix
445455
image: apache/apisix:3.2.2-centos
446456
ports:
447457
- name: http
@@ -473,9 +483,7 @@ spec:
473483
revisionHistoryLimit: 10
474484
progressDeadlineSeconds: 600
475485

476-
477486
---
478-
479487
apiVersion: v1
480488
kind: Service
481489
metadata:

0 commit comments

Comments
 (0)