Skip to content

Commit

Permalink
Proposed solution for issue #732 (#746)
Browse files Browse the repository at this point in the history
  • Loading branch information
garvinmsft committed Mar 20, 2020
1 parent 83af14b commit 9574507
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions proposals/multiple-gateways-single-cluster.md
@@ -0,0 +1,70 @@
# Multiple Gateways Single Cluster

##### Deploying multiple ingress controller instances to the same cluster


### Document Purpose
This document is a proposal to resolve the problem highlighted in [this issue](https://github.com/Azure/application-gateway-kubernetes-ingress/issues/732).

- Authors: [Garvin Casimir](https://github.com/garvinmsft)
- Published: February 25th, 2020
- Status: Open for comments

### Problem Statement
Currently the only way to partition AGIC controllers is via namespacing. Therefore, there is no way to delegate 2 ingress resources in the same namespace to 2 different controllers.

### Proposed Solution
Using the same pattern mentioned [here](https://kubernetes.github.io/ingress-nginx/user-guide/multiple-ingress/#multiple-ingress-nginx-controllers), I propose extending the ingress class annotation to allow users to partition by arbitrary keys.

### Option 1: Allow any arbitrary string
Accept entire ingress class name as a parameter in the helm chart. The danger with this approach is that it leaves the door open for someone to inadvertently enter an ingress class name already being used by a different type of ingress controller.

```bash
helm install ./helm/ingress-azure \
--name ingress-azure \
--ingress-class arbitrary-class
```

```yaml
kind: Ingress
metadata:
name: go-server-ingress-affinity
namespace: test-ag
annotations:
kubernetes.io/ingress.class: arbitrary-class
spec:
rules:
- http:
paths:
- path: /hello/
backend:
serviceName: go-server-service
servicePort: 80
```

### Option 2: Enforce a prefix unique to AGIC
This option is similar to option 1 except the helm parameter is used as a suffix.

```bash
helm install ./helm/ingress-azure \
--name ingress-azure \
--ingress-suffix arbitrary-class
```

```yaml
kind: Ingress
metadata:
name: go-server-ingress-affinity
namespace: test-ag
annotations:
kubernetes.io/ingress.class: agic-arbitrary-class
spec:
rules:
- http:
paths:
- path: /hello/
backend:
serviceName: go-server-service
servicePort: 80
```

3 comments on commit 9574507

@jsco2t
Copy link

@jsco2t jsco2t commented on 9574507 Apr 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @garvinmsft - This looks to be exactly the kind of solution I was looking for in the issue I opened. I was wondering if the proposal had gotten any traction?

I see in the bug report it's now marked as help wanted. I haven't yet had a chance to look at the code to see if it's something I could submit a PR for. If I get time I'll do that. But I also didn't want to duplicate effort if this issue already had a committed/confirmed fix in the works by the Azure team.

Thanks!

@garvinmsft
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jsco2t I also submitted a pull request: #801

@akshaysngupta
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tagged this PR for 1.3.0-rc1.

Please sign in to comment.