bitnami / kube-libsonnet

Bitnami's jsonnet library for building Kubernetes manifests
https://bitnami.com
Apache License 2.0
174 stars 50 forks source link

Allow specifying Ingress rules with http.paths with no path. #54

Closed parabolala closed 3 years ago

parabolala commented 3 years ago

These can be rules that map different hostnames to backends, where each backend handles all paths, so has no path field. For example:

spec:
  rules:
  - host: a.example.com
    http:
      paths:
      - backend:
          serviceName: service-a
          servicePort: web
  - host: b.example.com
    http:
      paths:
      - backend:
          serviceName: service-b
          servicePort: web

Currently this fails with:

RUNTIME ERROR: Field does not exist: path
    kube-libsonnet/kube.libsonnet:588:26-32 thunk from <object <anonymous>>
jjo commented 3 years ago

@xa4a : Thanks for fixing, looks great -- mind adding some tests for this case? I'd be matter of just adding a new field for it to tests/test-simple-validate.pass.jsonnet

parabolala commented 3 years ago

Is there anything blocking this PR from being merged?

parabolala commented 3 years ago

Looks like I still need an approval from @dbarranco

jjo commented 3 years ago

wohhOO thanks @dbarranco :hugs: