Skip to content

Commit

Permalink
Merge pull request #30 from eminaktas/add-ingress-class-name
Browse files Browse the repository at this point in the history
feat(ingress): add ingressClassName attribute in ingress schema
  • Loading branch information
Peefy authored Oct 31, 2024
2 parents 19e0c91 + b216754 commit ed205da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions models/kube/frontend/ingress/ingress.k
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Up @@ -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]
Expand Down

0 comments on commit ed205da

Please sign in to comment.