Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ingress GA details #1025

Merged
merged 1 commit into from
May 1, 2019
Merged

Add Ingress GA details #1025

merged 1 commit into from
May 1, 2019

Conversation

bowei
Copy link
Member

@bowei bowei commented Apr 30, 2019

Fleshes out some details regarding the issues we wish to tackle in the 1.15+ releases.
Implementation and details are WIP.
This is an initial pass.

@thockin @liggitt @aledbf

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory sig/network Categorizes an issue or PR as relevant to SIG Network. labels Apr 30, 2019
@k8s-ci-robot k8s-ci-robot requested review from dcbw and thockin April 30, 2019 18:32
```

If `Healthcheck` is nil, then the implementation default healthcheck will be
configured, healthchecking the root `/` path. If `Healthcheck` is specfied,
Copy link
Member

Choose a reason for hiding this comment

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

Alternative default behaviour would be to not configure any healthchecking and rely on service controller to keep the list of endpoints up-to-date based on Readiness probe and consider all the endpoints healthy.

Copy link
Member

Choose a reason for hiding this comment

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

some APIs require a healthcheck be defined :(

Copy link
Contributor

@M00nF1sh M00nF1sh May 2, 2019

Choose a reason for hiding this comment

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

I agree with @ElvinEfendi .
We'd better push the service team to remove the mandatory healthCheck requirement.
e.g. For aws ALB, the healthCheck from AWS is mandatory, and i have been pushing the internal team to remove such requirement.

// populated to match the Resource. If both ServiceName and Resource are
// specified, then they must reference the same Service object.
// +optional
Resource v1.TypedLocalObjectReference
Copy link
Member

@aledbf aledbf Apr 30, 2019

Choose a reason for hiding this comment

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

Can we use the same approach in HTTPIngressPath to allow a custom configuration? This would allow exposing features available in the particular implementation removing the ambiguity of annotations.

Copy link
Member

Choose a reason for hiding this comment

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

Do you really want a CRD for path strings?

Also, that doesn't help with the round-trip requirement -- we have to be able to go from v1beta1 -> v1 -> v1beta1 and not lose information

Copy link
Member

Choose a reason for hiding this comment

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

Do you really want a CRD for path strings?

No, I want to remove annotations to configure "things" in the path.

we have to be able to go from v1beta1 -> v1 -> v1beta1 and not lose information

Good point.

| `(abc)` | grouping |

Maintaining a regular expression subset is likely not worth the complexity and
is likely impossible across the [many implementations][regex-survey].
Copy link
Member

Choose a reason for hiding this comment

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

Just for reference kubernetes/ingress-nginx#555

@aledbf
Copy link
Member

aledbf commented Apr 30, 2019

@bowei what about referencing secrets from a different namespace?
This is a common complaint of users with a wildcard SSL certificate that must be manually copied when the ingress for different hostnames is located in different namespaces (cert-manager)

@liggitt
Copy link
Member

liggitt commented Apr 30, 2019

@bowei what about referencing secrets from a different namespace?
This is a common complaint of users with a wildcard SSL certificate that must be manually copied when the ingress for different hostnames is located in different namespaces (cert-manager)

Cross-namespace object references are a non-goal (not just for ingress, but broadly). Future enhancements like named certificates (satisfied by controller-specific methods, such as resolving secrets in an ingress-controller-defined namespace) could address that usability issue.

@aledbf
Copy link
Member

aledbf commented Apr 30, 2019

Cross-namespace object references are a non-goal

Can we put that in the spec?

Copy link
Member

@thockin thockin left a comment

Choose a reason for hiding this comment

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

A bunch of comments on the details of the API, but the KEP seems fine.

Thanks!

/lgtm
/approve

> If `Host` is a wildcard, then request matches the rule if the http host header
> is to equal to the suffix (removing the first label) of the wildcard rule.
> E.g. wildcard "*.foo.com" matches "bar.foo.com" because they share an equal
> suffix "foo.com".
Copy link
Member

Choose a reason for hiding this comment

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

Also make clear that wildcards a re whole-word replacements and must be the first segment.


type IngressBackendHealthcheck struct {
// HTTP defines healthchecks using the HTTP protocol.
HTTP *IngressBackendHTTPHealthcheck
Copy link
Member

Choose a reason for hiding this comment

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

Do we need this indirection? We're already inside the HTTP block, and I don't think we'll realistically support anything but HTTP

// Class references an IngressClass resource in kube-system. This is used
// by the cluster Ingress controllers to determine which controller operates
// on this resource.
Class string
Copy link
Member

Choose a reason for hiding this comment

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

As with all other *Class, we now need to define default behavior if not specified.

We could do like Storage and add an admission controller which sets this to the name of the class that carries a label.

We could ignore it and let the controllers fight it out (e.g. on GCP we could hard-configure gce-ingress as the default via flags, and users could not change that)

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi, I think it's better to change Class to IngressClassName
Which aligns with

}

type IngressClassSpec struct {
// This is currently empty.
Copy link
Member

Choose a reason for hiding this comment

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

Will have to carry the identifier for the controller which implements the class. E.g. Controller string -- and document it as namespaced just like storage provisioners.

Copy link
Contributor

@M00nF1sh M00nF1sh May 2, 2019

Choose a reason for hiding this comment

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

maybe just provisioner string? so we can get consistent naming with StorageClass.
From my pov, 'provisioner' and 'controller' have the same meaning in this context.
Also, is it possible to include Parameters map[string]string as well, so we can have controller specific settings expressed as fields.

One use case could be explicit denote the sharing LB among Ingresses.
e.g. users can provision separate IngressClass for different LB like:

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: alb-lb-a
provisioner: kubernetes.io/aws-alb
parameters:
  lbName: lb-a

all ingresses(across namespace) using this IngressClass with be backed by a single LB called lb-a.

Add a field to the `IngressBackend` struct with an object reference:

```golang
type IngressBackend struct {
Copy link
Member

Choose a reason for hiding this comment

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

I think we'll want to restructure this as something like:

// +union
type IngressBackend struct {
    // +union-discriminator
    Type string

    Service IngressBackendService
    External v1.TypedObjectReference
}

type IngressBackendService struct {
    ServiceName string
    ServicePort intstr.IntOrString
}

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 30, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bowei, thockin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 30, 2019
@bowei bowei changed the title WIP: Update the Ingress KEP with GA items Update the Ingress KEP with GA items May 1, 2019
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 1, 2019
@bowei bowei changed the title Update the Ingress KEP with GA items WIP: Update the Ingress KEP with GA items May 1, 2019
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 1, 2019
@bowei bowei changed the title WIP: Update the Ingress KEP with GA items WIP: May 1, 2019
@bowei bowei changed the title WIP: Add Ingress GA details May 1, 2019
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 1, 2019
@k8s-ci-robot k8s-ci-robot merged commit 5c54c75 into kubernetes:master May 1, 2019
@thockin
Copy link
Member

thockin commented May 1, 2019 via email

@bowei
Copy link
Member Author

bowei commented May 1, 2019

Comment feedback is being integrated into https://github.com/bowei/enhancements/blob/ingress-ga/keps/sig-network/20190125-ingress-api-group.md

If you notice your comment has been resolved, check the link above.

@bowei
Copy link
Member Author

bowei commented May 1, 2019

Yes -- opening a new PR once I sweep through this set of comments.

```golang
type IngressSpec struct {
...
// Class references an IngressClass resource in kube-system. This is used
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this IngressClass should be a cluster scope resource instead of namespaced resource in kube-system

Copy link
Member

Choose a reason for hiding this comment

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

Agree, it should be like storage class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/network Categorizes an issue or PR as relevant to SIG Network. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants