Skip to content

Commit 83d4447

Browse files
committed
refactor: bump kubernetes to v1.30.2 and support CRD
1 parent e70bc77 commit 83d4447

File tree

644 files changed

+50746
-15716
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

644 files changed

+50746
-15716
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,3 +360,4 @@ apiserver.local.config
360360
node_modules
361361
_book
362362
/test/data
363+
/test-scripts

.todo.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
[] 代码测试
1313
[] 单元测试
1414
[] 项目注释
15-
[] 项目文档补全
16-
[] 课程目录补全(精细版)
1715
[?] 生成errors.md?
1816
[?] 对接prometheus
1917
[?] 生成store? --- 只生成internal/usercenter/store下格式的代码
@@ -131,3 +129,5 @@
131129
[] 事务回滚
132130
[] 添加 .go-version 特性
133131
[] 缓存服务添加
132+
[] 项目文档补全
133+
[] 课程目录补全(精细版)

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ endif
5656

5757
.PHONY: gen-k8s
5858
gen-k8s: ## Generate all necessary kubernetes related files, such as deepcopy files
59-
$(MAKE) -s generated.files
59+
@$(ONEX_ROOT)/scripts/update-codegen.sh
60+
# The following command is old generate way with makefile script.
61+
# Comment here as a code history.
62+
# $(MAKE) -s generated.files
6063

6164
.PHONY: protoc
6265
protoc: ## Generate api proto files.
@@ -103,8 +106,8 @@ push.multiarch: ## Build docker images for multiple platforms and push images to
103106
##@ Deploy
104107

105108
.PHONY: deploy
106-
deploy: ## Build docker images for host arch, and deploy it in kind cluster.
107-
$(MAKE) deploy.kind
109+
deploy: ## Build and push docker images for host arch, and deploy it in kubernetes cluster.
110+
$(MAKE) deploy.run
108111

109112
.PHONY: docker-install
110113
docker-install: ## Deploy onex with docker.

api/api-rules/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Existing API Rule Violations
2+
3+
This folder contains the checked-in report file of known API rule violations.
4+
The file violation\_exceptions.list is used by Make rule during OpenAPI spec generation to make
5+
sure that no new API rule violation is introduced into our code base.
6+
7+
## API Rule Violation Format
8+
9+
The report file [violation\_exceptions.list](./violation_exceptions.list) is in format of:
10+
11+
* ***API rule violation: \<RULE\>,\<PACKAGE\>,\<TYPE\>,\<FIELD\>***
12+
13+
e.g.
14+
15+
* ***API rule violation: names_match,k8s.io/api/core/v1,Event,ReportingController***
16+
17+
And the violation list is sorted alphabetically in each of the \<RULE\>, \<PACKAGE\>, \<TYPE\>, \<FIELD\> levels.
18+
19+
## How to resolve API Rule Check Failure
20+
21+
Make rule returns an error when the newly generated violation report differs from this
22+
checked-in violation report.
23+
24+
Our goal is that exceptions should never be added to this list, only fixed and removed.
25+
For new APIs, this is a hard requirement. For APIs that are e.g. being moved between
26+
versions or groups without other changes, it is OK for your API reviewer to make an
27+
exception.
28+
29+
If you're removing violations from the exception list, or if you have good
30+
reasons to add new violations to this list, please update the file using:
31+
32+
- `UPDATE_API_KNOWN_VIOLATIONS=true ./hack/update-codegen.sh`
33+
34+
It is up to API reviewers to review the list and make sure new APIs follow our API conventions.
35+
36+
**NOTE**: please don't hide changes to this file in a "generated changes" commit, treat it as
37+
source code instead.
38+
39+
## API Rules Being Enforced
40+
41+
For more information about the API rules being checked, please refer to
42+
https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators/rules
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,APIResourceList,APIResources
2+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,Duration,Duration
3+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,InternalEvent,Object
4+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,InternalEvent,Type
5+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,MicroTime,Time
6+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,StatusCause,Type
7+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,Time,Time
8+
API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,ContentEncoding
9+
API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,ContentType
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,Ref
2+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,Schema
3+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,XEmbeddedResource
4+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,XIntOrString
5+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,XListMapKeys
6+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,XListType
7+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,XMapType
8+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,XPreserveUnknownFields
9+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,XValidations
10+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaPropsOrArray,JSONSchemas
11+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaPropsOrArray,Schema
12+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaPropsOrBool,Allows
13+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaPropsOrBool,Schema
14+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaPropsOrStringArray,Property
15+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaPropsOrStringArray,Schema
16+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,CustomResourceColumnDefinition,JSONPath
17+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaProps,Ref
18+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaProps,Schema
19+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaProps,XEmbeddedResource
20+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaProps,XIntOrString
21+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaProps,XListMapKeys
22+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaProps,XListType
23+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaProps,XMapType
24+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaProps,XPreserveUnknownFields
25+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaProps,XValidations
26+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaPropsOrArray,JSONSchemas
27+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaPropsOrArray,Schema
28+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaPropsOrBool,Allows
29+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaPropsOrBool,Schema
30+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaPropsOrStringArray,Property
31+
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1,JSONSchemaPropsOrStringArray,Schema
32+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,APIResourceList,APIResources
33+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,Duration,Duration
34+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,InternalEvent,Object
35+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,InternalEvent,Type
36+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,MicroTime,Time
37+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,StatusCause,Type
38+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,Time,Time
39+
API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,ContentEncoding
40+
API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,ContentType
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,APIResourceList,APIResources
2+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,Duration,Duration
3+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,InternalEvent,Object
4+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,InternalEvent,Type
5+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,MicroTime,Time
6+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,StatusCause,Type
7+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,Time,Time
8+
API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,ContentEncoding
9+
API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,ContentType
10+
API rule violation: names_match,k8s.io/code-generator/examples/apiserver/apis/example/v1,TestTypeStatus,Blah
11+
API rule violation: names_match,k8s.io/code-generator/examples/apiserver/apis/example2/v1,TestTypeStatus,Blah
12+
API rule violation: names_match,k8s.io/code-generator/examples/apiserver/apis/example3.io/v1,TestTypeStatus,Blah
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,APIResourceList,APIResources
2+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,Duration,Duration
3+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,InternalEvent,Object
4+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,InternalEvent,Type
5+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,MicroTime,Time
6+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,StatusCause,Type
7+
API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,Time,Time
8+
API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,ContentEncoding
9+
API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,ContentType
File renamed without changes.

