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

feat(ingress): add ingressClassName attribute in ingress schema #30

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions models/kube/frontend/ingress/ingress.k
Original file line number Diff line number Diff line change
@@ -7,6 +7,8 @@ schema Ingress(common.Metadata):

Attributes
----------
ingressClassName: str, default is Undefined, optional.
This field should reference an IngressClass resource specifying the name of the controller that will implement the class. If left unspecified, a default IngressClass will be assigned by the controller if any IngressClass has ingressclass.kubernetes.io/is-default-class set to true.
rules: [networkingv1.IngressRule], default is Undefined, optional
A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.
tls: [networkingv1.IngressTLS], default is Undefined, optional
@@ -39,5 +41,6 @@ schema Ingress(common.Metadata):
]
}
"""
ingressClassName?: str
rules?: [networkingv1.IngressRule]
tls?: [networkingv1.IngressTLS]
1 change: 1 addition & 0 deletions models/kube/mixins/ingress_mixin.k
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ mixin IngressMixin for protocol.ServerProtocol:
name = _s?.name or "{}-{}-{}".format(metadata.__META_APP_NAME, metadata.__META_ENV_TYPE_NAME, _i)
namespace = _s?.namespace or "{}-{}".format(metadata.__META_APP_NAMESPACE, metadata.__META_ENV_TYPE_NAME)
}
spec.ingressClassName = _s?.ingressClassName
spec.rules = _s?.rules
spec.tls = _s?.tls
} for _i, _s in config.ingresses]