Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Adding an experimental multicluster ingress API #212

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nikhiljindal
Copy link
Contributor

@nikhiljindal nikhiljindal commented Dec 4, 2018

First stab at defining a MultiClusterIngress API.

There are 2 high level resources here: MultiClusterIngress and MultiClusterService.

Key differences with the current CLI model:

  • MultiClusterService can be used to create the required service in appropriate multiple clusters (based on a cluster selector). With the existing CLI model, users have to create the required service in all clusters.
  • MultiClusterIngress does not create Ingress resource in target clusters. Only services are created in target clusters (via MultiClusterService). This is different than CLI which creates Ingress resource in all target clusters.

Advantages:

  • Users dont have to create Services in target clusters. This can now be done automatically.
  • Since cluster selection can now be done with service instead of ingress, different paths on the same MultiClusterIngress can route traffic to different set of multiple clusters. For example, /foo can route traffic to clusters A and B and /bar can route traffic to clusters B and C for a single MultiClusterIngress.
  • Be able to front Services with MultiClusterIngress without having to expose the Service directly with an external public IP or DNS record.

This is still Work in Progress (WIP). Sharing the API definition early to get reviews. Please review and add comments.

@nikhiljindal
Copy link
Contributor Author

@k8s-ci-robot
Copy link

@nikhiljindal: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-multicluster-ingress-test 1c931da link /test pull-kubernetes-multicluster-ingress-test

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Copy link

@shashidharatd shashidharatd left a comment

Choose a reason for hiding this comment

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

@nikhiljindal, few generic questions here.

  1. What is the correlation between MultiClusterIngress and a MultiClusterService? How they are linked.
  2. Can the API be reusable in hybrid environment or a non-gke environment?

// MultiClusterIngressStatus is the status of a MultiClusterIngress.
type MultiClusterIngressStatus struct {
// VIP is the virtual IP address of the load balancer.
VIP string

Choose a reason for hiding this comment

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

  1. Can VIP be an array?
  2. Is it possible that Service created in multiple clusters have provisioned a loadbalancers with different IP. How that can be handled or avoided?

VIP string
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

Choose a reason for hiding this comment

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

I'm new so please forgive me if this is off-base, but it seems to me that this and similar on line 96 are causing linting to fail.

./experimental/pkg/apis/mci/v1alpha1/types.go:52:1: comment on exported type MultiClusterIngressList should be of the form "MultiClusterIngressList ..." (with optional leading article)

https://gubernator.k8s.io/build/kubernetes-jenkins/pr-logs/pull/GoogleCloudPlatform_k8s-multicluster-ingress/212/pull-kubernetes-multicluster-ingress-test/275/

// MultiClusterServiceStatus is the status of a MultiClusterService.
type MultiClusterServiceStatus struct{}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

Choose a reason for hiding this comment

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

As with line 52, it seems to me that this is causing linting to fail.

./experimental/pkg/apis/mci/v1alpha1/types.go:96:1: comment on exported type MultiClusterServiceList should be of the form "MultiClusterServiceList ..." (with optional leading article)

https://gubernator.k8s.io/build/kubernetes-jenkins/pr-logs/pull/GoogleCloudPlatform_k8s-multicluster-ingress/212/pull-kubernetes-multicluster-ingress-test/275/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants