1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Add more fields to details panel

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2023-04-06 16:05:22 +03:00
parent 831c1f1d1e
commit 66252f068d
2 changed files with 43 additions and 1 deletions

View File

@ -155,6 +155,10 @@ interface MutatingWebhook {
// needs to run. This should be false when the webhook only applies to resources that have
// the sideEffects field set to None. Defaults to true.
sideEffects?: string;
// reinvocationPolicy indicates whether this webhook should be called multiple times as part of a
// single admission evaluation. Allowed values are "Never" and "IfNeeded"
reinvocationPolicy?: "Never" | "IfNeeded";
}
interface ServiceReference {

View File

@ -22,8 +22,46 @@ export class MutatingWebhookDetails extends React.Component<MutatingWebhookDetai
<DrawerItem name="API version">
{webhookConfig.apiVersion}
</DrawerItem>
<DrawerTitle>Webhooks</DrawerTitle>
{webhookConfig.getWebhooks()?.map((webhook) => (
<React.Fragment key={webhook.name}>
<DrawerItem name="Name">
<strong>{webhook.name}</strong>
</DrawerItem>
<DrawerItem name="Client Config">
{webhook.clientConfig?.service?.name && (
<div>
<div>
Name:
{webhook.clientConfig.service.name}
</div>
<div>
Namespace:
{webhook.clientConfig.service.namespace}
</div>
</div>
)}
</DrawerItem>
<DrawerItem name="Match Policy">
{webhook.matchPolicy}
</DrawerItem>
<DrawerItem name="Failure Policy">
{webhook.failurePolicy}
</DrawerItem>
<DrawerItem name="Admission Review Versions">
{webhook.admissionReviewVersions?.join(", ")}
</DrawerItem>
<DrawerItem name="Reinvocation Policy">
{webhook.reinvocationPolicy}
</DrawerItem>
<DrawerItem name="Side Effects">
{webhook.sideEffects}
</DrawerItem>
<DrawerItem name="Timeout Seconds">
{webhook.timeoutSeconds}
</DrawerItem>
</React.Fragment>
))}
</div >
);
}