feat: k8s volume mounts
This commit is contained in:
@@ -97,3 +97,55 @@ export const CloudOptionItems = [
|
||||
key: 'volumes'
|
||||
}
|
||||
];
|
||||
|
||||
export const hostTypeOptions = [
|
||||
{
|
||||
label: 'clusters.volume.hostPath.type.directory',
|
||||
locale: true,
|
||||
value: 'Directory'
|
||||
},
|
||||
{
|
||||
label: 'clusters.volume.hostPath.type.directoryOrCreate',
|
||||
locale: true,
|
||||
value: 'DirectoryOrCreate'
|
||||
},
|
||||
{
|
||||
label: 'clusters.volume.hostPath.type.file',
|
||||
locale: true,
|
||||
value: 'File'
|
||||
},
|
||||
{
|
||||
label: 'clusters.volume.hostPath.type.fileOrCreate',
|
||||
locale: true,
|
||||
value: 'FileOrCreate'
|
||||
},
|
||||
{
|
||||
label: 'clusters.volume.hostPath.type.socket',
|
||||
locale: true,
|
||||
value: 'Socket'
|
||||
},
|
||||
{
|
||||
label: 'clusters.volume.hostPath.type.charDevice',
|
||||
locale: true,
|
||||
value: 'CharDevice'
|
||||
},
|
||||
{
|
||||
label: 'clusters.volume.hostPath.type.blockDevice',
|
||||
locale: true,
|
||||
value: 'BlockDevice'
|
||||
}
|
||||
];
|
||||
|
||||
export const sourceTypeOptions = [
|
||||
{
|
||||
label: 'clusters.volume.sourceType.hostPath',
|
||||
locale: true,
|
||||
value: 'hostPath'
|
||||
},
|
||||
{ label: 'clusters.volume.sourceType.pvc', locale: true, value: 'pvc' },
|
||||
{
|
||||
label: 'clusters.volume.sourceType.configMap',
|
||||
locale: true,
|
||||
value: 'configMap'
|
||||
}
|
||||
];
|
||||
|
||||
@@ -48,6 +48,25 @@ export interface NodePoolListItem extends NodePoolFormData {
|
||||
updated_at: string;
|
||||
cluster_id: number;
|
||||
}
|
||||
export interface VolumeMount {
|
||||
name: string;
|
||||
mountPath: string;
|
||||
readOnly: boolean;
|
||||
volumeSource: {
|
||||
hostPath: {
|
||||
path: string;
|
||||
type: string;
|
||||
};
|
||||
persistentVolumeClaim: {
|
||||
claimName: string;
|
||||
readOnly: boolean;
|
||||
};
|
||||
configMap: {
|
||||
name: string;
|
||||
optional: boolean;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export interface ClusterListItem {
|
||||
name: string;
|
||||
@@ -68,6 +87,7 @@ export interface ClusterListItem {
|
||||
state: ClusterStatusType;
|
||||
state_message: string;
|
||||
worker_pools: NodePoolListItem[];
|
||||
k8s_volume_mounts?: VolumeMount[];
|
||||
}
|
||||
|
||||
export interface ClusterFormData {
|
||||
@@ -81,6 +101,7 @@ export interface ClusterFormData {
|
||||
server_url?: string;
|
||||
worker_config?: Record<string, any>;
|
||||
worker_pools?: NodePoolFormData[];
|
||||
k8s_volume_mounts?: VolumeMount[];
|
||||
}
|
||||
|
||||
export interface SystemConfig {
|
||||
|
||||
Reference in New Issue
Block a user