Skip to content

Commit 4c5c599

Browse files
authored
docs: update automatic generation java section (#84)
1 parent ca306c6 commit 4c5c599

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

java-proxy/README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,19 @@ crd yaml [file](https://github.com/streamnative/function-mesh/tree/master/config
5656
Note: add the field `preserveUnknownFields: false` to spec for avoid this [issue]()https://github.com/kubernetes-client/java/issues/1254
5757

5858
```shell script
59-
tmpDir=/tmp/functions-mesh/crd
60-
mkdir -p $tmpDir
61-
cp ../config/crd/bases $tmpDir
59+
CRD_FILE=cloud.streamnative.io_sources.yaml # Target CRD file
6260

63-
LOCAL_MANIFEST_FILE=${tmpDir}/cloud.streamnative.io_sources.yaml
61+
GEN_DIR=/tmp/functions-mesh/crd
62+
mkdir -p $GEN_DIR
63+
cp ../config/crd/bases/* $GEN_DIR
64+
cd $GEN_DIR
6465

66+
LOCAL_MANIFEST_FILE=$GEN_DIR/$CRD_FILE
67+
68+
# yq site: https://mikefarah.gitbook.io/yq/
69+
yq e ".spec.preserveUnknownFields = false" -i $CRD_FILE
70+
71+
docker rm -f kind-control-plane
6572
docker run \
6673
--rm \
6774
-v /var/run/docker.sock:/var/run/docker.sock \
@@ -74,4 +81,6 @@ docker run \
7481
-n io.streamnative.cloud \
7582
-p io.streamnative.cloud \
7683
-o "$(pwd)"
84+
85+
open $GEN_DIR
7786
```

0 commit comments

Comments
 (0)