fix(api): require inline kubeconfig credentials (#12952)

Co-authored-by: alejandrobailo <alejandrobailo94@gmail.com>
This commit is contained in:
Pedro Martínandalejandrobailo authored and GitHub committed 2026-10-08 18:15:10 +02:00
1 parent 27c4113d29
commit f44ea4b6fa
12 files changed
+664 -72

No files matched your search

@@ -5,8 +5,8 @@ import { Control, useWatch } from "react-hook-form";
import { WizardTextareaField } from "@/components/providers/workflow/forms/fields";
import { KubernetesCredentials } from "@/types";
import {
KUBECONFIG_UNSUPPORTED_COMMAND_AUTHENTICATION_ERROR,
kubeconfigContainsUnsupportedCommandAuthentication,
KUBECONFIG_NON_INLINE_CREDENTIALS_ERROR,
kubeconfigIsInlineOnlyCredentials,
} from "@/types/formSchemas";
export const KubernetesCredentialsForm = ({
@@ -18,8 +18,9 @@ export const KubernetesCredentialsForm = ({
control,
name: "kubeconfig_content",
});
const hasUnsupportedCommandAuthentication =
kubeconfigContainsUnsupportedCommandAuthentication(kubeconfigContent ?? "");
const hasUnsupportedCredentials = !kubeconfigIsInlineOnlyCredentials(
kubeconfigContent ?? "",
);
return (
<>
@@ -41,9 +42,9 @@ export const KubernetesCredentialsForm = ({
minRows={10}
isRequired
/>
{hasUnsupportedCommandAuthentication && (
{hasUnsupportedCredentials && (
<p className="text-text-error-primary text-xs">
{KUBECONFIG_UNSUPPORTED_COMMAND_AUTHENTICATION_ERROR}
{KUBECONFIG_NON_INLINE_CREDENTIALS_ERROR}
</p>
)}
</>