{
  "properties": {
    "apiVersion": {
      "type": "string"
    },
    "kind": {
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "properties": {
        "egress": {
          "items": {
            "properties": {
              "action": {
                "enum": [
                  "Allow",
                  "Deny",
                  "Log",
                  "Pass"
                ],
                "type": "string"
              },
              "destination": {
                "properties": {
                  "namespaceSelector": {
                    "type": "string"
                  },
                  "nets": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array",
                    "x-kubernetes-list-type": "set"
                  },
                  "notNets": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "notPorts": {
                    "items": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "pattern": "^.*",
                      "x-kubernetes-int-or-string": true
                    },
                    "type": "array"
                  },
                  "notSelector": {
                    "type": "string"
                  },
                  "ports": {
                    "items": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "pattern": "^.*",
                      "x-kubernetes-int-or-string": true
                    },
                    "type": "array"
                  },
                  "selector": {
                    "type": "string"
                  },
                  "serviceAccounts": {
                    "properties": {
                      "names": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array",
                        "x-kubernetes-list-type": "set"
                      },
                      "selector": {
                        "type": "string"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  },
                  "services": {
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "namespace": {
                        "type": "string"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "http": {
                "properties": {
                  "methods": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "paths": {
                    "items": {
                      "properties": {
                        "exact": {
                          "type": "string"
                        },
                        "prefix": {
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "additionalProperties": false
                    },
                    "type": "array"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "icmp": {
                "properties": {
                  "code": {
                    "maximum": 255,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "type": {
                    "maximum": 255,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "ipVersion": {
                "enum": [
                  4,
                  6
                ],
                "type": "integer"
              },
              "metadata": {
                "properties": {
                  "annotations": {
                    "additionalProperties": {
                      "type": "string"
                    },
                    "type": "object"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "notICMP": {
                "properties": {
                  "code": {
                    "maximum": 255,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "type": {
                    "maximum": 255,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "notProtocol": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "string"
                  }
                ],
                "pattern": "^.*",
                "x-kubernetes-int-or-string": true
              },
              "protocol": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "string"
                  }
                ],
                "pattern": "^.*",
                "x-kubernetes-int-or-string": true
              },
              "source": {
                "properties": {
                  "namespaceSelector": {
                    "type": "string"
                  },
                  "nets": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array",
                    "x-kubernetes-list-type": "set"
                  },
                  "notNets": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "notPorts": {
                    "items": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "pattern": "^.*",
                      "x-kubernetes-int-or-string": true
                    },
                    "type": "array"
                  },
                  "notSelector": {
                    "type": "string"
                  },
                  "ports": {
                    "items": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "pattern": "^.*",
                      "x-kubernetes-int-or-string": true
                    },
                    "type": "array"
                  },
                  "selector": {
                    "type": "string"
                  },
                  "serviceAccounts": {
                    "properties": {
                      "names": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array",
                        "x-kubernetes-list-type": "set"
                      },
                      "selector": {
                        "type": "string"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  },
                  "services": {
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "namespace": {
                        "type": "string"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  }
                },
                "type": "object",
                "additionalProperties": false
              }
            },
            "required": [
              "action"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "ingress": {
          "items": {
            "properties": {
              "action": {
                "enum": [
                  "Allow",
                  "Deny",
                  "Log",
                  "Pass"
                ],
                "type": "string"
              },
              "destination": {
                "properties": {
                  "namespaceSelector": {
                    "type": "string"
                  },
                  "nets": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array",
                    "x-kubernetes-list-type": "set"
                  },
                  "notNets": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "notPorts": {
                    "items": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "pattern": "^.*",
                      "x-kubernetes-int-or-string": true
                    },
                    "type": "array"
                  },
                  "notSelector": {
                    "type": "string"
                  },
                  "ports": {
                    "items": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "pattern": "^.*",
                      "x-kubernetes-int-or-string": true
                    },
                    "type": "array"
                  },
                  "selector": {
                    "type": "string"
                  },
                  "serviceAccounts": {
                    "properties": {
                      "names": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array",
                        "x-kubernetes-list-type": "set"
                      },
                      "selector": {
                        "type": "string"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  },
                  "services": {
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "namespace": {
                        "type": "string"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "http": {
                "properties": {
                  "methods": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "paths": {
                    "items": {
                      "properties": {
                        "exact": {
                          "type": "string"
                        },
                        "prefix": {
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "additionalProperties": false
                    },
                    "type": "array"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "icmp": {
                "properties": {
                  "code": {
                    "maximum": 255,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "type": {
                    "maximum": 255,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "ipVersion": {
                "enum": [
                  4,
                  6
                ],
                "type": "integer"
              },
              "metadata": {
                "properties": {
                  "annotations": {
                    "additionalProperties": {
                      "type": "string"
                    },
                    "type": "object"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "notICMP": {
                "properties": {
                  "code": {
                    "maximum": 255,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "type": {
                    "maximum": 255,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "notProtocol": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "string"
                  }
                ],
                "pattern": "^.*",
                "x-kubernetes-int-or-string": true
              },
              "protocol": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "string"
                  }
                ],
                "pattern": "^.*",
                "x-kubernetes-int-or-string": true
              },
              "source": {
                "properties": {
                  "namespaceSelector": {
                    "type": "string"
                  },
                  "nets": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array",
                    "x-kubernetes-list-type": "set"
                  },
                  "notNets": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "notPorts": {
                    "items": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "pattern": "^.*",
                      "x-kubernetes-int-or-string": true
                    },
                    "type": "array"
                  },
                  "notSelector": {
                    "type": "string"
                  },
                  "ports": {
                    "items": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "pattern": "^.*",
                      "x-kubernetes-int-or-string": true
                    },
                    "type": "array"
                  },
                  "selector": {
                    "type": "string"
                  },
                  "serviceAccounts": {
                    "properties": {
                      "names": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array",
                        "x-kubernetes-list-type": "set"
                      },
                      "selector": {
                        "type": "string"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  },
                  "services": {
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "namespace": {
                        "type": "string"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  }
                },
                "type": "object",
                "additionalProperties": false
              }
            },
            "required": [
              "action"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "order": {
          "type": "number"
        },
        "performanceHints": {
          "items": {
            "enum": [
              "AssumeNeededOnEveryNode"
            ],
            "type": "string"
          },
          "type": "array"
        },
        "selector": {
          "type": "string"
        },
        "serviceAccountSelector": {
          "type": "string"
        },
        "tier": {
          "default": "default",
          "type": "string"
        },
        "types": {
          "items": {
            "enum": [
              "Ingress",
              "Egress"
            ],
            "type": "string"
          },
          "maxItems": 2,
          "minItems": 1,
          "type": "array",
          "x-kubernetes-list-type": "set"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "required": [
    "metadata",
    "spec"
  ],
  "type": "object"
}
