You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/kubernetes/models/volume/models.js

41 lines
1.0 KiB

import uuidv4 from 'uuid/v4';
/**
* KubernetesPersistentVolumeClaim Model
*/
const _KubernetesPersistentVolumeClaim = Object.freeze({
Id: '',
Name: '',
PreviousName: '',
Namespace: '',
Storage: 0,
storageClass: {}, // KubernetesStorageClass
CreationDate: '',
ApplicationOwner: '',
AccessModes: [],
ApplicationName: '',
MountPath: '', // used for Application creation from ApplicationFormValues | not used from API conversion
Yaml: '',
});
export class KubernetesPersistentVolumeClaim {
constructor() {
Object.assign(this, JSON.parse(JSON.stringify(_KubernetesPersistentVolumeClaim)));
this.Name = uuidv4();
}
}
/**
* KubernetesVolume Model (Composite)
*/
const _KubernetesVolume = Object.freeze({
ResourcePool: {}, // KubernetesResourcePool
PersistentVolumeClaim: {}, // KubernetesPersistentVolumeClaim
Applications: [], // KubernetesApplication
});
export class KubernetesVolume {
constructor() {
Object.assign(this, JSON.parse(JSON.stringify(_KubernetesVolume)));
}
}