Skip to content

Potential incorrect schema files #142

@CodeReaper

Description

@CodeReaper

There seems to be an issue at least one schema as demonstrated by the two custom resources below. The first one uses schema files from this repository and the second uses the legacy repository, whoever only the one using our schema is reporting issues. Both network policy resources are example resources from Cilium and expected to be correct.

# yaml-language-server: $schema=https://raw.githubusercontent.com/CustomResourceDefinition/catalog/refs/heads/main/schema/cilium.io/ciliumnetworkpolicy_v2.json
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
  name: allow-egress-to-pod
spec:
  endpointSelector: # Property endpointSelector is not allowed.
    matchLabels:
      app: foo
  egress: # Property egress is not allowed.
    - toCIDRSet:
        - cidr: 10.0.2.125/32
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/datreeio/CRDs-catalog/refs/heads/main/cilium.io/ciliumnetworkpolicy_v2.json
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
  name: allow-egress-to-pod
spec:
  endpointSelector:
    matchLabels:
      app: foo
  egress:
    - toCIDRSet:
        - cidr: 10.0.2.125/32

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions