MCPcopy
hub / github.com/hatchet-dev/hatchet / updateResource

Method updateResource

cmd/hatchet-admin/cli/k8s.go:397–415  ·  view source on GitHub ↗
(clientset *kubernetes.Clientset)

Source from the content-addressed store, hash-verified

395}
396
397func (c *configModifier) updateResource(clientset *kubernetes.Clientset) error {
398 if c.Secret != nil {
399 _, err := clientset.CoreV1().Secrets(namespace).Update(context.Background(), c.Secret, metav1.UpdateOptions{})
400
401 if err != nil {
402 return fmt.Errorf("error updating secret: %w", err)
403 }
404 }
405
406 if c.ConfigMap != nil {
407 _, err := clientset.CoreV1().ConfigMaps(namespace).Update(context.Background(), c.ConfigMap, metav1.UpdateOptions{})
408
409 if err != nil {
410 return fmt.Errorf("error updating configmap: %w", err)
411 }
412 }
413
414 return nil
415}

Callers 2

runK8sQuickstartFunction · 0.95
runCreateWorkerTokenFunction · 0.95

Calls 2

ErrorfMethod · 0.80
UpdateMethod · 0.65

Tested by

no test coverage detected