Skip to content

Commit 5438968

Browse files
authored
Merge pull request #10003 from longwuyuan/add-faq-section
add faq section in docs
2 parents f7ea0b1 + 40957d4 commit 5438968

File tree

4 files changed

+79
-6
lines changed

4 files changed

+79
-6
lines changed

docs/faq.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2+
# FAQ
3+
4+
## Retaining Client IPAddress
5+
6+
Please read [Retain Client IPAddress Guide here](./user-guide/retaining-client-ipaddress.md).
7+
8+
## Kubernetes v1.22 Migration
9+
10+
If you are using Ingress objects in your cluster (running Kubernetes older than v1.22), and you plan to upgrade your Kubernetes version to K8S 1.22 or above, then please read [the migration guide here](./user-guide/k8s-122-migration.md).
11+
12+
## Validation Of __`path`__
13+
14+
- For improving security and also following desired standards on Kubernetes API spec, the next release, scheduled for v1.8.0, will include a new & optional feature of validating the value for the key `ingress.spec.rules.http.paths.path` .
15+
16+
- This behavior will be disabled by default on the 1.8.0 release and enabled by default on the next breaking change release, set for 2.0.0.
17+
18+
- When "`ingress.spec.rules.http.pathType=Exact`" or "`pathType=Prefix`", this validation will limit the characters accepted on the field "`ingress.spec.rules.http.paths.path`", to "`alphanumeric characters`", and `"/," "_," "-."` Also, in this case, the path should start with `"/."`
19+
20+
- When the ingress resource path contains other characters (like on rewrite configurations), the pathType value should be "`ImplementationSpecific`".
21+
22+
- API Spec on pathType is documented [here](https://kubernetes.io/docs/concepts/services-networking/ingress/#path-types)
23+
24+
- When this option is enabled, the validation will happen on the Admission Webhook. So if any new ingress object contains characters other than "`alphanumeric characters`", and `"/," "_," "-."` , in the `path` field, but is not using `pathType` value as `ImplementationSpecific`, then the ingress object will be denied admission.
25+
26+
- The cluster admin should establish validation rules using mechanisms like "`Open Policy Agent`", to validate that only authorized users can use ImplementationSpecific pathType and that only the authorized characters can be used. [The configmap value is here](https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#strict-validate-path-type)
27+
28+
- A complete example of an Openpolicyagent gatekeeper rule is available [here](https://kubernetes.github.io/ingress-nginx/examples/openpolicyagent/)
29+
30+
- If you have any issues or concerns, please do one of the following:
31+
- Open a GitHub issue
32+
- Comment in our Dev Slack Channel
33+
- Open a thread in our Google Group [email protected]

docs/index.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@ It is built around the [Kubernetes Ingress resource](https://kubernetes.io/docs/
66

77
You can learn more about using [Ingress](http://kubernetes.io/docs/user-guide/ingress/) in the official [Kubernetes documentation](https://docs.k8s.io).
88

9-
## Getting Started
9+
# Getting Started
1010

1111
See [Deployment](./deploy/) for a whirlwind tour that will get you started.
1212

13-
14-
# FAQ - Kubernetes 1.22 Migration
15-
16-
If you are using Ingress objects in your cluster (running Kubernetes older than v1.22),
17-
and you plan to upgrade to Kubernetes v1.22, please read [the migration guide here](./user-guide/k8s-122-migration.md).
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
2+
## Retaining Client IPAddress
3+
4+
Please read this https://kubernetes.github.io/ingress-nginx/user-guide/miscellaneous/#source-ip-address , to get details of retaining the client IPAddress.
5+
6+
### Using proxy-protocol
7+
8+
Please read this https://kubernetes.github.io/ingress-nginx/user-guide/miscellaneous/#proxy-protocol , to use proxy-protocol for retaining client IPAddress
9+
10+
11+
### Using the K8S spec service.spec.externalTrafficPolicy
12+
13+
```
14+
% kubectl explain service.spec.externalTrafficPolicy
15+
KIND: Service
16+
VERSION: v1
17+
18+
FIELD: externalTrafficPolicy <string>
19+
20+
DESCRIPTION:
21+
externalTrafficPolicy describes how nodes distribute service traffic they
22+
receive on one of the Service's "externally-facing" addresses (NodePorts,
23+
ExternalIPs, and LoadBalancer IPs). If set to "Local", the proxy will
24+
configure the service in a way that assumes that external load balancers
25+
will take care of balancing the service traffic between nodes, and so each
26+
node will deliver traffic only to the node-local endpoints of the service,
27+
without masquerading the client source IP. (Traffic mistakenly sent to a
28+
node with no endpoints will be dropped.) The default value, "Cluster", uses
29+
the standard behavior of routing to all endpoints evenly (possibly modified
30+
by topology and other features). Note that traffic sent to an External IP or
31+
LoadBalancer IP from within the cluster will always get "Cluster" semantics,
32+
but clients sending to a NodePort from within the cluster may need to take
33+
traffic policy into account when picking a node.
34+
35+
Possible enum values:
36+
- `"Cluster"` routes traffic to all endpoints.
37+
- `"Local"` preserves the source IP of the traffic by routing only to
38+
endpoints on the same node as the traffic was received on (dropping the
39+
traffic if there are no local endpoints).
40+
41+
```
42+
43+
44+
- Setting the field `externalTrafficPolicy`, in the ingress-controller service, to a value of `Local` retains the client's ipaddress, within the scope explained above

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,4 @@ nav:
130130
- Developer Guide:
131131
- Getting Started: "developer-guide/getting-started.md"
132132
- Code Overview: "developer-guide/code-overview.md"
133+
- FAQ: "faq.md"

0 commit comments

Comments
 (0)