Skip to content

Commit f261a0a

Browse files
committed
readme
1 parent 2de31c4 commit f261a0a

File tree

1 file changed

+13
-45
lines changed

1 file changed

+13
-45
lines changed

README.md

Lines changed: 13 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -6,54 +6,27 @@
66
![alt gopher network](https://raw.githubusercontent.com/kubevirt-ui/kube-gateway/main/docs/network-side.png)
77

88
kube-gateway-operator installs and operate [kube-gateway](https://github.com/kubevirt-ui/kube-gateway)
9-
## Build
109

11-
```bash
10+
## Build and push images
1211

13-
IMG=quay.io/kubevirt-ui/kube-gateway-operator make podman-build
12+
```bash
13+
export USERNAME=yaacov
14+
IMG=quay.io/$USERNAME/kube-gateway-operator:v0.0.1 make podman-build
15+
IMG=quay.io/$USERNAME/kube-gateway-operator:v0.0.1 make podman-push
1416
```
1517

16-
## Usage
17-
18-
Requesting a token for [kube-gateway](https://github.com/kubevirt-ui/kube-gateway) service is done using GateToken CRD,
19-
20-
Available fields are:
21-
22-
- user-id: string (required), user-id is the user id of the user requesting this token.
23-
- match-path: string (required), match-path is a regular expresion used to validate API request path, API requests matching this pattern will be validated by the token. This field may not be empty.
24-
- match-method: string, a comma separeted list of allowed http methods, defoult is "GET,OPTIONS"
25-
- duration-sec: int, duration-sec is the duration in sec the token will be validated since it's invocation. Defalut value is 3600s (1h).
26-
- from: string, from is time of token invocation, the token will not validate before this time, the token duration will start from this time. Defalut to token object creation time.
27-
28-
Creating a token requires a secret holding a RSA private-key for sighing the token in the namespace of the token (secret name: kube-gateway-jwt-secret), nce token is ready it will be available in the GateToken status.
29-
30-
Get a token:
31-
32-
[![asciicast](https://asciinema.org/a/397136.svg)](https://asciinema.org/a/397136)
33-
34-
Deploy:
35-
36-
[![asciicast](https://asciinema.org/a/397137.svg)](https://asciinema.org/a/397137)
37-
38-
(gopher network image - [egonelbre/gophers](https://github.com/egonelbre/gophers))
39-
4018
## Deploy
4119

42-
Requires
43-
44-
- requires GOLANG ver >= v1.15 dev env.
45-
- user with admin permisions logged into the cluster.
46-
4720
```bash
4821
# Deploy the operator, RBAC roles and CRDs
4922
export USERNAME=yaacov
50-
make deploy IMG=quay.io/$USERNAME/kube-gateway-operator:v0.0.1
23+
IMG=quay.io/$USERNAME/kube-gateway-operator:v0.0.1 make deploy
5124
```
5225

5326
```bash
5427
# Remove deployment of the operator, RBAC roles and CRDs
5528
export USERNAME=yaacov
56-
make undeploy IMG=quay.io/$USERNAME/kube-gateway-operator:v0.0.1
29+
IMG=quay.io/$USERNAME/kube-gateway-operator:v0.0.1 make undeploy
5730
```
5831

5932
## Create GateToken CR
@@ -62,19 +35,19 @@ Requires a secret with private key on 'kube-gateway' namespace:
6235

6336
```bash
6437
# Use the kube-gateway namespace
65-
oc project kube-gateway
38+
oc create namespace kube-gateway
6639

67-
# create a secret
68-
oc create -n kube-gateway-operator-system secret generic kube-gateway-jwt-secret --from-file=test/cert.pem --from-file=test/key.pem
40+
# create a sample gateway server
41+
oc create -f config/samples/kubegateway_v1beta1_gateserver.yaml
6942

70-
# create a token request
43+
# create a sample token request
7144
oc create -f config/samples/kubegateway_v1beta1_gatetoken.yaml
7245

7346
# check the token
7447
oc get gatetoken gatetoken-sample -o yaml
7548
```
7649

77-
## Build
50+
## Local dev build
7851

7952
```bash
8053
# Compile operator
@@ -88,9 +61,4 @@ make install
8861
make run
8962
```
9063

91-
## Build images
92-
93-
```bash
94-
export USERNAME=yaacov
95-
make podman-build podman-push IMG=quay.io/$USERNAME/kube-gateway-operator:v0.0.1
96-
```
64+
(gopher network image - [egonelbre/gophers](https://github.com/egonelbre/gophers))

0 commit comments

Comments
 (0)