Use config schema inline instead
Signed-off-by: Marcus Eide <eide@spotify.com>
This commit is contained in:
+33
-4
@@ -14,14 +14,43 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ClusterLocatorMethod, CustomResource } from './src/types';
|
||||
|
||||
export interface Config {
|
||||
kubernetes?: {
|
||||
serviceLocatorMethod: {
|
||||
type: 'multiTenant';
|
||||
};
|
||||
clusterLocatorMethods: ClusterLocatorMethod[];
|
||||
customResources?: CustomResource[];
|
||||
clusterLocatorMethods: Array<
|
||||
| {
|
||||
/** @visibility frontend */
|
||||
type: 'gke';
|
||||
/** @visibility frontend */
|
||||
projectId: string;
|
||||
/** @visibility frontend */
|
||||
region?: string;
|
||||
/** @visibility frontend */
|
||||
skipTLSVerify?: boolean;
|
||||
}
|
||||
| {
|
||||
/** @visibility frontend */
|
||||
type: 'config';
|
||||
clusters: Array<{
|
||||
/** @visibility frontend */
|
||||
url: string;
|
||||
/** @visibility frontend */
|
||||
name: string;
|
||||
/** @visibility secret */
|
||||
serviceAccountToken?: string;
|
||||
/** @visibility frontend */
|
||||
authProvider: 'aws' | 'google' | 'serviceAccount';
|
||||
/** @visibility frontend */
|
||||
skipTLSVerify?: boolean;
|
||||
}>;
|
||||
}
|
||||
>;
|
||||
customResources?: Array<{
|
||||
group: string;
|
||||
apiVersion: string;
|
||||
plural: string;
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -19,50 +19,6 @@ import type {
|
||||
KubernetesFetchError,
|
||||
} from '@backstage/plugin-kubernetes-common';
|
||||
|
||||
export type ClusterLocatorMethod =
|
||||
| ConfigClusterLocatorMethod
|
||||
| GKEClusterLocatorMethod;
|
||||
|
||||
export interface ConfigClusterLocatorMethod {
|
||||
/**
|
||||
* @visibility frontend
|
||||
*/
|
||||
type: 'config';
|
||||
clusters: {
|
||||
/**
|
||||
* @visibility frontend
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* @visibility frontend
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* @visibility secret
|
||||
*/
|
||||
serviceAccountToken: string | undefined;
|
||||
/**
|
||||
* @visibility frontend
|
||||
*/
|
||||
authProvider: 'aws' | 'google' | 'serviceAccount';
|
||||
}[];
|
||||
}
|
||||
|
||||
export interface GKEClusterLocatorMethod {
|
||||
/**
|
||||
* @visibility frontend
|
||||
*/
|
||||
type: 'gke';
|
||||
/**
|
||||
* @visibility frontend
|
||||
*/
|
||||
projectId: string;
|
||||
/**
|
||||
* @visibility frontend
|
||||
*/
|
||||
region?: string;
|
||||
}
|
||||
|
||||
export interface CustomResource {
|
||||
group: string;
|
||||
apiVersion: string;
|
||||
|
||||
Reference in New Issue
Block a user