1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 13:29:41 +02:00
portainer/app/kubernetes/models/application/models/index.js
Maxime Bajeux 00389a7da9
feat(k8s/application): Support multi-container pods applications (#4208)
* feat(application): Support multi-container pods applications

* feat(application): Support multi-container pods applications

* fix(application): use only one pod in app details and fix logs and console links

* fix(application): show all containers in containers datatable

* fix(application): fix order by pod name

* feat(k8s/application): minor UI update

* feat(k8s/application): minor UI update

* feat(k8s/application): minor UI update

* feat(k8s/application): minor UI update

* feat(k8s/application): minor UI update

* fix(application): fix persisted folders in application details

Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com>
2020-08-14 11:27:10 +12:00

93 lines
2.4 KiB
JavaScript

export * from './constants';
/**
* KubernetesApplication Model (Composite)
*/
const _KubernetesApplication = Object.freeze({
Id: '',
Name: '',
StackName: '',
ApplicationOwner: '',
ApplicationName: '',
ResourcePool: '',
Image: '',
CreationDate: 0,
Pods: [],
Containers: [],
Limits: {},
ServiceType: '',
ServiceId: '',
ServiceName: '',
HeadlessServiceName: undefined, // only used for StatefulSet
LoadBalancerIPAddress: undefined, // only filled when bound service is LoadBalancer and state is available
PublishedPorts: [],
Volumes: [],
Env: [],
PersistedFolders: [], // KubernetesApplicationPersistedFolder list
ConfigurationVolumes: [], // KubernetesApplicationConfigurationVolume list
DeploymentType: 'Unknown',
DataAccessPolicy: 'Unknown',
ApplicationType: 'Unknown',
RunningPodsCount: 0,
TotalPodsCount: 0,
Yaml: '',
Note: '',
Revisions: undefined,
CurrentRevision: undefined,
Raw: undefined, // only filled when inspecting app details / create / edit view (never filled in multiple-apps views)
AutoScaler: undefined, // only filled if the application has an HorizontalPodAutoScaler bound to it
});
export class KubernetesApplication {
constructor() {
Object.assign(this, JSON.parse(JSON.stringify(_KubernetesApplication)));
}
}
/**
* KubernetesApplicationPersistedFolder Model
*/
const _KubernetesApplicationPersistedFolder = Object.freeze({
MountPath: '',
PersistentVolumeClaimName: '',
HostPath: '',
});
export class KubernetesApplicationPersistedFolder {
constructor() {
Object.assign(this, JSON.parse(JSON.stringify(_KubernetesApplicationPersistedFolder)));
}
}
/**
* KubernetesApplicationConfigurationVolume Model
*/
const _KubernetesApplicationConfigurationVolume = Object.freeze({
fileMountPath: '',
rootMountPath: '',
configurationKey: '',
configurationName: '',
});
export class KubernetesApplicationConfigurationVolume {
constructor() {
Object.assign(this, JSON.parse(JSON.stringify(_KubernetesApplicationConfigurationVolume)));
}
}
/**
* KubernetesApplicationPort Model
*/
const _KubernetesApplicationPort = Object.freeze({
IngressRules: [], // KubernetesIngressRule[]
NodePort: 0,
TargetPort: 0,
Port: 0,
Protocol: '',
});
export class KubernetesApplicationPort {
constructor() {
Object.assign(this, JSON.parse(JSON.stringify(_KubernetesApplicationPort)));
}
}