From 18819bb6620fcb02849e063739b96e873bff9886 Mon Sep 17 00:00:00 2001 From: Jianjun Shen Date: Fri, 10 Jun 2022 13:00:13 -0400 Subject: [PATCH] Fix pool CRD format in egress.md and service-loadbalancer.md Signed-off-by: Jianjun Shen --- docs/egress.md | 44 ++++++++++++++++++------------------ docs/service-loadbalancer.md | 25 ++++++++++---------- 2 files changed, 34 insertions(+), 35 deletions(-) diff --git a/docs/egress.md b/docs/egress.md index 0306c828feb..823f2f0cd07 100644 --- a/docs/egress.md +++ b/docs/egress.md @@ -46,8 +46,8 @@ v1.6, at which time it was enabled by default. Prior to v1.6, a feature gate, `antrea-config` ConfigMap like the following options for the feature to work: ```yaml -kind: ConfigMap apiVersion: v1 +kind: ConfigMap metadata: name: antrea-config-dcfb6k2hkm namespace: kube-system @@ -134,18 +134,18 @@ external network. The IPs in the pool can be allocated to the Egress resources as the Egress IPs. A typical ExternalIPPool resource example: ```yaml -- apiVersion: crd.antrea.io/v1alpha2 - kind: ExternalIPPool - metadata: - name: prod-external-ip-pool - spec: - ipRanges: - - start: 10.10.0.2 - end: 10.10.0.10 - - cidr: 10.10.1.0/28 - nodeSelector: - matchLabels: - network-role: egress-gateway +apiVersion: crd.antrea.io/v1alpha2 +kind: ExternalIPPool +metadata: + name: prod-external-ip-pool +spec: + ipRanges: + - start: 10.10.0.2 + end: 10.10.0.10 + - cidr: 10.10.1.0/28 + nodeSelector: + matchLabels: + network-role: egress-gateway ``` ### IPRanges @@ -173,15 +173,15 @@ First, create an `ExternalIPPool` with a list of external routable IPs on the network. ```yaml -- apiVersion: crd.antrea.io/v1alpha2 - kind: ExternalIPPool - metadata: - name: external-ip-pool - spec: - ipRanges: - - start: 10.10.0.11 # 10.10.0.11-10.10.0.20 can be used as Egress IPs - end: 10.10.0.20 - nodeSelector: {} # All Nodes can be Egress Nodes +apiVersion: crd.antrea.io/v1alpha2 +kind: ExternalIPPool +metadata: + name: external-ip-pool +spec: + ipRanges: + - start: 10.10.0.11 # 10.10.0.11-10.10.0.20 can be used as Egress IPs + end: 10.10.0.20 + nodeSelector: {} # All Nodes can be Egress Nodes ``` Then create two `Egress` resources, each of which applies to web apps in one diff --git a/docs/service-loadbalancer.md b/docs/service-loadbalancer.md index 6367b7012f4..b5b1d0958fd 100644 --- a/docs/service-loadbalancer.md +++ b/docs/service-loadbalancer.md @@ -70,8 +70,8 @@ the `ServiceExternalIP` feature gate in the `antrea-config` ConfigMap in the Antrea deployment YAML: ```yaml -kind: ConfigMap apiVersion: v1 +kind: ConfigMap metadata: name: antrea-config-dcfb6k2hkm namespace: kube-system @@ -110,18 +110,17 @@ selects the Nodes with label "network-role: ingress-node" to host the external IPs: ```yaml -- apiVersion: crd.antrea.io/v1alpha2 - kind: ExternalIPPool - metadata: - name: service-external-ip-pool - spec: - ipRanges: - - start: 10.10.0.2 - end: 10.10.0.10 - - cidr: 10.10.1.0/28 - nodeSelector: - matchLabels: - network-role: ingress-node +apiVersion: crd.antrea.io/v1alpha2 +kind: ExternalIPPool +metadata: + name: service-external-ip-pool +spec: + ipRanges: + - start: 10.10.0.2 + end: 10.10.0.10 + nodeSelector: + matchLabels: + network-role: ingress-node ``` #### Create a Service of type LoadBalancer