diff --git a/docs/deploy-controller.md b/docs/deploy-controller.md index a3c46255e..dc4bbbddf 100644 --- a/docs/deploy-controller.md +++ b/docs/deploy-controller.md @@ -16,25 +16,27 @@ The CSI-Addons Controller can be deployed by different ways: > Note: Some of the above configuration options can also be configured using [`"csi-addons-config"` configmap](./csi-addons-config.md). +## Installation for latest deployments + +The latest CSI-Addons Controller can be installed using the YAML files in `deploy/controller` from `main` branch. + ## Installation for versioned deployments -The CSI-Addons Controller can also be installed using the YAML files in `deploy/controller`. -The versioned deployment is possible with the YAML files that get generated for the -[latest release](https://github.com/csi-addons/kubernetes-csi-addons/releases/latest). -You can download the YAML files from there, or use them directly with kubectl. -This is the recommended and easiest way to deploy the controller. +The versioned deployment of the CSI-Addons Controller can be installed using the specific version's YAML files as shown below: + +>Note: set the `RELEASE` variable to the required version. ```console -$ cd deploy/controller +$ export RELEASE="v0.8.0" -$ kubectl create -f crds.yaml +$ kubectl create -f https://github.com/csi-addons/kubernetes-csi-addons/releases/download/${RELEASE}/crds.yaml ... customresourcedefinition.apiextensions.k8s.io/csiaddonsnodes.csiaddons.openshift.io created customresourcedefinition.apiextensions.k8s.io/networkfences.csiaddons.openshift.io created customresourcedefinition.apiextensions.k8s.io/reclaimspacecronjobs.csiaddons.openshift.io created customresourcedefinition.apiextensions.k8s.io/reclaimspacejobs.csiaddons.openshift.io created -$ kubectl create -f rbac.yaml +$ kubectl create -f https://github.com/csi-addons/kubernetes-csi-addons/releases/download/${RELEASE}/rbac.yaml ... serviceaccount/csi-addons-controller-manager created role.rbac.authorization.k8s.io/csi-addons-leader-election-role created @@ -47,12 +49,14 @@ clusterrolebinding.rbac.authorization.k8s.io/csi-addons-proxy-rolebinding create configmap/csi-addons-manager-config created service/csi-addons-controller-manager-metrics-service created -$ kubectl create -f setup-controller.yaml +$ kubectl create -f https://github.com/csi-addons/kubernetes-csi-addons/releases/download/${RELEASE}/setup-controller.yaml ... deployment.apps/csi-addons-controller-manager created ``` -* The "crds.yaml" create the required crds for reclaimspace operation. +This is the recommended and easiest way to deploy the controller. + +* The "crds.yaml" create the required crds for csi-addons operations. * The "rbac.yaml" creates the required rbac. diff --git a/internal/sidecar/service/encryptionkeyrotation.go b/internal/sidecar/service/encryptionkeyrotation.go index e7f6addb1..b79c59235 100644 --- a/internal/sidecar/service/encryptionkeyrotation.go +++ b/internal/sidecar/service/encryptionkeyrotation.go @@ -90,7 +90,7 @@ func (ekrs *EncryptionKeyRotationServer) EncryptionKeyRotate( if pv.Spec.CSI.NodeStageSecretRef != nil { ekrRequest.Secrets, err = kube.GetSecret(ctx, ekrs.kubeClient, pv.Spec.CSI.NodeStageSecretRef.Name, pv.Spec.CSI.NodeStageSecretRef.Namespace) if err != nil { - return nil, status.Errorf(codes.InvalidArgument, err.Error()) + return nil, status.Error(codes.InvalidArgument, err.Error()) } }