fix(ingress): remove path from ingress host when added EE-5406 (#9099)

* remove path from ingress host when added

* add icon to message
pull/9105/head
Prabhat Khera 2023-06-19 14:11:50 +12:00 committed by GitHub
parent 9f9cdf7d43
commit 223dfe89dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 18 deletions

View File

@ -624,18 +624,11 @@ export function CreateIngressView() {
const newKey = `${namespace}-ingress-${
(ruleCounterByNamespace[namespace] || 0) + 1
}`;
const path: Path = {
Key: uuidv4(),
ServiceName: '',
ServicePort: 0,
Route: '',
PathType: 'Prefix',
};
const host: Host = {
Host: '',
Secret: '',
Paths: [path],
Paths: [],
Key: uuidv4(),
};
@ -653,18 +646,10 @@ export function CreateIngressView() {
function addNewIngressHost(noHost = false) {
const rule = { ...ingressRule };
const path: Path = {
ServiceName: '',
ServicePort: 0,
Route: '',
PathType: 'Prefix',
Key: uuidv4(),
};
const host: Host = {
Host: '',
Secret: '',
Paths: [path],
Paths: [],
NoHost: noHost,
Key: uuidv4(),
};

View File

@ -403,7 +403,8 @@ export function IngressForm({
</div>
{!host.Paths.length && (
<p className="small text-muted mt-4">
<p className="small text-muted vertical-center mt-4 gap-1">
<Icon icon={Info} mode="primary" size="md" />
You may save the ingress without a path and it will then be
an <b>ingress default</b> that a user may select via the
hostname dropdown in Create/Edit application.