capsule: admission webhook "ingress.capsule.clastix.io" denied the request: Index with name field:hostnamePathPair does not exist
Bug description
If I create a new Tenant with apiVersion: capsule.clastix.io/v1beta1
and I try to create an Ingress, I get:
Error: admission webhook "ingress.capsule.clastix.io" denied the request: Index with name field:hostnamePathPair does not exist
helm.go:88: [debug] admission webhook "ingress.capsule.clastix.io" denied the request: Index with name field:hostnamePathPair does not exist
The problem does not exist if I create a Tenant with apiVersion: capsule.clastix.io/v1alpha1
How to reproduce
apiVersion: capsule.clastix.io/v1beta1
kind: Tenant
metadata:
name: redacted
spec:
owners:
- name: redacted_sa
kind: User
namespaceOptions:
additionalMetadata:
labels:
project: redacted
quota: 30
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: prod
name: redacted-name
spec:
tls:
- hosts:
- ui.redacted.org
secretName: redacted-tls
rules:
- host: ui.redacted.org
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: redacted-servce-name
port:
number: 80
Expected behavior
An Ingress should be created
Additional context
- Capsule version: 0.1.0
- Helm Chart version: capsule-0.1.0
- Kubernetes version: 1.19.8
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (10 by maintainers)
@prometherion - Just wondering, we’re hitting this issue a lot with not being able to create
apiVersion: networking.k8s.io/v1
ingresses - for our own stuff we’re using v1beta1 as a workaround, but a lot of the newer versions of helm charts we’re using don’t have the option to use v1beta1 and it’s starting to have quite an impact.Just wondering if there’s any estimate on when v0.1.1 will be released - if it’s still far away then we’re going to need to find another solution.
This is absolutely weird but, never mind!
Thanks a lot for your bug report, @nodefourtytwo, we’re planning a v0.1.1 release that will contain this hotfix: we’re not providing any
latest
image so, if you need it ASAP, please, host the resulting build on any of your repositories waiting for the final image.We just tested your PR, and it indeed fixes the problem.
I don’t think it would be because of our Kubernetes version.
If you remember my first message, when we use a Tenant with
apiVersion: capsule.clastix.io/v1alpha1
, we can create an Ingress withapiVersion: networking.k8s.io/v1
. It’s only when we switched to a Tenant withapiVersion: capsule.clastix.io/v1beta1
that we faced the problem.