Chore: upgrade Kubernetes dependencies to v0.31.10 & enhance CLI, workflows, tests, and documentation (#6837)

* Create testwr

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Update testwr

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Update testwr

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Update testwr

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Update testwr

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Update testwr

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Update testwr

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Update testwr

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Delete testwr

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Chore: (deps): Bump goreleaser/goreleaser-action from 5.0.0 to 6.3.0 (#6775)

Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 5.0.0 to 6.3.0.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](7ec5c2b0c6...9c156ee8a1)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  dependency-version: 6.3.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Chore: Replace the openssf badge with UI link (#6783)

[optional body]

[optional footer]

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* chore: moves dockerhub user name to secret section in the reusable workflow (#6778)

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Ayush <ayushshyam.official.888@gmail.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Chore: update helm repo path in tests (#6797)

* chore: fixes the breaking tests with older helm chart address

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Co-authored-by: Amit Singh <singhamitch@outlook.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* tests: update the registery url

Signed-off-by: semmet95 <singhamitch@outlook.com>

* updates the default url

Signed-off-by: semmet95 <singhamitch@outlook.com>

* test: reverts the changes

Signed-off-by: semmet95 <singhamitch@outlook.com>

* fix: sets github repo directory as the default definition registry

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: reverts the default definition registry url

Signed-off-by: Amit Singh <singhamitch@outlook.com>

* test: overwrites custom definition registry url

Signed-off-by: Amit Singh <singhamitch@outlook.com>

* debugging test failure

Signed-off-by: Amit Singh <singhamitch@outlook.com>

---------

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>
Co-authored-by: Amit Singh <singhamitch@outlook.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Fix: moves resource modification inside patch block (#6791)

* fix: moves resource modification inside patch block

Signed-off-by: Ayush Shyam Kumar <ayushshyam.official.888@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: adds changes from make-reviewable

Signed-off-by: Ayush Shyam Kumar <ayushshyam.official.888@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* debugging error

Signed-off-by: Ayush Shyam Kumar <ayushshyam.official.888@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* test: updates the helm outdated path to new one

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* tests: fixes the failing helm test case

Signed-off-by: semmet95 <singhamitch@outlook.com>

* removes debugging printing statements

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

---------

Signed-off-by: Ayush Shyam Kumar <ayushshyam.official.888@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>
Co-authored-by: Ayush <ayushshyam.official.888@gmail.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Chore: switches to new oapi type field type (#6794)

* chore: switches to new oapi type field type

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: updates gen_sdk to use the new schema type

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: updates gen_sdk_test to use the new schema type

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: updates schema to use the new schema type

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* fix: updates chart urls

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: changes from make reviewable

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: fixes linting errors

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* debugging test failure

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* fix: fixes schema type nil check

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: replaces literals with constants

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* debugging test failure

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* test: switches to the new addon registry url

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: extra line removal

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* fix: replaces deprecated urls

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* fix: removes extra quotes form marshaljson

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* fix: updates chart url in mock resource

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

---------

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Co-authored-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Fix: vela cli namespace behaviour (#6805)

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Fix: vela up command to behave similarly with kubectl (#6809)

* Fix: vela up command to behave similarly with kubectl

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>

* Chore: Update the unit test cases and add a new test cases

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>

---------

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Co-authored-by: Chaitanya Reddy Onteddu <co@guidewire.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Fix: check component status after initial deployment (#6824)

* fix: check component status after initial deployment

Signed-off-by: Brian Kane <briankane1@gmail.com>

* Fix: applications should correctly reflect component health throughout the apps lifecycle

Signed-off-by: Brian Kane <briankane1@gmail.com>

* Fix: check component status after initial deployment

Signed-off-by: Brian Kane <briankane1@gmail.com>

---------

Signed-off-by: Brian Kane <briankane1@gmail.com>
Co-authored-by: Mikhail Elenskii <elenskii-mikhail@outlook.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* chore: upgrade k8s version to v0.31.10 and corresponding fixes

Signed-off-by: vishal210893 <vishal210893@gmail.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* fix: remove defer from feature gate testing in multiple test files

Signed-off-by: vishal210893 <vishal210893@gmail.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* fix: remove defer from feature gate testing in multiple test files

Signed-off-by: vishal210893 <vishal210893@gmail.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* fix: use RunPortForwardContext for improved context handling in port forwarding

Signed-off-by: vishal210893 <vishal210893@gmail.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Chore: Fix check-diff

Signed-off-by: Chaitanya Reddy Onteddu <co@guidewire.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Chore: Update ENVTEST_K8S_VERSION variable

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* fix: update feature gate testing to use GinkgoT for improved context handling

Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Fix: update Kubernetes version in e2e tests to v1.31

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Fix: increase timeout for application revision retrieval in multicluster tests

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* chore: update kubevela workflow to master

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Fix: increase timeout in multicluster tests

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* fix: upgrade dependencies and improve context handling in port forwarding

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* chore: remove space to trigger pipeline

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* chore: add space to trigger pipeline

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* chore: updated go sum

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* chore: updated go.mod for running github action

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* chore: updated go.mod for running github action

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* Fix: increase timeout and enhanced multicluster tests

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* adding a comment to re run the pipeline

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Adding back decription removed during check-diff

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* ran make reviewable

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* replaced generate-groups.sh with kube_codegen.sh

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* API Call changes for kube_codegen

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* fixed incorrect Api package path format and output dir handling

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* resolved incompatible dependencies issue

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* chore: update clientgen.sh to use kubevela clientgen_work_temp

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>

* chore: update clientgen.sh to use kubevela clientgen_work_temp

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>

* test: increase timeout for application deployment and rollback verification

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

---------

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Ayush <ayushshyam.official.888@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Ayush Shyam Kumar <ayushshyam.official.888@gmail.com>
Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Signed-off-by: Brian Kane <briankane1@gmail.com>
Signed-off-by: vishal210893 <vishal210893@gmail.com>
Signed-off-by: Chaitanya Reddy Onteddu <co@guidewire.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Anoop Gopalakrishnan <2038273+anoop2811@users.noreply.github.com>
Co-authored-by: Ayush Kumar <65535504+roguepikachu@users.noreply.github.com>
Co-authored-by: Amit Singh <singhamitch@outlook.com>
Co-authored-by: Ayush <ayushshyam.official.888@gmail.com>
Co-authored-by: Chaitanyareddy0702 <78363486+Chaitanyareddy0702@users.noreply.github.com>
Co-authored-by: Chaitanya Reddy Onteddu <co@guidewire.com>
Co-authored-by: Brian Kane <briankane1@gmail.com>
Co-authored-by: Mikhail Elenskii <elenskii-mikhail@outlook.com>
Co-authored-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Co-authored-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
This commit is contained in:
Vishal Kumar 2025-07-31 20:16:56 +05:30 committed by GitHub
parent c79f03fe92
commit b5a9925042
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
38 changed files with 355 additions and 865 deletions

View File

@ -44,7 +44,7 @@ jobs:
if: needs.detect-noop.outputs.noop != 'true'
strategy:
matrix:
k8s-version: ["v1.29"]
k8s-version: ["v1.31"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
cancel-in-progress: true
@ -73,10 +73,10 @@ jobs:
run: |
go install sigs.k8s.io/kind@v0.24.0
kind delete cluster --name worker || true
kind create cluster --name worker --image=kindest/node:v1.29.8
kind create cluster --name worker --image=kindest/node:v1.31.1
kind export kubeconfig --internal --name worker --kubeconfig /tmp/worker.kubeconfig
kind delete cluster || true
kind create cluster --image=kindest/node:v1.29.8
kind create cluster --image=kindest/node:v1.31.1
- name: Load image
run: |

View File

@ -44,7 +44,7 @@ jobs:
if: needs.detect-noop.outputs.noop != 'true'
strategy:
matrix:
k8s-version: ["v1.29"]
k8s-version: ["v1.31"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
cancel-in-progress: true

View File

@ -60,3 +60,8 @@ func init() {
SchemeBuilder.Register(&workflowv1alpha1.Workflow{}, &workflowv1alpha1.WorkflowList{})
_ = SchemeBuilder.AddToScheme(k8sscheme.Scheme)
}
// Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.5
name: applicationrevisions.core.oam.dev
spec:
group: core.oam.dev
@ -395,7 +395,6 @@ spec:
the event) or if no container name is specified "spec.containers[2]" (container with
index 2 in this pod). This syntax is chosen only to have some well-defined way of
referencing a part of an object.
TODO: this design is not final and this field is subject to change in the future.
type: string
kind:
description: |-
@ -429,24 +428,8 @@ spec:
description: Components record the related Components created
by Application Controller
items:
description: |-
ObjectReference contains enough information to let you inspect or modify the referred object.
---
New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs.
1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage.
2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular
restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted".
Those cannot be well described when embedded.
3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen.
4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity
during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple
and the version of the actual struct is irrelevant.
5. We cannot easily change it. Because this type is embedded in many locations, updates to this type
will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control.
Instead of using this type, create a locally provided and used type that is well-focused on your reference.
For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .
description: ObjectReference contains enough information
to let you inspect or modify the referred object.
properties:
apiVersion:
description: API version of the referent.
@ -460,7 +443,6 @@ spec:
the event) or if no container name is specified "spec.containers[2]" (container with
index 2 in this pod). This syntax is chosen only to have some well-defined way of
referencing a part of an object.
TODO: this design is not final and this field is subject to change in the future.
type: string
kind:
description: |-
@ -589,24 +571,8 @@ spec:
type: string
scopes:
items:
description: |-
ObjectReference contains enough information to let you inspect or modify the referred object.
---
New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs.
1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage.
2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular
restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted".
Those cannot be well described when embedded.
3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen.
4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity
during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple
and the version of the actual struct is irrelevant.
5. We cannot easily change it. Because this type is embedded in many locations, updates to this type
will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control.
Instead of using this type, create a locally provided and used type that is well-focused on your reference.
For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .
description: ObjectReference contains enough information
to let you inspect or modify the referred object.
properties:
apiVersion:
description: API version of the referent.
@ -620,7 +586,6 @@ spec:
the event) or if no container name is specified "spec.containers[2]" (container with
index 2 in this pod). This syntax is chosen only to have some well-defined way of
referencing a part of an object.
TODO: this design is not final and this field is subject to change in the future.
type: string
kind:
description: |-
@ -693,24 +658,8 @@ spec:
appRevision:
type: string
contextBackend:
description: |-
ObjectReference contains enough information to let you inspect or modify the referred object.
---
New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs.
1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage.
2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular
restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted".
Those cannot be well described when embedded.
3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen.
4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity
during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple
and the version of the actual struct is irrelevant.
5. We cannot easily change it. Because this type is embedded in many locations, updates to this type
will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control.
Instead of using this type, create a locally provided and used type that is well-focused on your reference.
For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .
description: ObjectReference contains enough information
to let you inspect or modify the referred object.
properties:
apiVersion:
description: API version of the referent.
@ -724,7 +673,6 @@ spec:
the event) or if no container name is specified "spec.containers[2]" (container with
index 2 in this pod). This syntax is chosen only to have some well-defined way of
referencing a part of an object.
TODO: this design is not final and this field is subject to change in the future.
type: string
kind:
description: |-
@ -2403,24 +2351,8 @@ spec:
appRevision:
type: string
contextBackend:
description: |-
ObjectReference contains enough information to let you inspect or modify the referred object.
---
New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs.
1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage.
2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular
restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted".
Those cannot be well described when embedded.
3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen.
4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity
during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple
and the version of the actual struct is irrelevant.
5. We cannot easily change it. Because this type is embedded in many locations, updates to this type
will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control.
Instead of using this type, create a locally provided and used type that is well-focused on your reference.
For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .
description: ObjectReference contains enough information to let
you inspect or modify the referred object.
properties:
apiVersion:
description: API version of the referent.
@ -2434,7 +2366,6 @@ spec:
the event) or if no container name is specified "spec.containers[2]" (container with
index 2 in this pod). This syntax is chosen only to have some well-defined way of
referencing a part of an object.
TODO: this design is not final and this field is subject to change in the future.
type: string
kind:
description: |-

View File

@ -3,7 +3,7 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: vela-system/kubevela-vela-core-root-cert
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.5
name: applications.core.oam.dev
spec:
group: core.oam.dev
@ -345,7 +345,6 @@ spec:
the event) or if no container name is specified "spec.containers[2]" (container with
index 2 in this pod). This syntax is chosen only to have some well-defined way of
referencing a part of an object.
TODO: this design is not final and this field is subject to change in the future.
type: string
kind:
description: |-
@ -379,24 +378,8 @@ spec:
description: Components record the related Components created by Application
Controller
items:
description: |-
ObjectReference contains enough information to let you inspect or modify the referred object.
---
New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs.
1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage.
2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular
restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted".
Those cannot be well described when embedded.
3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen.
4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity
during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple
and the version of the actual struct is irrelevant.
5. We cannot easily change it. Because this type is embedded in many locations, updates to this type
will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control.
Instead of using this type, create a locally provided and used type that is well-focused on your reference.
For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .
description: ObjectReference contains enough information to let
you inspect or modify the referred object.
properties:
apiVersion:
description: API version of the referent.
@ -410,7 +393,6 @@ spec:
the event) or if no container name is specified "spec.containers[2]" (container with
index 2 in this pod). This syntax is chosen only to have some well-defined way of
referencing a part of an object.
TODO: this design is not final and this field is subject to change in the future.
type: string
kind:
description: |-
@ -537,24 +519,8 @@ spec:
type: string
scopes:
items:
description: |-
ObjectReference contains enough information to let you inspect or modify the referred object.
---
New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs.
1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage.
2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular
restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted".
Those cannot be well described when embedded.
3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen.
4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity
during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple
and the version of the actual struct is irrelevant.
5. We cannot easily change it. Because this type is embedded in many locations, updates to this type
will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control.
Instead of using this type, create a locally provided and used type that is well-focused on your reference.
For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .
description: ObjectReference contains enough information to
let you inspect or modify the referred object.
properties:
apiVersion:
description: API version of the referent.
@ -568,7 +534,6 @@ spec:
the event) or if no container name is specified "spec.containers[2]" (container with
index 2 in this pod). This syntax is chosen only to have some well-defined way of
referencing a part of an object.
TODO: this design is not final and this field is subject to change in the future.
type: string
kind:
description: |-
@ -641,24 +606,8 @@ spec:
appRevision:
type: string
contextBackend:
description: |-
ObjectReference contains enough information to let you inspect or modify the referred object.
---
New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs.
1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage.
2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular
restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted".
Those cannot be well described when embedded.
3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen.
4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity
during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple
and the version of the actual struct is irrelevant.
5. We cannot easily change it. Because this type is embedded in many locations, updates to this type
will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control.
Instead of using this type, create a locally provided and used type that is well-focused on your reference.
For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .
description: ObjectReference contains enough information to let
you inspect or modify the referred object.
properties:
apiVersion:
description: API version of the referent.
@ -672,7 +621,6 @@ spec:
the event) or if no container name is specified "spec.containers[2]" (container with
index 2 in this pod). This syntax is chosen only to have some well-defined way of
referencing a part of an object.
TODO: this design is not final and this field is subject to change in the future.
type: string
kind:
description: |-

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.5
name: componentdefinitions.core.oam.dev
spec:
group: core.oam.dev

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.5
name: definitionrevisions.core.oam.dev
spec:
group: core.oam.dev

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.5
name: policies.core.oam.dev
spec:
group: core.oam.dev

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.5
name: policydefinitions.core.oam.dev
spec:
group: core.oam.dev

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.5
name: resourcetrackers.core.oam.dev
spec:
group: core.oam.dev
@ -96,7 +96,6 @@ spec:
the event) or if no container name is specified "spec.containers[2]" (container with
index 2 in this pod). This syntax is chosen only to have some well-defined way of
referencing a part of an object.
TODO: this design is not final and this field is subject to change in the future.
type: string
kind:
description: |-

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.5
name: traitdefinitions.core.oam.dev
spec:
group: core.oam.dev

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.5
name: workflowstepdefinitions.core.oam.dev
spec:
group: core.oam.dev

View File

@ -42,7 +42,7 @@ func TestPreStartHook(t *testing.T) {
var _ = Describe("Test pre-start hooks", func() {
It("Test SystemCRDValidationHook", func() {
defer featuregatetesting.SetFeatureGateDuringTest(&testing.T{}, utilfeature.DefaultFeatureGate, features.ZstdApplicationRevision, true)()
featuregatetesting.SetFeatureGateDuringTest(GinkgoT(), utilfeature.DefaultFeatureGate, features.ZstdApplicationRevision, true)
ctx := context.Background()
Expect(k8s.EnsureNamespace(ctx, singleton.KubeClient.Get(), types.DefaultKubeVelaNS)).Should(Succeed())
err := hooks.NewSystemCRDValidationHook().Run(ctx)

147
go.mod
View File

@ -17,9 +17,9 @@ require (
github.com/crossplane/crossplane-runtime v1.16.0
github.com/cue-exp/kubevelafix v0.0.0-20220922150317-aead819d979d
github.com/dave/jennifer v1.6.1
github.com/davecgh/go-spew v1.1.1
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
github.com/ettle/strcase v0.2.0
github.com/fatih/color v1.16.0
github.com/fatih/color v1.18.0
github.com/fluxcd/helm-controller/api v0.32.2
github.com/fluxcd/source-controller/api v0.30.0
github.com/form3tech-oss/jwt-go v3.2.5+incompatible
@ -38,29 +38,29 @@ require (
github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174
github.com/imdario/mergo v0.3.16
github.com/jeremywohl/flatten/v2 v2.0.0-20211013061545-07e4a09fb8e4
github.com/kubevela/pkg v1.9.3-0.20241203070234-2cf98778c0a9
github.com/kubevela/workflow v0.6.2
github.com/kubevela/pkg v1.9.3-0.20250625225831-a2894a62a307
github.com/kubevela/workflow v0.6.3-0.20250717221743-56b80cee4121
github.com/kyokomi/emoji v2.2.4+incompatible
github.com/magiconair/properties v1.8.7
github.com/mattn/go-runewidth v0.0.15
github.com/mitchellh/hashstructure/v2 v2.0.2
github.com/nacos-group/nacos-sdk-go/v2 v2.2.2
github.com/oam-dev/cluster-gateway v1.9.1-0.20241120140625-33c8891b781c
github.com/oam-dev/cluster-register v1.0.4-0.20230424040021-147f7c1fefe5
github.com/oam-dev/cluster-gateway v1.9.2-0.20250629203450-2b04dd452b7a
github.com/oam-dev/cluster-register v1.0.4-0.20250624042630-618dfa13eb5b
github.com/oam-dev/terraform-config-inspect v0.0.0-20210418082552-fc72d929aa28
github.com/oam-dev/terraform-controller v0.8.0
github.com/oam-dev/terraform-controller v0.8.1-0.20250707044258-c0557127de25
github.com/olekukonko/tablewriter v0.0.5
github.com/onsi/ginkgo/v2 v2.19.0
github.com/onsi/gomega v1.34.1
github.com/onsi/ginkgo/v2 v2.23.3
github.com/onsi/gomega v1.36.2
github.com/openkruise/kruise-api v1.4.0
github.com/openkruise/rollouts v0.3.0
github.com/pelletier/go-toml v1.9.5
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.18.0
github.com/prometheus/client_model v0.5.0
github.com/prometheus/client_golang v1.20.5
github.com/prometheus/client_model v0.6.1
github.com/rivo/tview v0.0.0-20221128165837-db36428c92d9
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.8.0
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.10.0
github.com/tidwall/gjson v1.14.4
@ -69,31 +69,31 @@ require (
gitlab.com/gitlab-org/api/client-go v0.127.0
go.uber.org/multierr v1.11.0
golang.org/x/crypto v0.37.0
golang.org/x/mod v0.21.0
golang.org/x/mod v0.24.0
golang.org/x/oauth2 v0.29.0
golang.org/x/sync v0.13.0
golang.org/x/term v0.31.0
golang.org/x/text v0.24.0
golang.org/x/tools v0.26.0
golang.org/x/tools v0.31.0
gomodules.xyz/jsonpatch/v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
helm.sh/helm/v3 v3.14.4
k8s.io/api v0.29.2
k8s.io/apiextensions-apiserver v0.29.2
k8s.io/apimachinery v0.29.2
k8s.io/apiserver v0.29.2
k8s.io/cli-runtime v0.29.2
k8s.io/client-go v0.29.2
k8s.io/component-base v0.29.2
k8s.io/api v0.31.10
k8s.io/apiextensions-apiserver v0.31.10
k8s.io/apimachinery v0.31.10
k8s.io/apiserver v0.31.10
k8s.io/cli-runtime v0.31.10
k8s.io/client-go v0.31.10
k8s.io/component-base v0.31.10
k8s.io/helm v2.17.0+incompatible
k8s.io/klog/v2 v2.120.1
k8s.io/kube-aggregator v0.27.2
k8s.io/kubectl v0.29.2
k8s.io/metrics v0.29.2
k8s.io/utils v0.0.0-20240310230437-4693a0247e57
k8s.io/klog/v2 v2.130.1
k8s.io/kube-aggregator v0.31.10
k8s.io/kubectl v0.31.10
k8s.io/metrics v0.31.10
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397
open-cluster-management.io/api v0.11.0
sigs.k8s.io/controller-runtime v0.17.6
sigs.k8s.io/controller-tools v0.14.0
sigs.k8s.io/controller-runtime v0.19.7
sigs.k8s.io/controller-tools v0.16.5
sigs.k8s.io/gateway-api v0.7.1
sigs.k8s.io/kind v0.20.0
sigs.k8s.io/yaml v1.4.0
@ -117,15 +117,15 @@ require (
github.com/agext/levenshtein v1.2.3 // indirect
github.com/alessio/shellescape v1.4.1 // indirect
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1704 // indirect
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/buger/jsonparser v1.1.1 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chai2010/gettext-go v1.0.2 // indirect
github.com/cloudflare/circl v1.6.1 // indirect
github.com/cockroachdb/apd/v3 v3.2.1 // indirect
@ -135,7 +135,7 @@ require (
github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect
github.com/coreos/go-semver v0.3.1 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
github.com/creack/pty v1.1.18 // indirect
github.com/cyphar/filepath-securejoin v0.4.1 // indirect
github.com/distribution/reference v0.6.0 // indirect
@ -148,8 +148,8 @@ require (
github.com/emicklei/go-restful/v3 v3.12.0 // indirect
github.com/emicklei/proto v1.10.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/evanphx/json-patch v5.9.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.8.0 // indirect
github.com/evanphx/json-patch v5.7.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
github.com/fatih/camelcase v1.0.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
@ -157,7 +157,7 @@ require (
github.com/fluxcd/pkg/apis/kustomize v1.0.0 // indirect
github.com/fluxcd/pkg/apis/meta v1.0.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fvbommel/sortorder v1.1.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/gdamore/encoding v1.0.0 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-errors/errors v1.5.1 // indirect
@ -171,17 +171,17 @@ require (
github.com/go-openapi/swag v0.23.0 // indirect
github.com/go-stack/stack v1.8.1 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/gobuffalo/flect v1.0.2 // indirect
github.com/gobuffalo/flect v1.0.3 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/cel-go v0.17.7 // indirect
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
github.com/google/cel-go v0.20.1 // indirect
github.com/google/gnostic-models v0.6.9 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect
github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 // indirect
github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/uuid v1.6.0 // indirect
@ -189,7 +189,7 @@ require (
github.com/gorilla/websocket v1.5.0 // indirect
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
@ -205,8 +205,9 @@ require (
github.com/json-iterator/go v1.1.12 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.17.7 // indirect
github.com/klauspost/compress v1.17.10 // indirect
github.com/kr/pty v1.1.8 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
github.com/lib/pq v1.10.9 // indirect
@ -215,14 +216,13 @@ require (
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/moby/locker v1.0.1 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/moby/spdystream v0.4.0 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
@ -238,9 +238,9 @@ require (
github.com/perimeterx/marshmallow v1.1.5 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pjbgf/sha1cd v0.3.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/protocolbuffers/txtpbfmt v0.0.0-20230328191034-3462fbc510c0 // indirect
github.com/rivo/uniseg v0.4.3 // indirect
github.com/robfig/cron/v3 v3.0.1 // indirect
@ -255,23 +255,24 @@ require (
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/vbatts/tar-split v0.11.5 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
github.com/zclconf/go-cty v1.13.0 // indirect
go.etcd.io/etcd/api/v3 v3.5.10 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.10 // indirect
go.etcd.io/etcd/client/v3 v3.5.10 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect
go.opentelemetry.io/otel v1.21.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 // indirect
go.opentelemetry.io/otel/metric v1.21.0 // indirect
go.opentelemetry.io/otel/sdk v1.21.0 // indirect
go.opentelemetry.io/otel/trace v1.21.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
go.etcd.io/etcd/api/v3 v3.5.16 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.16 // indirect
go.etcd.io/etcd/client/v3 v3.5.16 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 // indirect
go.opentelemetry.io/otel/metric v1.28.0 // indirect
go.opentelemetry.io/otel/sdk v1.28.0 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
go.starlark.net v0.0.0-20240329153429-e6e8e7ce1b7a // indirect
go.uber.org/automaxprocs v1.5.3 // indirect
go.uber.org/zap v1.26.0 // indirect
@ -280,12 +281,12 @@ require (
golang.org/x/sys v0.32.0 // indirect
golang.org/x/time v0.10.0 // indirect
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect
google.golang.org/grpc v1.63.0 // indirect
google.golang.org/protobuf v1.35.2 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect
google.golang.org/grpc v1.67.1 // indirect
google.golang.org/protobuf v1.36.5 // indirect
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
gopkg.in/evanphx/json-patch.v5 v5.9.0 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
@ -293,16 +294,17 @@ require (
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/klog v1.0.0 // indirect
k8s.io/kms v0.29.3 // indirect
k8s.io/kube-openapi v0.0.0-20240403164606-bc84c2ddaf99 // indirect
k8s.io/kms v0.31.10 // indirect
k8s.io/kube-openapi v0.0.0-20250610211856-8b98d1ed966a // indirect
oras.land/oras-go v1.2.5 // indirect
sigs.k8s.io/apiserver-network-proxy v0.0.30 // indirect
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0 // indirect
sigs.k8s.io/apiserver-runtime v1.1.2-0.20221118041430-0a6394f6dda3 // indirect
sigs.k8s.io/apiserver-network-proxy v0.31.4 // indirect
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.3 // indirect
sigs.k8s.io/apiserver-runtime v1.1.2-0.20250117204231-9282f514a674 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/kustomize/api v0.16.0 // indirect
sigs.k8s.io/kustomize/kyaml v0.16.0 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/kustomize/api v0.17.2 // indirect
sigs.k8s.io/kustomize/kyaml v0.17.1 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect
)
replace (
@ -311,7 +313,6 @@ replace (
github.com/docker/docker => github.com/docker/docker v25.0.6+incompatible
github.com/docker/docker-credential-helpers => github.com/docker/docker-credential-helpers v0.7.0
github.com/wercker/stern => github.com/oam-dev/stern v1.13.2
k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00
sigs.k8s.io/apiserver-network-proxy/konnectivity-client => sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.36
sigs.k8s.io/apiserver-runtime => github.com/kmodules/apiserver-runtime v1.1.2-0.20240303184316-6365e03bf9ac
sigs.k8s.io/apiserver-runtime => github.com/kmodules/apiserver-runtime v1.1.2-0.20250422194347-c5ac4abaf2ae
)

774
go.sum

File diff suppressed because it is too large Load Diff

View File

@ -44,22 +44,43 @@ EOF
}
clientGen() {
# TODO: better migrate this to kube_codegen.sh (https://github.com/kubernetes/sample-controller/blob/master/hack/update-codegen.sh)
chmod +x ./vendor/k8s.io/code-generator/generate-groups.sh
# Using kube_codegen.sh as generate-groups.sh has been removed
chmod +x ./vendor/k8s.io/code-generator/kube_codegen.sh
chmod +x ./vendor/k8s.io/code-generator/generate-internal-groups.sh
bash ./vendor/k8s.io/code-generator/generate-groups.sh "${CODEGEN_GENERATORS}" \
${OUTPUT_PACKAGE} \
${APIS_PACKAGE} \
"${CODEGEN_GROUP_VERSIONS}" \
--output-base "${OUTPUT_DIR}" \
--go-header-file "${BOILERPLATE_FILE}"
# kube_codegen.sh uses different syntax - call it via the kube_codegen module
source ./vendor/k8s.io/code-generator/kube_codegen.sh
# Generate code using the new API
kube::codegen::gen_client \
--with-watch \
--output-dir "${OUTPUT_DIR}" \
--output-pkg "${OUTPUT_PACKAGE}" \
--boilerplate "${BOILERPLATE_FILE}" \
"./apis"
rm -rf ./pkg/generated/
mkdir -p ./pkg/generated/
mv "${WORK_TEMP_DIR}/github.com/oam-dev/kubevela/pkg/generated/client" ./pkg/generated/
# Move the generated client code
if [ -d "${WORK_TEMP_DIR}/clientset" ] || [ -d "${WORK_TEMP_DIR}/informers" ] || [ -d "${WORK_TEMP_DIR}/listers" ]; then
mkdir -p ./pkg/generated/client
if [ -d "${WORK_TEMP_DIR}/clientset" ]; then
mv "${WORK_TEMP_DIR}/clientset" ./pkg/generated/client/
fi
if [ -d "${WORK_TEMP_DIR}/informers" ]; then
mv "${WORK_TEMP_DIR}/informers" ./pkg/generated/client/
fi
if [ -d "${WORK_TEMP_DIR}/listers" ]; then
mv "${WORK_TEMP_DIR}/listers" ./pkg/generated/client/
fi
else
echo "Warning: Generated client directories not found"
find "${WORK_TEMP_DIR}" -type d 2>/dev/null || true
fi
}
EXPECTED_CONTROLLER_GEN_VERSION=v0.14.0
EXPECTED_CONTROLLER_GEN_VERSION=v0.16.5
CONTROLLER_GEN="$(go env GOPATH)"/bin/controller-gen
deepcopyGen() {

View File

@ -4,7 +4,7 @@ $(LOCALBIN):
GOLANGCILINT_VERSION ?= 1.60.1
GLOBAL_GOLANGCILINT := $(shell which golangci-lint)
GOBIN_GOLANGCILINT:= $(shell which $(GOBIN)/golangci-lint)
ENVTEST_K8S_VERSION = 1.29.0
ENVTEST_K8S_VERSION = 1.31.0
ENVTEST ?= $(LOCALBIN)/setup-envtest
.PHONY: golangci

View File

@ -47,7 +47,7 @@ func (rt *testRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)
}
func TestImpersonatingRoundTripper(t *testing.T) {
defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.AuthenticateApplication, true)()
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.AuthenticateApplication, true)
AuthenticationWithUser = true
defer func() {
AuthenticationWithUser = false

View File

@ -32,7 +32,7 @@ import (
)
func TestContextWithUserInfo(t *testing.T) {
defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.AuthenticateApplication, true)()
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.AuthenticateApplication, true)
AuthenticationWithUser = true
defer func() {
AuthenticationWithUser = false

View File

@ -80,8 +80,8 @@ var _ = AfterSuite(func() {
var _ = Describe("Test ref-objects functions", func() {
It("Test SelectRefObjectsForDispatch", func() {
defer featuregatetesting.SetFeatureGateDuringTest(&testing.T{}, utilfeature.DefaultFeatureGate, features.LegacyObjectTypeIdentifier, true)()
defer featuregatetesting.SetFeatureGateDuringTest(&testing.T{}, utilfeature.DefaultFeatureGate, features.DeprecatedObjectLabelSelector, true)()
featuregatetesting.SetFeatureGateDuringTest(GinkgoT(), utilfeature.DefaultFeatureGate, features.LegacyObjectTypeIdentifier, true)
featuregatetesting.SetFeatureGateDuringTest(GinkgoT(), utilfeature.DefaultFeatureGate, features.DeprecatedObjectLabelSelector, true)
By("Create objects")
Expect(k8sClient.Create(context.Background(), &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "test"}})).Should(Succeed())
for _, obj := range []client.Object{&corev1.ConfigMap{

View File

@ -759,7 +759,7 @@ var _ = Describe("Test Application Controller", func() {
})
It("application with dag workflow failed after retries", func() {
defer featuregatetesting.SetFeatureGateDuringTest(&testing.T{}, utilfeature.DefaultFeatureGate, wffeatures.EnableSuspendOnFailure, true)()
featuregatetesting.SetFeatureGateDuringTest(GinkgoT(), utilfeature.DefaultFeatureGate, wffeatures.EnableSuspendOnFailure, true)
ns := corev1.Namespace{
ObjectMeta: metav1.ObjectMeta{
Name: "dag-failed-after-retries",
@ -861,7 +861,7 @@ var _ = Describe("Test Application Controller", func() {
})
It("application with step by step workflow failed after retries", func() {
defer featuregatetesting.SetFeatureGateDuringTest(&testing.T{}, utilfeature.DefaultFeatureGate, wffeatures.EnableSuspendOnFailure, true)()
featuregatetesting.SetFeatureGateDuringTest(GinkgoT(), utilfeature.DefaultFeatureGate, wffeatures.EnableSuspendOnFailure, true)
ns := corev1.Namespace{
ObjectMeta: metav1.ObjectMeta{
Name: "step-by-step-failed-after-retries",
@ -3891,7 +3891,7 @@ var _ = Describe("Test Application Controller", func() {
})
It("test application with healthy and PreDispatch trait", func() {
defer featuregatetesting.SetFeatureGateDuringTest(&testing.T{}, utilfeature.DefaultFeatureGate, features.MultiStageComponentApply, true)()
featuregatetesting.SetFeatureGateDuringTest(GinkgoT(), utilfeature.DefaultFeatureGate, features.MultiStageComponentApply, true)
By("create the new namespace")
ns := &corev1.Namespace{
ObjectMeta: metav1.ObjectMeta{
@ -3941,7 +3941,7 @@ var _ = Describe("Test Application Controller", func() {
})
It("test application with unhealthy and PreDispatch trait", func() {
defer featuregatetesting.SetFeatureGateDuringTest(&testing.T{}, utilfeature.DefaultFeatureGate, features.MultiStageComponentApply, true)()
featuregatetesting.SetFeatureGateDuringTest(GinkgoT(), utilfeature.DefaultFeatureGate, features.MultiStageComponentApply, true)
By("create the new namespace")
ns := &corev1.Namespace{
ObjectMeta: metav1.ObjectMeta{

View File

@ -40,7 +40,7 @@ import (
)
func TestGetClusterLabelSelectorInTopology(t *testing.T) {
defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.DeprecatedPolicySpec, true)()
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.DeprecatedPolicySpec, true)
multicluster.ClusterGatewaySecretNamespace = types.DefaultKubeVelaNS
cli := fake.NewClientBuilder().WithScheme(common.Scheme).WithObjects(&corev1.Secret{
ObjectMeta: metav1.ObjectMeta{

View File

@ -67,7 +67,7 @@ var _ = Describe("Test ResourceKeeper garbage collection", func() {
})
It("Test gcHandler garbage collect legacy RT", func() {
defer featuregatetesting.SetFeatureGateDuringTest(&testing.T{}, utilfeature.DefaultFeatureGate, features.LegacyResourceTrackerGC, true)()
featuregatetesting.SetFeatureGateDuringTest(&testing.T{}, utilfeature.DefaultFeatureGate, features.LegacyResourceTrackerGC, true)
version.VelaVersion = velaVersionNumberToUpgradeResourceTracker
ctx := context.Background()
cli := multicluster.NewFakeClient(testClient)

View File

@ -42,7 +42,7 @@ import (
// MutatingHandler adding user info to application annotations
type MutatingHandler struct {
skipUsers []string
Decoder *admission.Decoder
Decoder admission.Decoder
}
var _ admission.Handler = &MutatingHandler{}

View File

@ -49,7 +49,7 @@ var cfg *rest.Config
var k8sClient client.Client
var testEnv *envtest.Environment
var testScheme = runtime.NewScheme()
var decoder *admission.Decoder
var decoder admission.Decoder
var ctx = context.Background()
var handler *ValidatingHandler

View File

@ -40,7 +40,7 @@ var _ admission.Handler = &ValidatingHandler{}
type ValidatingHandler struct {
Client client.Client
// Decoder decodes objects
Decoder *admission.Decoder
Decoder admission.Decoder
}
func simplifyError(err error) error {

View File

@ -40,7 +40,7 @@ import (
type MutatingHandler struct {
Client client.Client
// Decoder decodes objects
Decoder *admission.Decoder
Decoder admission.Decoder
// AutoGenWorkloadDef indicates whether create workloadDef which componentDef refers to
AutoGenWorkloadDef bool
}

View File

@ -40,7 +40,7 @@ var componentDefGVR = v1beta1.SchemeGroupVersion.WithResource("componentdefiniti
// ValidatingHandler handles validation of component definition
type ValidatingHandler struct {
// Decoder decodes object
Decoder *admission.Decoder
Decoder admission.Decoder
Client client.Client
}

View File

@ -44,7 +44,7 @@ import (
var handler ValidatingHandler
var req admission.Request
var reqResource metav1.GroupVersionResource
var decoder *admission.Decoder
var decoder admission.Decoder
var cd v1beta1.ComponentDefinition
var cdRaw []byte
var testScheme = runtime.NewScheme()

View File

@ -37,7 +37,7 @@ var policyDefGVR = v1beta1.SchemeGroupVersion.WithResource("policydefinitions")
// ValidatingHandler handles validation of policy definition
type ValidatingHandler struct {
// Decoder decodes object
Decoder *admission.Decoder
Decoder admission.Decoder
Client client.Client
}

View File

@ -41,7 +41,7 @@ import (
var handler ValidatingHandler
var req admission.Request
var reqResource metav1.GroupVersionResource
var decoder *admission.Decoder
var decoder admission.Decoder
var pd v1beta1.PolicyDefinition
var pdRaw []byte
var scheme = runtime.NewScheme()

View File

@ -49,7 +49,7 @@ type ValidatingHandler struct {
Client client.Client
// Decoder decodes object
Decoder *admission.Decoder
Decoder admission.Decoder
// Validators validate objects
Validators []TraitDefValidator
}

View File

@ -43,7 +43,7 @@ import (
var handler ValidatingHandler
var req admission.Request
var reqResource metav1.GroupVersionResource
var decoder *admission.Decoder
var decoder admission.Decoder
var td v1beta1.TraitDefinition
var tdRaw []byte
var scheme = runtime.NewScheme()

View File

@ -37,7 +37,7 @@ var workflowStepDefGVR = v1beta1.SchemeGroupVersion.WithResource("workflowstepde
// ValidatingHandler handles validation of workflow step definition
type ValidatingHandler struct {
// Decoder decodes object
Decoder *admission.Decoder
Decoder admission.Decoder
Client client.Client
}
@ -48,7 +48,7 @@ func (h *ValidatingHandler) InjectClient(c client.Client) error {
}
// InjectDecoder injects the decoder into the ValidatingHandler
func (h *ValidatingHandler) InjectDecoder(d *admission.Decoder) error {
func (h *ValidatingHandler) InjectDecoder(d admission.Decoder) error {
h.Decoder = d
return nil
}

View File

@ -41,7 +41,7 @@ import (
var handler ValidatingHandler
var reqResource metav1.GroupVersionResource
var decoder *admission.Decoder
var decoder admission.Decoder
var td v1beta1.WorkflowStepDefinition
var validCueTemplate string
var inValidCueTemplate string

View File

@ -309,7 +309,7 @@ func (o *VelaPortForwardOptions) Run() error {
}
}()
return o.kcPortForwardOptions.RunPortForward()
return o.kcPortForwardOptions.RunPortForwardContext(o.Ctx)
}
func splitPort(port string) (local, remote string) {

View File

@ -282,24 +282,38 @@ var _ = Describe("Test multicluster standalone scenario", func() {
Eventually(func(g Gomega) {
_, err = execCommand("workflow", "suspend", "busybox", "-n", namespace)
g.Expect(err).Should(Succeed())
}).WithTimeout(10 * time.Second).Should(Succeed())
}).WithTimeout(30 * time.Second).Should(Succeed())
Eventually(func(g Gomega) {
_, err = execCommand("workflow", "rollback", "busybox", "-n", namespace)
g.Expect(err).Should(Succeed())
}).WithTimeout(10 * time.Second).Should(Succeed())
}).WithTimeout(30 * time.Second).Should(Succeed())
By("Wait for application to be running after rollback")
Eventually(func(g Gomega) {
g.Expect(k8sClient.Get(hubCtx, appKey, app)).Should(Succeed())
g.Expect(app.Status.Phase).Should(Equal(oamcomm.ApplicationRunning))
}).WithTimeout(5 * time.Minute).WithPolling(5 * time.Second).Should(Succeed())
By("Verify deployment image rollback")
Eventually(func(g Gomega) {
deploy := &v1.Deployment{}
g.Expect(k8sClient.Get(workerCtx, types.NamespacedName{Namespace: namespace, Name: "busybox"}, deploy)).Should(Succeed())
g.Expect(deploy.Spec.Template.Spec.Containers[0].Image).Should(Equal("busybox"))
}).WithTimeout(5 * time.Minute).WithPolling(5 * time.Second).Should(Succeed())
By("Verify referred object state rollback")
Eventually(func(g Gomega) {
deploy := &v1.Deployment{}
g.Expect(k8sClient.Get(workerCtx, types.NamespacedName{Namespace: namespace, Name: "busybox-ref"}, deploy)).Should(Succeed())
g.Expect(deploy.Spec.Replicas).Should(Equal(ptr.To(int32(0))))
}).WithTimeout(5 * time.Minute).WithPolling(5 * time.Second).Should(Succeed())
By("Verify application revisions")
Eventually(func(g Gomega) {
revs, err := application.GetSortedAppRevisions(hubCtx, k8sClient, app.Name, namespace)
g.Expect(err).Should(Succeed())
g.Expect(len(revs)).Should(Equal(1))
}).WithTimeout(5 * time.Minute).WithPolling(2 * time.Second).Should(Succeed())
g.Expect(len(revs)).Should(BeNumerically(">=", 1))
}).WithTimeout(5 * time.Minute).WithPolling(5 * time.Second).Should(Succeed())
})
It("Test large application parallel apply and delete", func() {

View File

@ -362,10 +362,9 @@ var _ = Describe("Test application of the specified definition version", func()
return k8sClient.Get(ctx, client.ObjectKey{Name: jobName, Namespace: namespace}, workerJob)
}, 30*time.Second, 3*time.Second).Should(Succeed())
By("Verify trait is applied to the workload")
By("Verify if trait is applied to the workload")
webserviceV1Labels := webServiceV1Deploy.GetLabels()
Expect(webserviceV1Labels["hello"]).Should(Equal("kubevela"))
By("Check Application is rendered by the specified version of the Definition")
Expect(webServiceV1Deploy.Labels["componentdefinition.oam.dev/version"]).Should(Equal("v1"))
Expect(webServiceV1Deploy.Labels["traitdefinition.oam.dev/version"]).Should(Equal("v1"))