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

New ingress converter and haproxy types (part 3) #339

Merged
merged 31 commits into from
Jun 24, 2019

Conversation

jcmoraisjr
Copy link
Owner

@jcmoraisjr jcmoraisjr commented May 12, 2019

Missing pieces between parsing ingress resources and reload HAProxy instance.

  • Wildcard and regex hostnames
  • Parsing all frontend annotations
  • Parsing most of the backend annotations
  • DrainSupport
  • Other k8s service implementations: named port and external name
  • Some converters and haproxy unit tests

Some missing pieces to the next part:

  • Dynamic reload
  • Some global implementations like DrainSupport and Nbproc
  • TCP services
  • Binds (ip/port of frontends)
  • https backend
  • API docs

Related with #289 #295

Implements #274

Check in an earlier stage if some tls-auth check is needed, skipping some lookup in maps whenever possible.
Frontends, servers and sockets with only one hostname used the hostname as part of the name. This is an exception use case and would fail if a special char is used, eg on wildcard hostnames.
There are some common operations regarding hostnames and paths, eg iterate in order to create the files on disk and check if the hostname is wildcard or has a regex. Moving them to an object will help to implement such common tasks
HTTP redirect is always configured on HTTP frontend, so removing var and template checks
Rewrite now happens in a different way when compared with v0.7. reqrep was moved to the backend and the same backend can be the target of more than one host/path_beg combination.

The problem happens when different path_beg (ingress->spec->rules[]->http->paths[]->path) uses rewrite-target - and rewrite-target needs the configured path. The current approach is to sort all used paths in reverse order in order to avoid overlaps - eg an /app path before an /app/sub would match an /app/sub/dir request. All reqrep will happen in that order and should avoid that a wrong rewrite happens.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant