Skipper: Scope Kubernetes Dataclient to a Single Namespace

Created on 21 Jun 2018  路  6Comments  路  Source: zalando/skipper

Hi Guys,

I can see in https://github.com/zalando/skipper/blob/master/dataclients/kubernetes/kube.go#L1100 that Skipper currently uses the cluster-scoped URI for listing ingresses. Is it possible to have a flag that allows switching between the two types of ingress list endpoints?

Cluster scoped: /apis/extensions/v1beta1/ingresses
Namespaced: /apis/extensions/v1beta1/namespaces/{namespace}/ingresses

Perhaps something like -kubernetes-namespace={namespace} that would allow switching between the two types of behaviour?

Cheers,
David

enhancement

Most helpful comment

Added a commit for basic unit-test as well 馃槃

All 6 comments

What is the use case for that?
We have the ownership model via annotation, so what is the advantage of having it per namespace separated?
I am in general fine with that, but the use case should be clear and documented.

Hi @szuecs ,

We have multiple environments separated by namespace (and taints/tolerations for hardware segregation). If, for example, we have development, staging and production namespaces we would have the following ingresses configured: web, api and internal and each of these has an AWS load-balancer. For ease of configuration, we'd like to re-use the same ingress.class values for each, otherwise it's more templating that needs to be done when we deploy into each environments namespace (e.g. using ingress.class: api is better than having to do development-admin, staging-admin and production-admin).

Thoughts?

I've also started writing a PR to add support for it, but my Go unit-testing experience is very limited and it feels bad-form to submit a PR without unit-tests 馃槚

Cheers,
David

Sounds like a good use case.
Can you add this in your pr to the docs/kubernetes/ingress-deployment.md, please? (I hope I remember the filename correctly)

Docs updated in the PR 馃憤

Added a commit for basic unit-test as well 馃槃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

szuecs picture szuecs  路  6Comments

zhen-w picture zhen-w  路  5Comments

davydkov picture davydkov  路  9Comments

slok picture slok  路  4Comments

herojan picture herojan  路  7Comments