-
Notifications
You must be signed in to change notification settings - Fork 1.8k
OSASINFRA-3718: Draft content #99259
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
Open
gouthampacha
wants to merge
2
commits into
openshift:main
Choose a base branch
from
gouthampacha:OSASINFRA-3718
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 105 additions & 0 deletions
105
modules/persistent-storage-csi-manila-share-access-rules.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| // Module included in the following assemblies: | ||
| // | ||
| // * storage/container_storage_interface/persistent-storage-csi-manila.adoc | ||
|
|
||
| :_mod-docs-content-type: PROCEDURE | ||
| [id="persistent-storage-csi-manila-share-access-rules_{context}"] | ||
| = Customizing Manila share access rules | ||
|
|
||
| By default, {product-title} creates Manila storage classes that provide access to all IPv4 clients. To limit client access, define custom storage classes that use specific client IP addresses or subnets by using the `nfs-ShareClient` parameter. | ||
|
|
||
| .Prerequisites | ||
|
|
||
| * {rh-openstack-first} is deployed with appropriate Manila share infrastructure. | ||
| * You have cluster administrator privileges. | ||
|
|
||
| .Procedure | ||
|
|
||
| . Create a YAML file for your custom storage class based on the following example: | ||
| + | ||
| .Example custom storage class file | ||
| [source,yaml] | ||
| ---- | ||
| apiVersion: storage.k8s.io/v1 | ||
| kind: StorageClass | ||
| metadata: | ||
| name: csi-manila-gold-restricted <1> | ||
| provisioner: manila.csi.openstack.org | ||
| parameters: | ||
| type: gold <2> | ||
| nfs-ShareClient: "10.0.0.0/24,192.168.1.100" <3> | ||
| csi.storage.k8s.io/provisioner-secret-name: manila-csi-secret | ||
| csi.storage.k8s.io/provisioner-secret-namespace: openshift-manila-csi-driver | ||
| csi.storage.k8s.io/controller-expand-secret-name: manila-csi-secret | ||
| csi.storage.k8s.io/controller-expand-secret-namespace: openshift-manila-csi-driver | ||
| csi.storage.k8s.io/node-stage-secret-name: manila-csi-secret | ||
| csi.storage.k8s.io/node-stage-secret-namespace: openshift-manila-csi-driver | ||
| csi.storage.k8s.io/node-publish-secret-name: manila-csi-secret | ||
| csi.storage.k8s.io/node-publish-secret-namespace: openshift-manila-csi-driver | ||
| allowVolumeExpansion: true | ||
| ---- | ||
| + | ||
| <1> A descriptive name for your custom storage class. | ||
| <2> The Manila share type. This type must match an existing share type in your {rh-openstack} environment. | ||
| <3> Comma-separated list of IP addresses or CIDR subnets that are allowed to access the NFS shares. In this example, access is restricted to the `10.0.0.0/24` subnet and the specific IP address is `192.168.1.100`. | ||
|
|
||
| . Apply the storage class from the file by running the following command: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc apply -f custom-manila-storageclass.yaml | ||
| ---- | ||
|
|
||
| . Verify that the storage class was created by running the following command: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc get storageclass csi-manila-gold-restricted | ||
| ---- | ||
|
|
||
| . Create a persistent volume claim (PVC) that uses the custom storage class based on the following example: | ||
| + | ||
| .Example PVC file | ||
| [source,yaml] | ||
| ---- | ||
| apiVersion: v1 | ||
| kind: PersistentVolumeClaim | ||
| metadata: | ||
| name: pvc-manila-restricted | ||
| spec: | ||
| accessModes: | ||
| - ReadWriteMany | ||
| resources: | ||
| requests: | ||
| storage: 10Gi | ||
| storageClassName: csi-manila-gold-restricted <1> | ||
| ---- | ||
| + | ||
| <1> The name of your custom storage class that has restricted access. | ||
|
|
||
| . Apply the PVC from the file by running the following command: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc apply -f pvc-manila-restricted.yaml | ||
| ---- | ||
|
|
||
| [NOTE] | ||
| ==== | ||
| The `nfs-ShareClient` parameter accepts various formats: | ||
|
|
||
| * Single IP address: `192.168.1.100` | ||
| * CIDR subnet: `10.0.0.0/24` | ||
| * Multiple entries: `10.0.0.0/24,192.168.1.100,172.16.0.0/16` | ||
|
|
||
| Ensure that the specified IP addresses or subnets include the {product-title} cluster nodes to allow proper mounting of the persistent volumes. | ||
| ==== | ||
|
|
||
| [IMPORTANT] | ||
| ==== | ||
| When using custom storage classes with restricted access rules, ensure that: | ||
|
|
||
| * The specified IP addresses or subnets include all {product-title} nodes that need to access the storage. | ||
| * The Manila service in {rh-openstack} supports the share type specified in the storage class. | ||
| * Network connectivity exists between the allowed clients and the Manila share servers. | ||
| ==== | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll likely break this out into an additional little module. Very good start though!