Skip to content

Commit d3bd020

Browse files
committed
Add Docs and modify readme
1 parent 8f0296d commit d3bd020

5 files changed

+150
-3
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ cloud-provider specific code out of the Kubernetes codebase.
2727
| \>=v 0.11 | v1.16 | v1.18 |
2828
| \>=v 0.12 | v1.18 | v1.21 |
2929
| \>=v 0.13 | v1.19 | v1.21 |
30+
| v1.19.12 | v1.19 | v1.21 |
3031

3132
Note:
3233
Versions older than v0.13.0 are no longer supported, new features / bug fixes will be available in v0.13.0 and later.

docs/expand-block-volume-using-csi.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
## Create PVC
88

9-
```bash
9+
```yaml
1010
apiVersion: v1
1111
kind: PersistentVolumeClaim
1212
metadata:
@@ -22,7 +22,7 @@ spec:
2222
2323
## Create POD
2424
25-
```bash
25+
```yaml
2626
apiVersion: v1
2727
kind: Pod
2828
metadata:

docs/load-balancer-annotations.md

+45-1
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
This file defines a list of [Service][4] `type: LoadBalancer` annotations which are
44
supported by the `oci-cloud-controller-manager`.
55

6-
All annotations are prefixed with `service.beta.kubernetes.io/` or `oci.oraclecloud.com/`. For example:
6+
All annotations are prefixed with `service.beta.kubernetes.io/` or `oci.oraclecloud.com/` or `oci-network-load-balancer.oraclecloud.com/` (for OCI Network Load Balancer specific annotations). For example:
77

