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

Commit

Permalink
module controller 0.3 bugfix and unit test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jinle.xjl committed Sep 5, 2023
1 parent 30202da commit d36c6ff
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion module-controller/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN go mod download
# Copy the go source
COPY cmd/main.go cmd/main.go
COPY api/ api/
COPY internal/controller/ internal/controller/
COPY internal/ internal/

# Build
# the GOARCH has not a default value to allow the binary be built according to the host where the command
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
spec:
description: ModuleDeploymentSpec defines the desired state of ModuleDeployment
properties:
BaseDeploymentName:
baseDeploymentName:
description: 'INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
Important: Run "make" to regenerate code after modifying this file'
type: string
Expand Down Expand Up @@ -158,7 +158,7 @@ spec:
type: object
type: object
required:
- BaseDeploymentName
- baseDeploymentName
- deployType
type: object
status:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
app.kubernetes.io/created-by: module-controller
name: moduledeployment-sample
spec:
baseAppName: dynamic-stock-deployment
baseDeploymentName: dynamic-stock-deployment
template:
spec:
module:
Expand Down
2 changes: 1 addition & 1 deletion module-controller/internal/controller/module_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func (r *ModuleReconciler) handleTerminatingModuleInstance(ctx context.Context,
}

// uninstall module
_, err = arklet.Client().UninstallBiz(ip, module.Spec.Module.Name, module.Name)
_, err = arklet.Client().UninstallBiz(ip, module.Spec.Module.Name, module.Spec.Module.Version)
if err != nil {
log.Log.Error(err, "Failed post module", "moduleName", module.Spec.Module.Name)
return ctrl.Result{}, err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ var _ = Describe("ModuleDeployment Controller", func() {
})

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

moduleDeployment := v1alpha1.ModuleDeployment{
Spec: v1alpha1.ModuleDeploymentSpec{
BaseDeploymentName: baseAppName,
BaseDeploymentName: baseDeploymentName,
Template: v1alpha1.ModuleTemplateSpec{
Spec: v1alpha1.ModuleSpec{
Module: v1alpha1.ModuleInfo{
Expand Down

0 comments on commit d36c6ff

Please sign in to comment.