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

Add how to encrypt/decrypt image and volume #636

Merged
merged 3 commits into from
Oct 7, 2024

Conversation

Yu-Jack
Copy link
Collaborator

@Yu-Jack Yu-Jack commented Sep 5, 2024

Description

Since the v1.4.0 harvester will support image/volume encryption, I'd like to refine the current image documentation structure.

It will be two markdowns in the sidebar:

  • Image Management
    • Upload Images (original one)
    • Encrypt Images (new one)

Please check following path to review the content

  • /v1.4/volume/volume-security
  • /v1.4/image/image-security

Related Issue

harvester/harvester#3129

@Yu-Jack Yu-Jack self-assigned this Sep 5, 2024
Copy link

github-actions bot commented Sep 5, 2024

Name Link
🔨 Latest commit 9dca417
😎 Deploy Preview https://6703abc6b15310775e3f82bf--harvester-preview.netlify.app

@Yu-Jack Yu-Jack requested a review from bk201 September 5, 2024 10:07
@Yu-Jack Yu-Jack marked this pull request as ready for review September 5, 2024 13:42
@Yu-Jack Yu-Jack removed the request for review from bk201 September 6, 2024 03:51
@Yu-Jack Yu-Jack marked this pull request as draft September 6, 2024 03:52
@Yu-Jack Yu-Jack changed the title docs(image): refine the structure for image encryption docs(image and volume): add how to encrypr/decrypt image and volume Sep 6, 2024
@Yu-Jack Yu-Jack changed the title docs(image and volume): add how to encrypr/decrypt image and volume Add how to encrypr/decrypt image and volume Sep 6, 2024
@Yu-Jack Yu-Jack force-pushed the feat-3129-01 branch 5 times, most recently from 16e1316 to 68fcd05 Compare September 9, 2024 03:51
@Yu-Jack Yu-Jack force-pushed the feat-3129-01 branch 7 times, most recently from 73a754f to fa847ac Compare September 13, 2024 09:43
@Yu-Jack Yu-Jack marked this pull request as ready for review September 13, 2024 10:01
@Yu-Jack Yu-Jack force-pushed the feat-3129-01 branch 5 times, most recently from 795c836 to 9bec7d0 Compare September 16, 2024 07:24
Copy link

@a110605 a110605 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@bk201 bk201 left a comment

Choose a reason for hiding this comment

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

The flow LGTM, thanks.


## Encrypt Image

After getting a source image, please select `Ecnrypt` to encrypt virtual machine image.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
After getting a source image, please select `Ecnrypt` to encrypt virtual machine image.
After getting a source image, please select `Encrypt` to encrypt the virtual machine image.


## Use Image

Select the image when creating virtual machine image.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Select the image when creating virtual machine image.
Select the image when creating a virtual machine.


There are two ways to create an encrypted volume. In either case, be sure to select an encrypted storage class.

### In Volumes Tabs
Copy link
Member

Choose a reason for hiding this comment

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

Maybe "Volumes page"?


![create-empty-volume](/img/v1.2/volume/create-empty-volume.png)

### In Images Tab
Copy link
Member

Choose a reason for hiding this comment

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

And "Volumes tab when creating a virtual machine".


### In Volumes Tabs

![create-empty-volume](/img/v1.2/volume/create-empty-volume.png)
Copy link
Member

Choose a reason for hiding this comment

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

would be nice to update the two screenshots with the encrypted storage class created in the previous steps.

@Yu-Jack Yu-Jack force-pushed the feat-3129-01 branch 2 times, most recently from ba552b9 to 4828080 Compare September 19, 2024 03:02
@Yu-Jack
Copy link
Collaborator Author

Yu-Jack commented Sep 19, 2024

Updated the all links from ../upload-image.md to ../image/upload-image.md for v1.4.

@Yu-Jack Yu-Jack requested a review from bk201 September 19, 2024 03:23
@Yu-Jack Yu-Jack force-pushed the feat-3129-01 branch 2 times, most recently from 8b2f8d2 to 6c5ced0 Compare September 23, 2024 02:45
@Yu-Jack Yu-Jack requested review from bk201 and removed request for bk201 September 23, 2024 03:57
@Yu-Jack
Copy link
Collaborator Author