88
```yaml
99
kind: Service
1010
apiVersion: v1
1111
metadata:
1212
name: nginx-service
1313
annotations:
14+
oci.oraclecloud.com/load-balancer-type: "lb"
1415
service.beta.kubernetes.io/oci-load-balancer-shape: "400Mbps"
1516
service.beta.kubernetes.io/oci-load-balancer-subnet1: "ocid..."
1617
service.beta.kubernetes.io/oci-load-balancer-subnet2: "ocid..."
@@ -58,6 +59,49 @@ Note:
5859
- If an invalid mode is passed in the annotation, then the default (`"All"`) mode is configured.
5960
- If an annotation is not specified, the mode specified in the cloud provider config file is configured.
6061

62+
## Network Load Balancer
63+
64+
For example:
65+
66+
```yaml
67+
apiVersion: v1
68+
kind: Service
69+
metadata:
70+
name: example-nlb
71+
annotations:
72+
oci-network-load-balancer.oraclecloud.com/security-list-management-mode: "All"
73+
oci.oraclecloud.com/load-balancer-type: nlb
74+
spec:
75+
selector:
76+
app: example-nlb
77+
ports:
78+
- port: 8088
79+
targetPort: 80
80+
type: LoadBalancer
81+
externalTrafficPolicy: Local
82+
```
83+
84+
Note:
85+
- The only security list management mode allowed when backend protocol is UDP is "None"
86+
- `externalTrafficPolicy` should be "Local" for preserving source IP
87+
- We recommend to set the `security-list-management-mode` as "None" and configure NSG / Security rules on your own.
88+
89+
## Network Load Balancer Specific Annotations
90+
91+
| Name | Description | Default
92+
| ----- | ----------- | -------
93+
| `oci-network-load-balancer.oraclecloud.com/internal` | Create an [internal network load balancer][1]. Cannot be modified after load balancer creation. | `false`
94+
| `oci-network-load-balancer.oraclecloud.com/subnet` | The OCID of the required regional or AD specific subnet to attach the network load balancer. | Value set for the cluster
95+
| `oci-network-load-balancer.oraclecloud.com/oci-network-security-groups` | Specifies Network Security Groups' OCIDs to be associated with the network load balancer. | `""`
96+
| `oci-network-load-balancer.oraclecloud.com/initial-freeform-tags-override` | Specifies one or multiple Freeform tags to apply to the OCI Network Load Balancer. | `""`
97+
| `oci-network-load-balancer.oraclecloud.com/initial-defined-tags-override` | Specifies one or multiple Defined tags to apply to the OCI Network Load Balancer. | `""`
98+
| `oci-network-load-balancer.oraclecloud.com/health-check-retries` | The number of retries to attempt before a backend server is considered "unhealthy". | `3`
99+
| `oci-network-load-balancer.oraclecloud.com/health-check-timeout` | The maximum time, in milliseconds, to wait for a reply to a health check. A health check is successful only if a reply returns within this timeout period. | `3000 ms`
100+
| `oci-network-load-balancer.oraclecloud.com/health-check-interval` | The interval between health checks requests, in milliseconds. | `3000 ms`
101+
| `oci-network-load-balancer.oraclecloud.com/backend-policy` | The network load balancer policy for the backend set. Valid values: "TWO_TUPLE", "THREE_TUPLE", or "FIVE_TUPLE" | `"FIVE_TUPLE"`
102+
| `oci-network-load-balancer.oraclecloud.com/security-list-management-mode` | Specifies the security list mode ("All", "Frontend","None") to configure how security lists are managed. | `"None"`
103+
104+
61105
[1]: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
62106
[2]: https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVCNs.htm
63107
[3]: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Block Volume Expansion using CSI
2+
3+
## Setup
4+
5+
1. Make sure you have installed [CCM](../README.md) and [CSI](../container-storage-interface.md) version v1.19.12 or later
6+
7+
To create a PVC backed by a block volume with a Lower Cost, Balanced, or Higher Performance performance level, set vpusPerGB in the storage class definition as follows:
8+
9+
* for a Lower Cost performance level, set vpusPerGB: "0"
10+
* for a Balanced performance level, set vpusPerGB: "10"
11+
* for a Higher Performance performance level, set vpusPerGB: "20"
12+
13+
## Create Storage Class for high performance
14+
```yaml
15+
apiVersion: storage.k8s.io/v1
16+
kind: StorageClass
17+
metadata:
18+
name: oci-high
19+
provisioner: blockvolume.csi.oraclecloud.com
20+
parameters:
21+
vpusPerGB: "20"
22+
reclaimPolicy: Delete
23+
volumeBindingMode: WaitForFirstConsumer
24+
allowVolumeExpansion: true
25+
```
26+
27+
The value of vpusPerGB must be "0", "10", or "20". Other values are not supported.
28+
29+
## Create PVC
30+
31+
```yaml
32+
apiVersion: v1
33+
kind: PersistentVolumeClaim
34+
metadata:
35+
name: oci-pvc-high
36+
spec:
37+
storageClassName: oci-high
38+
accessModes:
39+
- ReadWriteOnce
40+
resources:
41+
requests:
42+
storage: 50Gi
43+
```
44+
45+
## Create POD
46+
47+
```yaml
48+
apiVersion: v1
49+
kind: Pod
50+
metadata:
51+
name: app1
52+
spec:
53+
containers:
54+
- name: app1
55+
image: centos
56+
command: ["/bin/sh"]
57+
args: ["-c", "while true; do echo $(date -u) >> /data/out.txt; sleep 5; done"]
58+
volumeMounts:
59+
- name: persistent-storage
60+
mountPath: /data
61+
volumes:
62+
- name: persistent-storage
63+
persistentVolumeClaim:
64+
claimName: oci-pvc-high
65+
```
66+
67+
For more information refer [CSI BV Performance Doc][1]
68+
69+
Note:
70+
Performance of block volume can be specified at the creation itself. Performance (vpusPerGB) cannot be modified after volume is provisioned.
71+
CSI version 1.19.12 or later which runs on k8s cluster 1.19 or later supports block volume expansion.
72+
Flex volume does not support.
73+
74+
[1]: https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengcreatingpersistentvolumeclaim.htm#contengcreatingpersistentvolumeclaim_topic_Provisioning_PVCs_on_BV_PV_Volume_performance

docs/using-network-load-balancer.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Network load balancer
2+
3+
## Setup
4+
5+
1. Make sure you have installed [CCM](../README.md) version v1.19.12 or later
6+
7+
## Create Service
8+
9+
```yaml
10+
apiVersion: v1
11+
kind: Service
12+
metadata:
13+
name: example-nlb
14+
annotations:
15+
oci-network-load-balancer.oraclecloud.com/security-list-management-mode: "All"
16+
oci.oraclecloud.com/load-balancer-type: nlb
17+
spec:
18+
selector:
19+
app: example-nlb
20+
ports:
21+
- port: 8088
22+
targetPort: 80
23+
type: LoadBalancer
24+
externalTrafficPolicy: Local
25+
```
26+
For more info please refer [OKE NLB DOC][1]
27+
28+
[1]: https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengcreatingloadbalancer.htm#contengcreatingnetworkloadbalancers

0 commit comments

Comments
 (0)