You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/generate-model-from-third-party-resources.md
+25-15Lines changed: 25 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,26 +5,36 @@ Alternatively, without this automatic code-generation process, you can always ma
5
5
models for CRDs by implementing [KubernetesObject](https://github.com/kubernetes-client/java/blob/master/kubernetes/src/main/java/io/kubernetes/client/common/KubernetesObject.java)
6
6
and [KubernetesListObject](https://github.com/kubernetes-client/java/blob/master/kubernetes/src/main/java/io/kubernetes/client/common/KubernetesListObject.java) interfaces.
7
7
8
-
### Setup Environment
8
+
##Remote Generate via Github Action
9
9
10
-
__Note__: You can skip this section by replacing image prefix `docker.pkg.github.com/kubernetes-client/java/..`
11
-
to `ghcr.io/yue9944882/..` which is a mirror repository allows anonymous access. `docker.pkg.github.com/kubernetes-client/java/..`
12
-
will require docker-login due to `kubernetes-client` permission limit.
10
+
### 1. Fork Upstream Repo
13
11
14
-
1. Make there's an active docker daemon service working on your host, run `docker ps` to check it if
15
-
it's correctly setup.
12
+
Fork the repository [kubernetes-client/java](https://github.com/kubernetes-client/java)
13
+
so that you can run the github action ["CRD Java Model Generate"](./.github/workflows/generate-crd.yml)
14
+
in your forked repo. (Running github action job manually requires "collaborator" access to the repo).
16
15
17
-
2. Generating your access token in [https://github.com/settings/tokens](https://github.com/settings/tokens)
18
-
and grants it package-read privilege. And save your token into a local file `~/TOKEN.txt`.
16
+
Alternatively, you can also copy-paste the above github action definition to your repo to run it.
19
17
20
-
3. Login to github docker registry by running:
18
+
### 2. Execute Github Action
19
+
20
+
Go to the repo home page, then click __"Actions"__. Find the job "CRD Java Model Generate"
21
+
under __"Workflows"__ and then run it. The workflow will help convert your CRD yaml manifests to
22
+
zip-archived java sources which is downloadable after it finishes.
23
+
24
+
### 3. Download the Generated Sources
25
+
26
+
Go to the __"Summary"__ page of the workflow execution, you can find the archived java sources at
27
+
the bottom of the page. Just click it to download.
0 commit comments