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

Commit d36c6ff

Browse files
author
jinle.xjl
committed
module controller 0.3 bugfix and unit test fix
1 parent 30202da commit d36c6ff

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

module-controller/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ RUN go mod download
1414
# Copy the go source
1515
COPY cmd/main.go cmd/main.go
1616
COPY api/ api/
17-
COPY internal/controller/ internal/controller/
17+
COPY internal/ internal/
1818

1919
# Build
2020
# the GOARCH has not a default value to allow the binary be built according to the host where the command

module-controller/config/crd/bases/serverless.alipay.com_moduledeployments.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ spec:
3434
spec:
3535
description: ModuleDeploymentSpec defines the desired state of ModuleDeployment
3636
properties:
37-
BaseDeploymentName:
37+
baseDeploymentName:
3838
description: 'INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
3939
Important: Run "make" to regenerate code after modifying this file'
4040
type: string
@@ -158,7 +158,7 @@ spec:
158158
type: object
159159
type: object
160160
required:
161-
- BaseDeploymentName
161+
- baseDeploymentName
162162
- deployType
163163
type: object
164164
status:

module-controller/config/samples/module-deployment_v1alpha1_moduledeployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
app.kubernetes.io/created-by: module-controller
1010
name: moduledeployment-sample
1111
spec:
12-
baseAppName: dynamic-stock-deployment
12+
baseDeploymentName: dynamic-stock-deployment
1313
template:
1414
spec:
1515
module:

module-controller/internal/controller/module_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ func (r *ModuleReconciler) handleTerminatingModuleInstance(ctx context.Context,
146146
}
147147

148148
// uninstall module
149-
_, err = arklet.Client().UninstallBiz(ip, module.Spec.Module.Name, module.Name)
149+
_, err = arklet.Client().UninstallBiz(ip, module.Spec.Module.Name, module.Spec.Module.Version)
150150
if err != nil {
151151
log.Log.Error(err, "Failed post module", "moduleName", module.Spec.Module.Name)
152152
return ctrl.Result{}, err

module-controller/internal/controller/moduledeployment_controller_suit_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ var _ = Describe("ModuleDeployment Controller", func() {
9292
})
9393

9494
func prepareModuleDeployment(namespace, moduleDeploymentName string) v1alpha1.ModuleDeployment {
95-
baseAppName := "dynamic-stock-deployment"
95+
baseDeploymentName := "dynamic-stock-deployment"
9696

9797
moduleDeployment := v1alpha1.ModuleDeployment{
9898
Spec: v1alpha1.ModuleDeploymentSpec{
99-
BaseDeploymentName: baseAppName,
99+
BaseDeploymentName: baseDeploymentName,
100100
Template: v1alpha1.ModuleTemplateSpec{
101101
Spec: v1alpha1.ModuleSpec{
102102
Module: v1alpha1.ModuleInfo{

0 commit comments

Comments
 (0)