Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

replicas = -1 表示对等架构 #112

Merged
merged 2 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions module-controller/api/v1alpha1/moduledeployment_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,6 @@ const (
CafeDeploymentReleaseProgressTermed ReleaseProgress = "Terminated"
)

type DeployType string

const (
ModuleDeploymentDeployTypeSymmetric DeployType = "symmetric"
ModuleDeploymentDeployTypeAsymmetric DeployType = "asymmetric"
)

type ModuleSchedulingType string

const (
Expand Down Expand Up @@ -127,9 +120,7 @@ type ModuleDeploymentSpec struct {

Template ModuleTemplateSpec `json:"template,omitempty"`

// +kubebuilder:validation:Enum={"symmetric","asymmetric"}
DeployType DeployType `json:"deployType"`

// +kubebuilder:validation:Minimum=-1
Replicas int32 `json:"replicas,omitempty"`

MinReadySeconds int32 `json:"minReadySeconds,omitempty"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ spec:
Important: Run "make" to regenerate code after modifying this file'
minLength: 1
type: string
deployType:
enum:
- symmetric
- asymmetric
type: string
minReadySeconds:
format: int32
type: integer
Expand All @@ -56,6 +51,7 @@ spec:
type: integer
replicas:
format: int32
minimum: -1
type: integer
revisionHistoryLimit:
format: int32
Expand Down Expand Up @@ -175,7 +171,6 @@ spec:
type: object
required:
- baseDeploymentName
- deployType
type: object
status:
description: ModuleDeploymentStatus defines the observed state of ModuleDeployment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ spec:
name: dynamic-provider
version: '1.0.0'
url: http://serverless-opensource.oss-cn-shanghai.aliyuncs.com/module-packages/stable/dynamic-provider-1.0.0-ark-biz.jar
deployType: symmetric
replicas: 1
strategy:
upgradeType: installAndUninstall
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/sofastack/sofa-serverless/api/v1alpha1"
moduledeploymentv1alpha1 "github.com/sofastack/sofa-serverless/api/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
Expand Down Expand Up @@ -98,7 +97,6 @@ func prepareModuleDeployment(namespace, moduleDeploymentName string) v1alpha1.Mo
moduleDeployment := v1alpha1.ModuleDeployment{
Spec: v1alpha1.ModuleDeploymentSpec{
BaseDeploymentName: baseDeploymentName,
DeployType: moduledeploymentv1alpha1.ModuleDeploymentDeployTypeSymmetric,
Template: v1alpha1.ModuleTemplateSpec{
Spec: v1alpha1.ModuleSpec{
Module: v1alpha1.ModuleInfo{
Expand Down