Placed interfaces outside of handler

Signed-off-by: Mani Marothu <manikumar.1215@gmail.com>
This commit is contained in:
Mani Marothu 2024-09-04 10:21:24 -07:00
parent 7b41d63487
commit eea0bed1d3

View file

@ -8,40 +8,37 @@ import { Config } from '@backstage/config';
import { resolveSafeChildPath } from '@backstage/backend-common';
import fs from 'fs-extra';
interface Cluster {
name: string;
cluster: {
"server": string;
"insecure-skip-tls-verify": boolean;
"certificate-authority-data"?: string;
"certificate-authority"?: string;
};
}
interface Context {
name: string;
context: {
cluster: string;
user: string;
};
}
interface User {
name: string;
user: {
token?: string;
};
}
interface ConfFile {
apiVersion: string;
kind: string;
'current-context': string;
contexts: Context[];
clusters: Cluster[];
users: User[];
}
export const createKubernetesApply = (config: Config) => {
interface Cluster {
name: string;
cluster: {
"server": string;
"insecure-skip-tls-verify": boolean;
"certificate-authority-data"?: string;
"certificate-authority"?: string;
};
};
interface Context {
name: string;
context: {
cluster: string;
user: string;
};
}
interface User {
name: string;
user: {
token?: string;
};
}
interface ConfFile {
apiVersion: string;
kind: string;
'current-context': string;
contexts: Context[];
clusters: Cluster[];
users: User[];
}
return createTemplateAction<{
manifestString?: string;
manifestObject?: any;