Commit Graph
2 Commits
  • refactor(schema): comprehensive validation with enums, patterns, and detailed documentation
    Significantly improve values.schema.json:
    
    - Add enums for all constrained values (pullPolicy, service.type, dnsPolicy,
      deploymentStrategy, ipFamilyPolicy, pathType, persistence.type, accessMode)
    - Add regex patterns for Kubernetes-specific formats (size, CIDR, intervals)
    - Add port range validation (1-65535, nodePort 30000-32767)
    - Add hostname format validation for Ingress/HTTPRoute
    - Add required fields for arrays (env.name, imagePullSecrets.name)
    - Add detailed structure for envFrom, env, imagePullSecrets
    - Add comprehensive descriptions for every field with defaults and examples
    - Add uniqueItems, minItems, maxItems constraints where applicable
    
    Validated against:
    - Invalid size patterns (rejects non-Kubernetes formats)
    - Invalid enums (rejects 'nfs' for persistence.type)
    - Invalid CIDR notation (IPv4/IPv6 regex)
    - Mutual exclusivity (NetworkPolicy vs hostNetwork/DLNA)
    
    Co-Authored-By: Claude <noreply@anthropic.com>
    Signed-off-by: Aleksei Sviridkin <f@lex.la>
  • feat(chart): add JSON Schema with NetworkPolicy/hostNetwork conflict validation
    Add values.schema.json with comprehensive validation for chart values:
    - All core fields with types, defaults, and enums
    - Validation preventing NetworkPolicy + hostNetwork conflicts
    - Validation preventing NetworkPolicy + DLNA conflicts
    
    The schema uses JSON Schema draft-07 with allOf/if-then logic to enforce
    mutual exclusivity: networkPolicy.enabled cannot be true when either
    jellyfin.enableDLNA or podPrivileges.hostNetwork is true.
    
    Validated with check-jsonschema against current values.yaml and
    test cases for both valid and invalid configurations.
    
    Co-Authored-By: Claude <noreply@anthropic.com>
    Signed-off-by: Aleksei Sviridkin <f@lex.la>