Add more fields to details panel

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev committed 2023-04-11 15:10:26 +03:00
1 parent 831c1f1d1e
commit 66252f068d
2 files changed
+43 -1

No files matched your search

@@ -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 {
@@ -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 >
);
}