1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 15:29:42 +02:00
portainer/app/kubernetes/ingress/models.js
Alice Groux befccacc27
feat(k8s/ingress): create multiple ingress network per kubernetes namespace (#4464)
* feat(k8s/ingress): introduce multiple hosts per ingress

* feat(k8s/ingress): host selector in app create/edit

* feat(k8s/ingress): save empty hosts

* feat(k8s/ingress): fix empty host

* feat(k8s/ingress): rename inputs + ensure hostnames unicity + fix remove hostname and routes

* feat(k8s/ingress): fix duplicates hostname validation

* feat(k8s/application): fix rebase

* feat(k8s/resource-pool): fix error messages for ingress (wip)

* fix(k8s/resource-pool): ingress duplicates detection
2021-04-28 05:51:13 +12:00

36 lines
780 B
JavaScript

export function KubernetesIngress() {
return {
Name: '',
Namespace: '',
Annotations: {},
// Host: undefined,
Hosts: [],
// PreviousHost: undefined, // only use for RP ingress host edit
Paths: [],
IngressClassName: '',
};
}
// TODO: refactor @LP
// rename this model to KubernetesIngressPath (and all it's references)
// as it's conceptually not an ingress rule (element of ingress.spec.rules)
// but a path (element of ingress.spec.rules[].paths)
export function KubernetesIngressRule() {
return {
IngressName: '',
ServiceName: '',
Host: '',
IP: '',
Port: '',
Path: '',
};
}
export function KubernetesIngressClass() {
return {
Name: '',
Type: undefined,
NeedsDeletion: false,
IsNew: true,
};
}