> For the complete documentation index, see [llms.txt](https://docs.cennso.com/cennso/netcap/latest/llms.txt) (all documentation: [llms.txt](https://docs.cennso.com/llms.txt)). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cennso.com/cennso/netcap/latest/technical-reference/crds/netcapturestorages.md).

# NetCaptureStorage Custom Resource Definition

`NetCaptureStorage` Custom Resource (CR) is used to specify a storage location for collected PCAP files. The supported locations are:

- Local disk
- SFTP server
- S3 storage

## Configuration example

- This is a sample `NetCaptureStorage` CR that you can use to specify a **local storage** location for collected PCAP files:

   ```yaml
   apiVersion: netcap.cennso.com/v1alpha1
   kind: NetCaptureStorage
   metadata:
     name: local-storage
   spec:
     forProvider:
       local:
        # Path to the directory where PCAP files will be stored
         path: dumps
   ```

- This is a sample `NetCaptureStorage` CR that you can use to specify an **SFTP server** as a storage location for collected PCAP files:

   ```yaml
   apiVersion: netcap.cennso.com/v1alpha1
   kind: NetCaptureStorage
   metadata:
     name: storage-sftp
   spec:
     forProvider:
       sftp:
         # Remote path on the SFTP server where files will be uploaded.
         path: /upload
         # Must be set to "sftp" to indicate the storage backend.
         type: sftp
         # Hostname or IP address of the SFTP server.
         host: sftp-service.sftp
         # Username used to authenticate to the SFTP server.
         user: user
         # Port on which the SFTP server is running.
         port: "22"
         # Password for SFTP authentication.
         pass: my-password
   ```

- This is a sample `NetCaptureStorage` CR that you can use to specify an **S3 storage** location for collected PCAP files:

   ```yaml
   apiVersion: netcap.cennso.com/v1alpha1
   kind: NetCaptureStorage
   metadata:
     name: storage-s3
   spec:
     forProvider:
       s3:
         # Prefix to organize files in the bucket.
         prefix: test
         # Name of the target S3 bucket.
         bucket: testbucket
         # Must be "s3" to indicate this is an S3-compatible configuration.
         type: s3
         # Name of the S3 provider (for example: "AWS", "Minio").
         provider: Minio
         # If set to "true", credentials are taken from environment variables instead of hardcoded values.
         env_auth: "false"
         # Access key for the S3 service. Required unless env_auth is "true".
         access_key_id: minio
         # Secret key for the S3 service. Required unless env_auth is "true".
         secret_access_key: minio123
         # Full URL of the S3-compatible service endpoint
         endpoint: http://minio.minio:9000
         # Region of the S3 bucket
         region: kind
         # ACL for file uploads, such as "private", "public-read", etc.
         acl: private
         # Maximum size of each upload chunk. Helps manage upload efficiency for large files.
         chunk_size: 10mib
   ```

## Configuration parameters

These are all parameters that you can use to configure the `NetCaptureStorage` CR:

**CRD specification:** [netcap.cennso.com_netcapturestorages.yaml](https://docs.cennso.com/api/spec/cennso/netcap/latest/assets/crds/netcap.cennso.com_netcapturestorages.yaml?form=bundled&kind=crd)
