mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Remove unused stuff
This commit is contained in:
@@ -23,7 +23,6 @@ export const KubernetesResourceListItemSchema = z.object({
|
|||||||
|
|
||||||
export const KubernetesResourceConnectionDetailsSchema = z.object({
|
export const KubernetesResourceConnectionDetailsSchema = z.object({
|
||||||
url: z.string().url().trim().max(500),
|
url: z.string().url().trim().max(500),
|
||||||
namespace: z.string().trim().max(255),
|
|
||||||
sslRejectUnauthorized: z.boolean(),
|
sslRejectUnauthorized: z.boolean(),
|
||||||
sslCertificate: z
|
sslCertificate: z
|
||||||
.string()
|
.string()
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { z } from "zod";
|
|||||||
|
|
||||||
import { Button, ModalClose } from "@app/components/v2";
|
import { Button, ModalClose } from "@app/components/v2";
|
||||||
import { KubernetesAuthMethod, PamResourceType, TKubernetesResource } from "@app/hooks/api/pam";
|
import { KubernetesAuthMethod, PamResourceType, TKubernetesResource } from "@app/hooks/api/pam";
|
||||||
import { UNCHANGED_PASSWORD_SENTINEL } from "@app/hooks/api/pam/constants";
|
|
||||||
|
|
||||||
import { KubernetesResourceFields } from "./shared/KubernetesResourceFields";
|
import { KubernetesResourceFields } from "./shared/KubernetesResourceFields";
|
||||||
import { GenericResourceFields, genericResourceFieldsSchema } from "./GenericResourceFields";
|
import { GenericResourceFields, genericResourceFieldsSchema } from "./GenericResourceFields";
|
||||||
@@ -16,7 +15,6 @@ type Props = {
|
|||||||
|
|
||||||
const KubernetesConnectionDetailsSchema = z.object({
|
const KubernetesConnectionDetailsSchema = z.object({
|
||||||
url: z.string().url().trim().max(500),
|
url: z.string().url().trim().max(500),
|
||||||
namespace: z.string().trim().max(255),
|
|
||||||
sslRejectUnauthorized: z.boolean(),
|
sslRejectUnauthorized: z.boolean(),
|
||||||
sslCertificate: z.string().trim().max(10000).optional()
|
sslCertificate: z.string().trim().max(10000).optional()
|
||||||
});
|
});
|
||||||
@@ -39,25 +37,14 @@ export const KubernetesResourceForm = ({ resource, onSubmit }: Props) => {
|
|||||||
|
|
||||||
const form = useForm<FormData>({
|
const form = useForm<FormData>({
|
||||||
resolver: zodResolver(formSchema),
|
resolver: zodResolver(formSchema),
|
||||||
defaultValues: resource
|
defaultValues: resource ?? {
|
||||||
? {
|
resourceType: PamResourceType.Kubernetes,
|
||||||
...resource,
|
connectionDetails: {
|
||||||
rotationAccountCredentials: resource.rotationAccountCredentials
|
url: "",
|
||||||
? {
|
sslRejectUnauthorized: true,
|
||||||
...resource.rotationAccountCredentials,
|
sslCertificate: undefined
|
||||||
serviceAccountToken: UNCHANGED_PASSWORD_SENTINEL
|
}
|
||||||
}
|
}
|
||||||
: resource.rotationAccountCredentials
|
|
||||||
}
|
|
||||||
: {
|
|
||||||
resourceType: PamResourceType.Kubernetes,
|
|
||||||
connectionDetails: {
|
|
||||||
url: "",
|
|
||||||
namespace: "default",
|
|
||||||
sslRejectUnauthorized: true,
|
|
||||||
sslCertificate: undefined
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
|||||||
Reference in New Issue
Block a user