api/openapi/gateway/v1/gateway.swagger.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -680,21 +680,21 @@
680680
"items": {
681681
"$ref": "#/definitions/v1OwnerReference"
682682
},
683-
"title": "List of objects depended by this object. If ALL objects in the list have\nbeen deleted, this object will be garbage collected. If this object is managed by a controller,\nthen an entry in this list will point to this controller, with the controller field set to true.\nThere cannot be more than one managing controller.\n+optional\n+patchMergeKey=uid\n+patchStrategy=merge"
683+
"title": "List of objects depended by this object. If ALL objects in the list have\nbeen deleted, this object will be garbage collected. If this object is managed by a controller,\nthen an entry in this list will point to this controller, with the controller field set to true.\nThere cannot be more than one managing controller.\n+optional\n+patchMergeKey=uid\n+patchStrategy=merge\n+listType=map\n+listMapKey=uid"
684684
},
685685
"finalizers": {
686686
"type": "array",
687687
"items": {
688688
"type": "string"
689689
},
690-
"title": "Must be empty before the object is deleted from the registry. Each entry\nis an identifier for the responsible component that will remove the entry\nfrom the list. If the deletionTimestamp of the object is non-nil, entries\nin this list can only be removed.\nFinalizers may be processed and removed in any order. Order is NOT enforced\nbecause it introduces significant risk of stuck finalizers.\nfinalizers is a shared field, any actor with permission can reorder it.\nIf the finalizer list is processed in order, then this can lead to a situation\nin which the component responsible for the first finalizer in the list is\nwaiting for a signal (field value, external system, or other) produced by a\ncomponent responsible for a finalizer later in the list, resulting in a deadlock.\nWithout enforced ordering finalizers are free to order amongst themselves and\nare not vulnerable to ordering changes in the list.\n+optional\n+patchStrategy=merge"
690+
"title": "Must be empty before the object is deleted from the registry. Each entry\nis an identifier for the responsible component that will remove the entry\nfrom the list. If the deletionTimestamp of the object is non-nil, entries\nin this list can only be removed.\nFinalizers may be processed and removed in any order. Order is NOT enforced\nbecause it introduces significant risk of stuck finalizers.\nfinalizers is a shared field, any actor with permission can reorder it.\nIf the finalizer list is processed in order, then this can lead to a situation\nin which the component responsible for the first finalizer in the list is\nwaiting for a signal (field value, external system, or other) produced by a\ncomponent responsible for a finalizer later in the list, resulting in a deadlock.\nWithout enforced ordering finalizers are free to order amongst themselves and\nare not vulnerable to ordering changes in the list.\n+optional\n+patchStrategy=merge\n+listType=set"
691691
},
692692
"managedFields": {
693693
"type": "array",
694694
"items": {
695695
"$ref": "#/definitions/v1ManagedFieldsEntry"
696696
},
697-
"description": "ManagedFields maps workflow-id and version to the set of fields\nthat are managed by that workflow. This is mostly for internal\nhousekeeping, and users typically shouldn't need to set or\nunderstand this field. A workflow can be the user's name, a\ncontroller's name, or the name of a specific apply path like\n\"ci-cd\". The set of fields is always in the version that the\nworkflow used when modifying the object.\n\n+optional"
697+
"description": "ManagedFields maps workflow-id and version to the set of fields\nthat are managed by that workflow. This is mostly for internal\nhousekeeping, and users typically shouldn't need to set or\nunderstand this field. A workflow can be the user's name, a\ncontroller's name, or the name of a specific apply path like\n\"ci-cd\". The set of fields is always in the version that the\nworkflow used when modifying the object.\n\n+optional\n+listType=atomic"
698698
}
699699
},
700700
"description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects\nusers must create."
@@ -770,7 +770,7 @@
770770
"items": {
771771
"$ref": "#/definitions/v1LabelSelectorRequirement"
772772
},
773-
"title": "matchExpressions is a list of label selector requirements. The requirements are ANDed.\n+optional"
773+
"title": "matchExpressions is a list of label selector requirements. The requirements are ANDed.\n+optional\n+listType=atomic"
774774
}
775775
},
776776
"title": "A label selector is a label query over a set of resources. The result of matchLabels and\nmatchExpressions are ANDed. An empty label selector matches all objects. A null\nlabel selector matches no objects.\n+structType=atomic"
@@ -791,7 +791,7 @@
791791
"items": {
792792
"type": "string"
793793
},
794-
"title": "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch.\n+optional"
794+
"title": "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch.\n+optional\n+listType=atomic"
795795
}
796796
},
797797
"description": "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values."

0 commit comments

Comments
 (0)