{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "properties": {
    "apiVersion": {
      "type": "string"
    },
    "kind": {
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "properties": {
        "egress": {
          "items": {
            "properties": {
              "ports": {
                "items": {
                  "properties": {
                    "endPort": {
                      "format": "int32",
                      "type": "integer"
                    },
                    "port": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "x-kubernetes-int-or-string": true
                    },
                    "protocol": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": "array",
                "x-kubernetes-list-type": "atomic"
              },
              "to": {
                "items": {
                  "properties": {
                    "ipBlock": {
                      "properties": {
                        "cidr": {
                          "type": "string"
                        },
                        "except": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array",
                          "x-kubernetes-list-type": "atomic"
                        }
                      },
                      "required": [
                        "cidr"
                      ],
                      "type": "object"
                    },
                    "namespaceSelector": {
                      "properties": {
                        "matchExpressions": {
                          "items": {
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "operator": {
                                "type": "string"
                              },
                              "values": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array",
                                "x-kubernetes-list-type": "atomic"
                              }
                            },
                            "required": [
                              "key",
                              "operator"
                            ],
                            "type": "object"
                          },
                          "type": "array",
                          "x-kubernetes-list-type": "atomic"
                        },
                        "matchLabels": {
                          "additionalProperties": {
                            "type": "string"
                          },
                          "type": "object"
                        }
                      },
                      "type": "object",
                      "x-kubernetes-map-type": "atomic"
                    },
                    "podSelector": {
                      "properties": {
                        "matchExpressions": {
                          "items": {
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "operator": {
                                "type": "string"
                              },
                              "values": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array",
                                "x-kubernetes-list-type": "atomic"
                              }
                            },
                            "required": [
                              "key",
                              "operator"
                            ],
                            "type": "object"
                          },
                          "type": "array",
                          "x-kubernetes-list-type": "atomic"
                        },
                        "matchLabels": {
                          "additionalProperties": {
                            "type": "string"
                          },
                          "type": "object"
                        }
                      },
                      "type": "object",
                      "x-kubernetes-map-type": "atomic"
                    }
                  },
                  "type": "object"
                },
                "type": "array",
                "x-kubernetes-list-type": "atomic"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "ingress": {
          "items": {
            "properties": {
              "from": {
                "items": {
                  "properties": {
                    "ipBlock": {
                      "properties": {
                        "cidr": {
                          "type": "string"
                        },
                        "except": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array",
                          "x-kubernetes-list-type": "atomic"
                        }
                      },
                      "required": [
                        "cidr"
                      ],
                      "type": "object"
                    },
                    "namespaceSelector": {
                      "properties": {
                        "matchExpressions": {
                          "items": {
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "operator": {
                                "type": "string"
                              },
                              "values": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array",
                                "x-kubernetes-list-type": "atomic"
                              }
                            },
                            "required": [
                              "key",
                              "operator"
                            ],
                            "type": "object"
                          },
                          "type": "array",
                          "x-kubernetes-list-type": "atomic"
                        },
                        "matchLabels": {
                          "additionalProperties": {
                            "type": "string"
                          },
                          "type": "object"
                        }
                      },
                      "type": "object",
                      "x-kubernetes-map-type": "atomic"
                    },
                    "podSelector": {
                      "properties": {
                        "matchExpressions": {
                          "items": {
                            "properties": {
                              "key": {
                                "type": "string"
                              },
                              "operator": {
                                "type": "string"
                              },
                              "values": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array",
                                "x-kubernetes-list-type": "atomic"
                              }
                            },
                            "required": [
                              "key",
                              "operator"
                            ],
                            "type": "object"
                          },
                          "type": "array",
                          "x-kubernetes-list-type": "atomic"
                        },
                        "matchLabels": {
                          "additionalProperties": {
                            "type": "string"
                          },
                          "type": "object"
                        }
                      },
                      "type": "object",
                      "x-kubernetes-map-type": "atomic"
                    }
                  },
                  "type": "object"
                },
                "type": "array",
                "x-kubernetes-list-type": "atomic"
              },
              "ports": {
                "items": {
                  "properties": {
                    "endPort": {
                      "format": "int32",
                      "type": "integer"
                    },
                    "port": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "x-kubernetes-int-or-string": true
                    },
                    "protocol": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "type": "array",
                "x-kubernetes-list-type": "atomic"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "podSelector": {
          "properties": {
            "matchExpressions": {
              "items": {
                "properties": {
                  "key": {
                    "type": "string"
                  },
                  "operator": {
                    "type": "string"
                  },
                  "values": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array",
                    "x-kubernetes-list-type": "atomic"
                  }
                },
                "required": [
                  "key",
                  "operator"
                ],
                "type": "object"
              },
              "type": "array",
              "x-kubernetes-list-type": "atomic"
            },
            "matchLabels": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            }
          },
          "type": "object",
          "x-kubernetes-map-type": "atomic"
        },
        "policyTypes": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "stagedAction": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}
