Skip to content

Commit 9a972c6

Browse files
authored
doc: clarify OCM integration (#40)
Signed-off-by: yue9944882 <[email protected]>
1 parent cf62f9d commit 9a972c6

File tree

1 file changed

+62
-23
lines changed

1 file changed

+62
-23
lines changed

README.md

+62-23
Original file line numberDiff line numberDiff line change
@@ -31,33 +31,13 @@ api-gateway solution:
3131
## Image
3232

3333
```shell
34-
$ docker pull oamdev/cluster-gateway:v1.1.6 # Or other newer tags
34+
$ docker pull oamdev/cluster-gateway:v1.1.8 # Or other newer tags
3535
```
3636

3737
## Documentation
3838

3939
- __Run Local__: https://github.com/oam-dev/cluster-gateway/blob/master/docs/non-etcd-apiserver/local-run.md
4040

41-
#### Resource Example
42-
43-
```yaml
44-
apiVersion: "cluster.core.oam.dev/v1alpha1"
45-
kind: "ClusterGateway"
46-
metadata:
47-
name: <..>
48-
spec:
49-
provider: ""
50-
access:
51-
endpoint: "https://127.0.0.1:9443"
52-
caBundle: "..."
53-
credential:
54-
type: X509Certificate
55-
x509:
56-
certificate: "..."
57-
privateKey: "..."
58-
status: { }
59-
```
60-
6141
### Performance
6242

6343
Compile the e2e benchmark suite by:
@@ -66,7 +46,6 @@ Compile the e2e benchmark suite by:
6646
$ make e2e-benchmark-binary
6747
```
6848

69-
7049
The benchmark suite will be creating-updating-deleting configmaps in a flow
7150
repeatly for 100 times. Here's a comparison of the performance we observed
7251
in a local experiment:
@@ -76,4 +55,64 @@ in a local experiment:
7655
|-------------|------------------|------------------|-----------------------------------|
7756
| Fastest | 0.083s | 0.560s | 0.556s |
7857
| Slowest | 1.078s | 1.887s | 2.579s |
79-
| Average | 0.580s ± 0.175s | 0.849s ± 0.361s | 1.408s ± 0.542s |
58+
| Average | 0.580s ± 0.175s | 0.849s ± 0.361s | 1.408s ± 0.542s |
59+
60+
### Open-Cluster-Management Integration
61+
62+
Cluster-gateway has native integration with [Open-Cluster-Management(OCM)](https://open-cluster-management.io/)
63+
to provide the KubeVela admin a more coherent user experience in distributing
64+
applications across multiple clusters:
65+
66+
#### Enabling OCM seamlessly in your KubeVela environment
67+
68+
The official vela addon named [ocm-cluster-manager](https://github.com/oam-dev/catalog/tree/master/addons/ocm-cluster-manager)
69+
will help you easily bootstrap the OCM control plane (in the hosting cluster
70+
where your KubeVela control plane lives). Note that the OCM environment
71+
installed from the addon above will not take any effect until we opt-in to
72+
enable the functional integration between KubeVela and OCM as is elaborated
73+
below. It's just a minimal trial setup to try out OCM instantly, while in order
74+
to enable the further integration with OCM, we will need to adjust the
75+
configuration of cluster-gateway to make it detect and aware of the local OCM
76+
environment.
77+
78+
#### Aligning ClusterGateway to OCM's cluster registry
79+
80+
By opt-in to the flag `--ocm-integration=true`, the cluster-gateway will be
81+
detecting and loading the OCM environment in the hosting cluster and connecting
82+
each `ClusterGateway` custom resource from cluster-gateway to OCM's original
83+
cluster model in OCM named `ManagedCluster`. The `ClusterGateway` is a
84+
gateway "ingress" abstraction for the Kubernetes clusters managed by KubeVela,
85+
so after integrating with OCM it's intuitive to regard the gateway resource
86+
as a "satellite" child resource around `ManagedCluster`. Setting the flag will
87+
make the cluster-gateway filter out those dangling `ClusterGateway` that doesn't
88+
have a valid `ManagedCluster` bound with. In addition to that, we won't need to
89+
explicitly set the master URL in the cluster secret because the cluster-gateway
90+
will be merging the URL list from the corresponding `ManagedCluster`.
91+
92+
Furthermore, by enabling the integration, we will also reflect/aggregate the
93+
healthiness of the corresponding clusters by partially merging the original
94+
healthiness status from OCM's `ManagedCluster`. So we can save the troubles
95+
before attempting to talk to an unavailable cluster.
96+
97+
#### Delegating the upgrading/rotation of cluster-gateway to OCM
98+
99+
Installing the cluster-gateway via the [standalone chart](https://github.com/oam-dev/cluster-gateway/tree/master/charts/cluster-gateway)
100+
or [KubeVela's chart](https://github.com/oam-dev/kubevela/tree/master/charts/vela-core)
101+
provides us a one-time light-weighting setup of cluster-gateway, but sadly
102+
there are still some missing puzzles we should notice before we bring the
103+
cluster-gateway into sustainable production environment:
104+
105+
- The rotation of cluster-gateway's server TLS certificate.
106+
- Automatic addition/removal of the `ClusterGateway` resource upon cluster
107+
discovery.
108+
109+
In order to fill the blanks in cluster-gateway above, optionally we can delegate
110+
the management of cluster-gateway to OCM by introducing a new component named [cluster-gateway-addon-manager](https://github.com/oam-dev/cluster-gateway/tree/master/cmd/addon-manager)
111+
to the hosting cluster which is basically responsible for:
112+
113+
1. Sustainable installation as a typical "operator" dedicated for
114+
cluster-gateway.
115+
2. Modelling cluster-gateway as an [OCM addon](https://open-cluster-management.io/concepts/addon/).
116+
117+
The addon-manager can be installed via simple helm commands, please refer to
118+
the installation guide [here](https://open-cluster-management.io/scenarios/pushing-kube-api-requests/#installation).

0 commit comments

Comments
 (0)