GitOps for k8s
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

errors.go 1006B

123456789101112131415161718192021222324252627282930313233343536
  1. package kubernetes
  2. import (
  3. "fmt"
  4. fluxerr "github.com/fluxcd/flux/errors"
  5. )
  6. func ObjectMissingError(obj string, err error) *fluxerr.Error {
  7. return &fluxerr.Error{
  8. Type: fluxerr.Missing,
  9. Err: err,
  10. Help: fmt.Sprintf(`Cluster object %q not found
  11. The object requested was not found in the cluster. Check spelling and
  12. perhaps verify its presence using kubectl.
  13. `, obj)}
  14. }
  15. func UpdateNotSupportedError(kind string) *fluxerr.Error {
  16. return &fluxerr.Error{
  17. Type: fluxerr.User,
  18. Err: fmt.Errorf("updating resource kind %q not supported", kind),
  19. Help: `Flux does not support updating ` + kind + ` resources.
  20. This may be because those resources do not use images, you are trying
  21. to use a YAML dot notation path annotation for a non HelmRelease
  22. resource, or because it is a new kind of resource in Kubernetes, and
  23. Flux does not support it yet.
  24. If you can use a Deployment instead, Flux can work with
  25. those. Otherwise, you may have to update the resource manually (e.g.,
  26. using kubectl).
  27. `,
  28. }
  29. }