Yu-Jack commented Sep 24, 2024

Gentle ping to @jillian-maroket , the GUI PR harvester/dashboard#1151 is ready, I think this document won't be changed anymore. Please help review this when you have time, thanks!

Copy link
Contributor

@jillian-maroket jillian-maroket left a comment

Choose a reason for hiding this comment

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

I restructured some parts because of unnecessary headings and text. Please be mindful of the indentation.

docs/image/image-security.md Outdated Show resolved Hide resolved
Comment on lines 42 to 55
```yaml
apiVersion: v1
kind: Secret
metadata:
name: encryption
namespace: default
data:
CRYPTO_KEY_CIPHER: aes-xts-plain64
CRYPTO_KEY_HASH: sha256
CRYPTO_KEY_PROVIDER: secret
CRYPTO_KEY_SIZE: 256
CRYPTO_KEY_VALUE: "Your encryption passphrase"
CRYPTO_PBKDF: argon2i
```
Copy link
Contributor

Choose a reason for hiding this comment

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

Please indent this code block.

docs/image/image-security.md Outdated Show resolved Hide resolved
Comment on lines 71 to 91
```yaml
allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: encryption
parameters:
csi.storage.k8s.io/node-publish-secret-name: encryption
csi.storage.k8s.io/node-publish-secret-namespace: default
csi.storage.k8s.io/node-stage-secret-name: encryption
csi.storage.k8s.io/node-stage-secret-namespace: default
csi.storage.k8s.io/provisioner-secret-name: encryption
csi.storage.k8s.io/provisioner-secret-namespace: default
encrypted: "true"
migratable: "true"
numberOfReplicas: "3"
staleReplicaTimeout: "2880"
provisioner: driver.longhorn.io
reclaimPolicy: Delete
volumeBindingMode: Immediate
```
Copy link
Contributor

Choose a reason for hiding this comment

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

Please indent this code block.

docs/image/image-security.md Outdated Show resolved Hide resolved
Comment on lines 58 to 78
```yaml
allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: encryption
parameters:
csi.storage.k8s.io/node-publish-secret-name: encryption
csi.storage.k8s.io/node-publish-secret-namespace: default
csi.storage.k8s.io/node-stage-secret-name: encryption
csi.storage.k8s.io/node-stage-secret-namespace: default
csi.storage.k8s.io/provisioner-secret-name: encryption
csi.storage.k8s.io/provisioner-secret-namespace: default
encrypted: "true"
migratable: "true"
numberOfReplicas: "3"
staleReplicaTimeout: "2880"
provisioner: driver.longhorn.io
reclaimPolicy: Delete
volumeBindingMode: Immediate
```
Copy link
Contributor

Choose a reason for hiding this comment

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

Please indent this code block.

docs/volume/volume-security.md Outdated Show resolved Hide resolved
docs/volume/volume-security.md Outdated Show resolved Hide resolved
docs/volume/volume-security.md Outdated Show resolved Hide resolved
docs/volume/volume-security.md Outdated Show resolved Hide resolved
@Yu-Jack
Copy link
Collaborator Author

Yu-Jack commented Oct 7, 2024

Hi @jillian-maroket, I'm curious if we have any guidelines for writing documentation. For example, do we have a standard way to arrange sections or specific terms we can use in certain sections? For instance, avoiding like "Don't" in limitation sections, etc.

@Yu-Jack Yu-Jack force-pushed the feat-3129-01 branch 5 times, most recently from fa0d396 to fc6a6bd Compare October 7, 2024 05:53
@bk201 bk201 changed the title Add how to encrypr/decrypt image and volume Add how to encrypt/decrypt image and volume Oct 7, 2024
Copy link
Member

@bk201 bk201 left a comment

Choose a reason for hiding this comment

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

LGTM, suggest squashing and fix the "encrypr" typo in the first commit message.

Yu-Jack and others added 3 commits October 7, 2024 17:21
Signed-off-by: Jack Yu <jack.yu@suse.com>
Co-authored-by: Jillian <67180770+jillian-maroket@users.noreply.github.com>
Signed-off-by: Jack Yu <jack.yu@suse.com>
@Yu-Jack Yu-Jack merged commit 0ee230f into harvester:main Oct 7, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants