Skip to content

Commit

Permalink
add egressfirewall API spec documentation
Browse files Browse the repository at this point in the history
the API reference documentation was generated by using this project
https://github.com/elastic/crd-ref-docs/. The config that was used to
generate the API is

$ go install github.com/elastic/crd-ref-docs@latest
$ ~/gowork/bin/crd-ref-docs \
  --source-path=~/gowork/src/githubcom/ovn-org/ovn-kubernetes/\
  go-controller/pkg/crd/egressfirewall/ \
  --config=crd-docs-config.yaml --renderer=markdown \
  --output-path=./docs/developer-guide/egress-firewall-api-spec.md

Signed-off-by: Girish Moodalbail <[email protected]>
  • Loading branch information
girishmg committed May 7, 2024
1 parent 9bf6a48 commit 4378caf
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crd-docs-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
processor:
ignoreTypes:
- "(EgressIP|EgressQoS|EgressFirewall|EgressService|AdminPolicyBasedExternalRoute)List$"
ignoreFields:
- "TypeMeta$"

render:
kubernetesVersion: 1.28
Empty file removed docs/developer-guide/api-spec.md
Empty file.
116 changes: 116 additions & 0 deletions docs/developer-guide/egress-firewall-api-spec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# API Reference

## Packages
- [k8s.ovn.org/v1](#k8sovnorgv1)


## k8s.ovn.org/v1

Package v1 contains API Schema definitions for the network v1 API group





#### EgressFirewallDestination



EgressFirewallDestination is the target that traffic is either allowed or denied to

_Validation:_
- MaxProperties: 1
- MinProperties: 1

_Appears in:_
- [EgressFirewallRule](#egressfirewallrule)

| Field | Description | Default | Validation |
| --- | --- | --- | --- |
| `cidrSelector` _string_ | cidrSelector is the CIDR range to allow/deny traffic to. If this is set, dnsName and nodeSelector must be unset. | | |
| `dnsName` _string_ | dnsName is the domain name to allow/deny traffic to. If this is set, cidrSelector and nodeSelector must be unset. | | Pattern: `^([A-Za-z0-9-]+\.)*[A-Za-z0-9-]+\.?$` <br /> |
| `nodeSelector` _[LabelSelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#labelselector-v1-meta)_ | nodeSelector will allow/deny traffic to the Kubernetes node IP of selected nodes. If this is set,<br />cidrSelector and DNSName must be unset. | | |


#### EgressFirewallPort



EgressFirewallPort specifies the port to allow or deny traffic to



_Appears in:_
- [EgressFirewallRule](#egressfirewallrule)

| Field | Description | Default | Validation |
| --- | --- | --- | --- |
| `protocol` _string_ | protocol (tcp, udp, sctp) that the traffic must match. | | Pattern: `^TCP|UDP|SCTP$` <br /> |
| `port` _integer_ | port that the traffic must match | | Maximum: 65535 <br />Minimum: 1 <br /> |


#### EgressFirewallRule



EgressFirewallRule is a single egressfirewall rule object



_Appears in:_
- [EgressFirewallSpec](#egressfirewallspec)

| Field | Description | Default | Validation |
| --- | --- | --- | --- |
| `type` _[EgressFirewallRuleType](#egressfirewallruletype)_ | type marks this as an "Allow" or "Deny" rule | | Pattern: `^Allow|Deny$` <br /> |
| `ports` _[EgressFirewallPort](#egressfirewallport) array_ | ports specify what ports and protocols the rule applies to | | |
| `to` _[EgressFirewallDestination](#egressfirewalldestination)_ | to is the target that traffic is allowed/denied to | | MaxProperties: 1 <br />MinProperties: 1 <br /> |


#### EgressFirewallRuleType

_Underlying type:_ _string_

EgressNetworkFirewallRuleType indicates whether an EgressNetworkFirewallRule allows or denies traffic

_Validation:_
- Pattern: `^Allow|Deny$`

_Appears in:_
- [EgressFirewallRule](#egressfirewallrule)



#### EgressFirewallSpec



EgressFirewallSpec is a desired state description of EgressFirewall.



_Appears in:_
- [EgressFirewall](#egressfirewall)

| Field | Description | Default | Validation |
| --- | --- | --- | --- |
| `egress` _[EgressFirewallRule](#egressfirewallrule) array_ | a collection of egress firewall rule objects | | |


#### EgressFirewallStatus







_Appears in:_
- [EgressFirewall](#egressfirewall)

| Field | Description | Default | Validation |
| --- | --- | --- | --- |
| `status` _string_ | | | |
| `messages` _string array_ | | | |


2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ nav:
- Reviewing Guide: governance/REVIEWING.md
- Coding Guide: developer-guide/developer.md
- Kubernetes CRD API-Reference Guide: developer-guide/api-spec.md
- Kubernetes CRD API-Reference Guide:
- EgressFirewall: developer-guide/egress-firewall-api-spec.md
- OVN Kubernetes Container Images: developer-guide/image-build.md
- Documentation Guide: developer-guide/documentation.md
- Local Testing Guide: developer-guide/testing.md
Expand Down

0 comments on commit 4378caf

Please sign in to comment.