mirror of
https://github.com/portainer/portainer.git
synced 2025-07-21 06:19:41 +02:00
* feat(kubernetes/pods): introduce patch api * feat(k8s/pods): pod converter * feat(kubernetes/pods): introduce patch api * feat(k8s/pod): add annotations only if needed * fix(k8s/pod): replace class with factory function
45 lines
925 B
JavaScript
45 lines
925 B
JavaScript
import { KubernetesCommonMetadataPayload } from 'Kubernetes/models/common/payloads';
|
|
|
|
export function createPayloadFactory() {
|
|
return {
|
|
metadata: new KubernetesCommonMetadataPayload(),
|
|
spec: {
|
|
replicas: 0,
|
|
selector: {
|
|
matchLabels: {
|
|
app: '',
|
|
},
|
|
},
|
|
strategy: {
|
|
type: 'RollingUpdate',
|
|
rollingUpdate: {
|
|
maxSurge: 0,
|
|
maxUnavailable: '100%',
|
|
},
|
|
},
|
|
template: {
|
|
metadata: {
|
|
labels: {
|
|
app: '',
|
|
},
|
|
},
|
|
spec: {
|
|
affinity: {},
|
|
containers: [
|
|
{
|
|
name: '',
|
|
image: '',
|
|
env: [],
|
|
resources: {
|
|
limits: {},
|
|
requests: {},
|
|
},
|
|
volumeMounts: [],
|
|
},
|
|
],
|
|
volumes: [],
|
|
},
|
|
},
|
|
},
|
|
};
|
|
}
|