1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 23:39:41 +02:00
portainer/app/kubernetes/models/service/models.js
xAt0mZ 1b3e2c8f69
feat(kubernetes): add ingress details (#4013)
* feat(kubernetes): add ingress details

* fix(kubernetes): fix broken ingress generated links + ignore IP retrieval/display info on missing LB ingress ip

* refactor(kubernetes): each ingress rule in apps port mappings has now its own row

* feat(kubernetes): remove protocol column and concat it to container port

* feat(kubernetes): edit display of ingress rules in application details

* feat(kubernetes): minor UI update

Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com>
2020-07-15 08:45:19 +12:00

46 lines
942 B
JavaScript

export const KubernetesServiceHeadlessPrefix = 'headless-';
export const KubernetesServiceHeadlessClusterIP = 'None';
export const KubernetesServiceTypes = Object.freeze({
LOAD_BALANCER: 'LoadBalancer',
NODE_PORT: 'NodePort',
CLUSTER_IP: 'ClusterIP',
});
/**
* KubernetesService Model
*/
const _KubernetesService = Object.freeze({
Headless: false,
Namespace: '',
Name: '',
StackName: '',
Ports: [],
Type: '',
ClusterIP: '',
ApplicationName: '',
ApplicationOwner: '',
Note: '',
});
export class KubernetesService {
constructor() {
Object.assign(this, JSON.parse(JSON.stringify(_KubernetesService)));
}
}
/**
* KubernetesServicePort Model
*/
const _KubernetesServicePort = Object.freeze({
name: '',
port: 0,
targetPort: 0,
protocol: '',
nodePort: 0,
});
export class KubernetesServicePort {
constructor() {
Object.assign(this, JSON.parse(JSON.stringify(_KubernetesServicePort)));
}
}