fatedier/frp · error

annotation key %s is invalid: %s

Error message

annotation key %s is invalid: %s

What it means

Error "annotation key %s is invalid: %s" thrown in fatedier/frp.

Source

Thrown at pkg/config/v1/validation/proxy.go:252

func validateXTCPProxyConfigForServer(c *v1.XTCPProxyConfig, s *v1.ServerConfig) error {
	return nil
}

func validateSUDPProxyConfigForServer(c *v1.SUDPProxyConfig, s *v1.ServerConfig) error {
	return nil
}

// ValidateAnnotations validates that a set of annotations are correctly defined.
func ValidateAnnotations(annotations map[string]string) error {
	if len(annotations) == 0 {
		return nil
	}

	var errs error
	for k := range annotations {
		for _, msg := range validation.IsQualifiedName(strings.ToLower(k)) {
			errs = AppendError(errs, fmt.Errorf("annotation key %s is invalid: %s", k, msg))
		}
	}
	if err := ValidateAnnotationsSize(annotations); err != nil {
		errs = AppendError(errs, err)
	}
	return errs
}

const TotalAnnotationSizeLimitB int = 256 * (1 << 10) // 256 kB

func ValidateAnnotationsSize(annotations map[string]string) error {
	var totalSize int64
	for k, v := range annotations {
		totalSize += (int64)(len(k)) + (int64)(len(v))
	}
	if totalSize > (int64)(TotalAnnotationSizeLimitB) {
		return fmt.Errorf("annotations size %d is larger than limit %d", totalSize, TotalAnnotationSizeLimitB)
	}

View on GitHub (pinned to 6c8a8d0a97)

Solutions

  1. Rename the annotation key so it is a valid qualified name: lowercase letters, digits, '-', '_', '.', with an optional DNS-prefix and '/'.
  2. Apply the rule reported after the colon in the error message to correct the key.

When it happens

Trigger: Raised by ValidateAnnotations in pkg/config/v1/validation/proxy.go when an annotation key fails validation against the allowed key format.

Common situations: An annotation key contains disallowed characters or exceeds the allowed length/format. Fix by renaming the annotation key to match the valid format reported in the error.


AI-assisted analysis of fatedier/frp@6c8a8d0a97 (2026-08-15). Data as JSON: /api/errors/93586cdd6dfe35f1. Report an issue: GitHub.