feat: create extensionVersions by depth (#6286)

* feat: create extensionVersions by depth

* Apply suggestions from code review

Signed-off-by: hongming <coder.scala@gmail.com>

* Apply suggestions from code review

Signed-off-by: hongming <coder.scala@gmail.com>

---------

Signed-off-by: hongming <coder.scala@gmail.com>
Co-authored-by: joyceliu <joyceliu@yunify.com>
Co-authored-by: hongming <coder.scala@gmail.com>
This commit is contained in:
liujian
2024-11-26 10:47:36 +08:00
committed by GitHub
parent 238bd67b8f
commit 9c962d3cbf
7 changed files with 182 additions and 23 deletions

View File

@@ -40,3 +40,7 @@ const (
ExecutorUpgradeHookImageAnnotation = "executor-hook-image.kubesphere.io/upgrade"
ExecutorUninstallHookImageAnnotation = "executor-hook-image.kubesphere.io/uninstall"
)
const (
DefaultRepositoryDepth = 3
)

View File

@@ -29,6 +29,9 @@ type RepositorySpec struct {
CABundle string `json:"caBundle,omitempty"`
// --insecure-skip-tls-verify. default false
Insecure bool `json:"insecure,omitempty"`
// The maximum number of synchronized versions for each extension. A value of 0 indicates that all versions will be synchronized. The default is 3.
// +optional
Depth *int `json:"depth,omitempty"`
}
type RepositoryStatus struct {

View File

@@ -754,6 +754,11 @@ func (in *RepositorySpec) DeepCopyInto(out *RepositorySpec) {
*out = new(UpdateStrategy)
**out = **in
}
if in.Depth != nil {
in, out := &in.Depth, &out.Depth
*out = new(int)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositorySpec.