You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO(user): An in-depth paragraph about your project and overview of use
4
+
5
+
The API7 Ingress Controller allows you to run the API7 Gateway as a Kubernetes Ingress to handle inbound traffic for a Kubernetes cluster. It dynamically configures and manages the API7 Gateway using Gateway API resources.
6
+
7
+
## Document
8
+
9
+
*[Quickstart](./docs/quickstart.md)
10
+
*[Concepts](./docs/concepts.md)
11
+
*[Configuration](./docs/configuration.md)
12
+
*[Gateway API](./docs/gateway-api.md)
6
13
7
14
## Getting Started
8
15
9
16
### Prerequisites
10
-
- go version v1.22.0+
11
-
- docker version 17.03+.
12
-
- kubectl version v1.11.3+.
13
-
- Access to a Kubernetes v1.11.3+ cluster.
17
+
18
+
* go version v1.22.0+
19
+
* docker version 17.03+.
20
+
* kubectl version v1.11.3+.
21
+
* Access to a Kubernetes v1.11.3+ cluster.
14
22
15
23
### To Deploy on the cluster
24
+
16
25
**Build and push your image to the location specified by `IMG`:**
17
26
18
27
```sh
19
-
make docker-build docker-push IMG=<some-registry>/api7-ingress:tag
28
+
make build-image
20
29
```
21
30
22
31
**NOTE:** This image ought to be published in the personal registry you specified.
23
32
And it is required to have access to pull the image from the working environment.
24
33
Make sure you have the proper permission to the registry if the above commands don’t work.
25
34
26
-
**Install the CRDs into the cluster:**
35
+
**Install the CRDs & Gateway API into the cluster:**
27
36
28
37
```sh
29
38
make install
@@ -32,28 +41,12 @@ make install
32
41
**Deploy the Manager to the cluster with the image specified by `IMG`:**
33
42
34
43
```sh
35
-
make deploy IMG=<some-registry>/api7-ingress:tag
44
+
make deploy #IMG=api7/api7-ingress-controller:dev
36
45
```
37
46
38
47
> **NOTE**: If you encounter RBAC errors, you may need to grant yourself cluster-admin
39
48
privileges or be logged in as admin.
40
49
41
-
**Create instances of your solution**
42
-
You can apply the samples (examples) from the config/sample:
43
-
44
-
```sh
45
-
kubectl apply -k config/samples/
46
-
```
47
-
48
-
>**NOTE**: Ensure that the samples has default values to test it out.
49
-
50
-
### To Uninstall
51
-
**Delete the instances (CRs) from the cluster:**
52
-
53
-
```sh
54
-
kubectl delete -k config/samples/
55
-
```
56
-
57
50
**Delete the APIs(CRDs) from the cluster:**
58
51
59
52
```sh
@@ -73,7 +66,7 @@ Following are the steps to build the installer and distribute this project to us
73
66
1. Build the installer for the image built and published in the registry:
74
67
75
68
```sh
76
-
make build-installer IMG=<some-registry>/api7-ingress:tag
69
+
make build-installer #IMG=api7/api7-ingress-controller:dev
77
70
```
78
71
79
72
NOTE: The makefile target mentioned above generates an 'install.yaml'
@@ -86,16 +79,9 @@ its dependencies.
86
79
Users can just run kubectl apply -f <URLforYAMLBUNDLE> to install the project, i.e.:
87
80
88
81
```sh
89
-
kubectl apply -f https://raw.githubusercontent.com/<org>/api7-ingress/<tag or branch>/dist/install.yaml
82
+
kubectl apply -f dist/install.yaml
90
83
```
91
84
92
-
## Contributing
93
-
// TODO(user): Add detailed information on how you would like others to contribute to this project
94
-
95
-
**NOTE:** Run `make help` for more information on all potential `make` targets
96
-
97
-
More information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)
98
-
99
85
## License
100
86
101
87
Copyright 2024.
@@ -111,4 +97,3 @@ distributed under the License is distributed on an "AS IS" BASIS,
111
97
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
112
98
See the License for the specific language governing permissions and
The API7 Ingress Controller is used to manage the API7 Gateway as either a standalone application or a Kubernetes-based application. It dynamically configures and manages the API7 Gateway using Gateway API resources.
In Kubernetes, a Service is a method to expose network applications running on a set of Pods as network services.
14
+
15
+
When proxying ingress traffic, API7 Gateway by default directs traffic directly to the Pods instead of through kube-proxy.
16
+
17
+
### EndpointSlicea
18
+
19
+
EndpointSlice objects represent subsets (slices) of backend network endpoints for a Service.
20
+
21
+
The API7 Ingress Controller continuously tracks matching EndpointSlice objects, and whenever the set of Pods in a Service changes, the set of Pods proxied by the API7 Gateway will also update accordingly.
22
+
23
+
## Gateway API
24
+
25
+
Gateway API is an official Kubernetes project focused on L4 and L7 routing in Kubernetes. This project represents the next generation of Kubernetes Ingress, Load Balancing, and Service Mesh APIs.
26
+
27
+
For more information on supporting Gateway API, please refer to [Gateway API](./gateway-api.md).
The API7 Ingress Controller is a Kubernetes Ingress Controller that implements the Gateway API. This document describes how to configure the API7 Ingress Controller.
4
+
5
+
## Example
6
+
7
+
```yaml
8
+
log_level: "info"# The log level of the API7 Ingress Controller.
9
+
# the default value is "info".
10
+
11
+
controller_name: gateway.api7.io/api7-ingress-controller # The controller name of the API7 Ingress Controller,
12
+
# which is used to identify the controller in the GatewayClass.
13
+
# The default value is "gateway.api7.io/api7-ingress-controller".
14
+
15
+
leader_election_id: "api7-ingress-controller-leader"# The leader election ID for the API7 Ingress Controller.
16
+
# The default value is "api7-ingress-controller-leader".
17
+
18
+
gateway_configs: # The configuration of the API7 Gateway.
19
+
- name: api7 # The name of the Gateway in the Gateway API.
20
+
control_plane:
21
+
admin_key: "${ADMIN_KEY}"# The admin key of the control plane.
22
+
endpoints:
23
+
- ${ENDPOINT}/apisix/admin # The endpoint of the control plane.
24
+
tls_verify: false
25
+
addresses: # record the status address of the gateway-api gateway
26
+
- "172.18.0.4"# The LB IP of the gateway service.
27
+
```
28
+
29
+
### Controller Name
30
+
31
+
The `controller_name` field is used to identify the `controllerName` in the GatewayClass.
Gateway API is dedicated to achieving expressive and scalable Kubernetes service networking through various custom resources.
5
+
6
+
By supporting Gateway API, the API7 Ingress controller can realize richer functions, including Gateway management, multi-cluster support, and other features. It is also possible to manage running instances of the API7 gateway through Gateway API resource management.
7
+
8
+
## Concepts
9
+
10
+
-**GatewayClass**: Defines a set of Gateways that share a common configuration and behavior. Each GatewayClass is handled by a single controller, although controllers may handle more than one GatewayClass.
11
+
-**Gateway**: A resource in Kubernetes that describes how traffic can be translated to services within the cluster.
12
+
-**HTTPRoute**: Can be attached to a Gateway to configure HTTP
13
+
14
+
For more information about Gateway API, please refer to [Gateway API](https://gateway-api.sigs.k8s.io/).
15
+
16
+
## Gateway API Support Level
17
+
18
+
| Resource | Core Support Level | Extended Support Level | Implementation-Specific Support Level | API Version |
| GRPCRoute | Not supported | Not supported | Not supported | v1 |
24
+
| ReferenceGrant | Not supported | Not supported | Not supported | v1beta1 |
25
+
| TLSRoute | Not supported | Not supported | Not supported | v1alpha2 |
26
+
| TCPRoute | Not supported | Not supported | Not supported | v1alpha2 |
27
+
| UDPRoute | Not supported | Not supported | Not supported | v1alpha2 |
28
+
| BackendTLSPolicy | Not supported | Not supported | Not supported | v1alpha3 |
29
+
30
+
## HTTPRoute
31
+
32
+
The HTTPRoute resource allows users to configure HTTP routing by matching HTTP traffic and forwarding it to Kubernetes backends. Currently, the only backend supported by API7 Gateway is the Service resource.
33
+
34
+
### Example
35
+
36
+
The following example demonstrates how to configure an HTTPRoute resource to route traffic to the `httpbin` service:
This quickstart guide will help you get started with API7 Ingress Controller in a few simple steps.
4
+
5
+
## Prerequisites
6
+
7
+
* Kubernetes
8
+
* API7 Dashboard
9
+
* API7 Gateway
10
+
11
+
Please ensure you have deployed the API7 Dashboard control plane.
12
+
13
+
Note: Refer to the [Gateway API Release Changelog](https://github.com/kubernetes-sigs/gateway-api/releases/tag/v1.0.0), it is recommended to use Kubernetes version 1.25+.
0 commit comments