You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/06/20 06:01:03 UTC
[GitHub] [apisix-ingress-controller] dickens7 commented on issue #1086: feature request: ingress annotations support ApisixService
dickens7 commented on issue #1086:
URL: https://github.com/apache/apisix-ingress-controller/issues/1086#issuecomment-1160007376
I thought about it, what I need more should be `ApisixPluginConfig` instead of `ApisixService`
In some simple scenarios that require the use of apisix plugins, it is expected to be able to use Ingress to define routes directly without using ApisixRoute.
The method of Ingress + Annotations is easier for operation and maintenance students to accept and use. At the same time, some management systems also provide visualization functions by reading ingress. Such as zadig.
E.g:
> k8s.apisix.apache.org/plugin-conifg: xxxx
```yaml
apiVersion: apisix.apache.org/v2beta3
kind: ApisixPluginConfig
metadata:
name: xxxx
spec:
plugins:
- name: request-id
enable: true
```
Use Ingress + Cert-manager(annotations) + ApisixPluginConfig
```yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: httpserver-ingress
annotations:
cert-manager.io/cluster-issuer: "letsencrypt"
k8s.apisix.apache.org/plugin-conifg: xxxx
spec:
ingressClassName: apisix
rules:
- host: local.httpbin.org
http:
paths:
- backend:
service:
name: httpbin
port:
number: 80
path: /
pathType: Prefix
tls:
- hosts:
- local.httpbin.org
secretName: ingress-cert-manager-tls
```
Use ApisixRoute + ApisixPluginConfig + ApisixTls + Certificate
```yaml
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: httpserver-tls
spec:
dnsNames:
- local.httpbin.org
issuerRef:
kind: Issuer
name: clusterIssuerName
secretName: httpserver-tls
usages:
- digital signature
- key encipherment
renewBefore: 0h55m0s
duration: 1h0m0s
---
apiVersion: apisix.apache.org/v2beta3
kind: ApisixTls
metadata:
name: httpserver-tls
spec:
hosts:
- local.httpbin.org
secret:
name: httpserver-tls
---
apiVersion: apisix.apache.org/v2beta3
kind: ApisixRoute
metadata:
name: httpserver
spec:
http:
- name: httpserver
match:
hosts:
- local.httpbin.org
paths:
- /
backends:
- serviceName: httpbin
servicePort: 80
plugin_config_name: xxxx
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org