Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: update installation document #642

Merged
merged 2 commits into from
Aug 14, 2024
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
24 changes: 14 additions & 10 deletions docs/deploy-controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add a line for the user to update the RELEASE to the required release, Below show is just an example for latest release, replace v0.8.0 with latest so that we don't need to keep updating it later

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add a line for the user to update the RELEASE to the required release,

This should be good enough.


>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
Expand All @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion internal/sidecar/service/encryptionkeyrotation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
}

Expand Down
Loading