Placed interfaces outside of handler
Signed-off-by: Mani Marothu <manikumar.1215@gmail.com>
This commit is contained in:
parent
7b41d63487
commit
eea0bed1d3
1 changed files with 30 additions and 33 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue