Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sakshisharma84 committed Nov 13, 2023
1 parent b22657b commit 1a9fada
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions controllers/addon_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
)

const (
typeManifest = "manifest"
typeChart = "chart"
kindManifest = "manifest"
kindChart = "chart"
)

// AddonReconciler reconciles a Addon object
Expand Down Expand Up @@ -61,7 +61,7 @@ func (r *AddonReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl
}

switch instance.Spec.Kind {
case typeChart:
case kindChart:
chart := helm.Chart{
Name: instance.Spec.Chart.Name,
Repo: instance.Spec.Chart.Repo,
Expand Down Expand Up @@ -112,7 +112,7 @@ func (r *AddonReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl
logger.Error(err, "failed to install addon", "Name", chart.Name, "Version", chart.Version)
return ctrl.Result{Requeue: true}, err
}
case typeManifest:
case kindManifest:
mc := manifest.NewManifestController(r.Client, logger)
err = mc.CreateManifest(instance.Spec.Namespace, instance.Spec.Name, instance.Spec.Manifest.URL)
if err != nil {
Expand Down

0 comments on commit 1a9fada

Please sign in to comment.