Skip to content

Commit b07cdb8

Browse files
committed
Merge pull request #311 from YunShiHang/main
fix checkout repository bug
2 parents 50880ad + 375d766 commit b07cdb8

File tree

7 files changed

+385
-60
lines changed

7 files changed

+385
-60
lines changed

.github/workflows/auto-release-ci.yaml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -94,21 +94,8 @@ jobs:
9494
run: |
9595
./hack/sync_api.sh ${GITHUB_REF_NAME}
9696
97-
auto-generate-release-notes:
98-
needs: sync-charts-and-api
99-
runs-on: ubuntu-latest
100-
steps:
101-
- name: Checkout
102-
uses: actions/checkout@v2
103-
- name: Release
104-
uses: softprops/action-gh-release@v1
105-
if: startsWith(github.ref, 'refs/tags/')
106-
with:
107-
token: ${{ secrets.GITHUB_TOKEN }}
108-
generate_release_notes: true
109-
11097
save-release-notes-to-file:
111-
needs: auto-generate-release-notes
98+
needs: sync-charts-and-api
11299
uses: ./.github/workflows/call-save-release-notes.yaml
113100
secrets: inherit
114101

.github/workflows/call-offline-build.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ jobs:
9898
env:
9999
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100100
with:
101+
generate_release_notes: true
101102
files: |
102103
${{ github.ref_name }}/*/*.tar.gz
103104
${{ github.ref_name }}/*/*.list

.github/workflows/call-os-pkgs-build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ jobs:
5858
env:
5959
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6060
with:
61+
generate_release_notes: true
6162
files: |
6263
os-pkgs-${{ matrix.name }}-${{ github.ref_name }}.tar.gz
63-

.github/workflows/call-save-release-notes.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
- name: Checkout
99
uses: actions/checkout@v2
1010
with:
11-
name: kubean-io/website
11+
repository: kubean-io/website
1212
ref: main
1313
- name: save
1414
run: |

docs/airgap_patch_usage.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Generation and use of incremental offline packages
2+
3+
> English | [中文](zh/airgap_patch_usage.md)
4+
5+
To meet users' needs for components of certain versions, Kubean provides the script `artifacts/offline_patch.py` to generate a corresponding version of offline packages based on the configuration file `manifest.yml`.
6+
7+
## Generate incremental offline packages:
8+
9+
1. Create a new `manifest.yml` file in a folder, with the following example:
10+
11+
```yaml
12+
image_arch:
13+
- "amd64"
14+
- "arm64"
15+
kube_version:
16+
- "v1.24.6"
17+
- "v1.24.4"
18+
calico_version:
19+
- "v3.23.3"
20+
cni_version:
21+
- "v1.1.1"
22+
containerd_version:
23+
- "1.6.8"
24+
cilium_version:
25+
- "v1.12.1"
26+
etcd_version:
27+
- "v3.5.3"
28+
```
29+
30+
2. Create a new `data` folder in the same folder
31+
32+
3. Run the following command to generate an incremental offline package in the `data` folder
33+
34+
```bash
35+
docker run -v $(pwd)/manifest.yml:/manifest.yml -v $(pwd)/data:/data ghcr.io/hangscer8/airgap-patch:v0.2.0
36+
```
37+
38+
## Use the incremental offline package:
39+
40+
The directory structure of the incremental package is as follows:
41+
42+
```
43+
data
44+
└── v_offline_patch
45+
├── amd64
46+
│   ├── files
47+
│   │   ├── import_files.sh
48+
│   │   └── offline-files.tar.gz
49+
│   └── images
50+
│   ├── import_images.sh
51+
│   └── offline-images.tar.gz
52+
├── arm64
53+
│   ├── files
54+
│   │   ├── import_files.sh
55+
│   │   └── offline-files.tar.gz
56+
│   └── images
57+
│   ├── import_images.sh
58+
│   └── offline-images.tar.gz
59+
└── kubeanofflineversion.cr.patch.yaml
60+
```
61+
62+
1. Write file data into minio
63+
64+
``` bash
65+
$ cd data/v_offline_patch/amd64/files
66+
67+
$ MINIO_USER=${username} MINIO_PASS=${password} ./import_files.sh ${minio_address}
68+
```
69+
70+
* `minio_address` is the `minio API Server` address, typically on port 9000, for example: `http://1.2.3.4:9000`
71+
72+
2. Write image data to the docker registry (version 2.6.2 recommended) or harbor
73+
74+
``` bash
75+
$ cd data/v_offline_patch/amd64/images
76+
77+
# 1. Non-secure password-free mode
78+
$ DEST_TLS_VERIFY=false ./import_images.sh ${registry_address}
79+
80+
# 2. Username password mode
81+
$ DEST_USER=${username} DEST_PASS=${password} ./import_images.sh ${registry_address}
82+
```
83+
84+
* When `DEST_TLS_VERIFY=false`, the image is uploaded in non-secure HTTP mode
85+
* `DEST_USER` and `DEST_PASS` need to be set when username and password authentication exists for the image registry
86+
* `registry_address` is the address of the image registry, e.g. `1.2.3.4:5000`
87+
88+
3. Write `kubeanofflineversion.cr.patch.yaml` to the k8s cluster
89+
90+
```bash
91+
$ cd data/v_offline_patch
92+
$ kubectl apply -f kubeanofflineversion.cr.patch.yaml
93+
```
94+
* This step is to inform the kubean-operator of the new software version available for offline use

docs/architecture.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Kubean Infrastructure
2+
3+
> English | [中文](zh/architecture.md)
4+
5+
The overall architecture of Kubean is shown below:
6+
7+
![kubean-architecture](./images/kubean-architecture.png)
8+
9+
Kubean needs to run on an existing Kubernetes cluster. It controls and manages cluster lifecycle (install, uninstall, upgrade, scale up & down, etc.) by applying the standard CRDs provided by Kubean and Kubernetes built-in resources. Kubean uses Kubespray as the underlying technology. On the one hand, it simplifies the operation process of cluster deployment and lowers the threshold of use. On the other hand, many new features such as cluster operation records and offline version records have been added on the basis of Kubespray's capabilities.
10+
11+
<br/>
12+
13+
![kubean-components](./images/kubean-components.png)
14+
15+
Kubean runs several controllers to track changes of Kubean CRDs and communicates with the underlying cluster's API server to create Kubernetes native resources. It consists of four components:
16+
17+
1. Cluster Controller: monitors 'Cluster Objects'. It uniquely identifies a cluster, has the access information, type information, and deployment parameter information of the cluster node, and is associated with all operations on the cluster ('ClusterOperation Objects');
18+
2. ClusterOperation Controller: monitors `ClusterOperation Objects`. When a `ClusterOperation Object` is created, the controller assembles a [Job](https://kubernetes.io/docs/concepts/workloads/controllers/job/) to perform the operations defined in the CRD object;
19+
3. Manifest Controller: monitors `Manifest Objects`. It records and maintains components, packages and versions that are used by or compatible with the current version of Kubean;
20+
4. LocalArtifactSet Controller:monitors `LocalArtifactSet Objects`. It records information about the components and versions supported by the offline package.

0 commit comments

Comments
 (0)