MCPcopy Index your code
hub / github.com/1Panel-dev/KubePi / updateWorkLoad

Function updateWorkLoad

web/dashboard/src/api/workloads.js:143–165  ·  view source on GitHub ↗
(cluster_name, type, namespace, name, data)

Source from the content-addressed store, hash-verified

141}
142
143export function updateWorkLoad (cluster_name, type, namespace, name, data) {
144 switch (type) {
145 case "deployments":
146 case "statefulsets":
147 case "daemonsets":
148 return put(
149 `${appsV1UrlWithNsUrl(cluster_name, type, namespace)}/${name}`,
150 data
151 )
152 case "cronjobs":
153 return put(
154 `${batchV1WithNsUrl(cluster_name, type, namespace)}/${name}`,
155 data
156 )
157 case "pods":
158 return put(`${apiV1UrlWithNsUrl(cluster_name, type, namespace)}/${name}`)
159 case "jobs":
160 return put(
161 `${batchV1WithNsUrl(cluster_name, type, namespace)}/${name}`,
162 data
163 )
164 }
165}

Callers

nothing calls this directly

Calls 4

putFunction · 0.90
appsV1UrlWithNsUrlFunction · 0.85
batchV1WithNsUrlFunction · 0.85
apiV1UrlWithNsUrlFunction · 0.85

Tested by

no test coverage detected