knative / knative/serving

Do not allow to override kingress's ingress.class via ksvc's annotation

Open
#14,037 7 comments 0 reactions 0 assignees View on GitHub
area/API area/networking kind/feature triage/accepted
Dominant language
Go
Stars
6.1k
Forks
1.2k
Avg merge
2d 7h
Merged PRs (30d)
2

Description

## In what area(s)?

/area API
/area networking

## Describe the feature

Currently `ingress.class` in Kingress is overriden via annotation as the following steps:

### 1. Add ingress-class annotating to ksvc

```
$ oc annotate ksvc hello-example networking.knative.dev/ingress-class=foo
```
or
```
$ oc annotate ksvc hello-example networking.knative.dev/ingress.class=foo
```

### 2. the annotation in Kingress is overriden.

```
$ kubectl get king -o yaml |grep ingress.class
networking.knative.dev/ingress.class: foo
```

This causes a problem - for example, a managed service supports Kourier only (users cannot modify `config-network`) but they try to customize it via annotation and cause a problem.
Hence, we would like to disallow to override the annotation. i.e. do not propagate the ingress class annotation into kingress from ksvc's annotation.

### Side question

Is there use-case for the annotation override? If somebody uses multiple Ingress on the same cluster, we should not change this...

Contributor guide

Open the contributing guide

Research direction

Start by tracing how the ksvc ingress-class annotations reach Kingress, focusing on the Kingress and ksvc paths described in the issue. Confirm the expected behavior for both annotation names and the config-network setting, then verify that the ingress class is no longer propagated from ksvc annotations without changing supported multi-ingress use cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.