Add IngressClass resource and update references to spec.ingressClassName across templates, examples, and documentation for consistency and backward compatibility
- Introduced new IngressClass resource in Helm templates to define `easyhaproxy` as the default ingress class. - Updated Kubernetes examples to replace `easyhaproxy-ingress` with `easyhaproxy` as the ingress class name. - Enhanced processor logic to support both the new `spec.ingressClassName` field and the deprecated `kubernetes.io/ingress.class` annotation. - Revised documentation to reflect the changes and ensure alignment with Kubernetes recommendations.
This commit is contained in:
parent
e8aceda402
commit
c8f8320cfe
15 changed files with 205 additions and 72 deletions
|
|
@ -241,16 +241,21 @@ class Kubernetes(ProcessorInterface):
|
|||
for ingress in ret.items:
|
||||
# Support both new spec.ingressClassName and deprecated annotation for backward compatibility
|
||||
ingress_class = None
|
||||
is_match = False
|
||||
|
||||
# Check new spec.ingressClassName first (preferred)
|
||||
if hasattr(ingress.spec, 'ingress_class_name') and ingress.spec.ingress_class_name is not None:
|
||||
ingress_class = ingress.spec.ingress_class_name
|
||||
# Modern spec uses 'easyhaproxy'
|
||||
is_match = (ingress_class == "easyhaproxy")
|
||||
# Fall back to deprecated annotation
|
||||
elif ingress.metadata.annotations and 'kubernetes.io/ingress.class' in ingress.metadata.annotations:
|
||||
ingress_class = ingress.metadata.annotations['kubernetes.io/ingress.class']
|
||||
# Deprecated annotation uses 'easyhaproxy-ingress' for backward compatibility
|
||||
is_match = (ingress_class == "easyhaproxy-ingress")
|
||||
|
||||
# Skip if no ingress class is defined or it doesn't match
|
||||
if ingress_class != "easyhaproxy-ingress":
|
||||
if not is_match:
|
||||
continue
|
||||
|
||||
ssl_hosts = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue