> 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/releases/1.1.6.md).

# NetCap 1.1.6

**Release date:** {YYYY-MM-DD}

NetCap 1.1.6 adds two more ways to supply S3 connection parameters, without a plain-text field in the `NetCaptureStorage` Custom Resource (CR). You can read them from Kubernetes Secrets on the Management Cluster, or from the NetCap Sink container environment on the Core Cluster. NetCap 1.1.6 also groups rotated packet capture (PCAP) files into directories named after their rotation time. See [`NetCaptureStorage` CR](https://docs.cennso.com/cennso/netcap/latest/concepts/netcapturestorage.md#s3-storage) and [`NetCaptureJob` CR](https://docs.cennso.com/cennso/netcap/latest/concepts/netcapturejob.md#date-directories-for-rotated-pcap-files).

There are no breaking changes between 1.1.5 and 1.1.6.

## Features

### Read S3 parameters from Kubernetes Secrets

This release adds the **spec.forProvider.s3.fromSecret** list to the `NetCaptureStorage` CR. Each entry maps one S3 parameter to one key of a Kubernetes Secret on the Management Cluster. A value such as the access key then never appears in the CR itself. Parameters read this way take precedence over the plain-text fields in **spec.forProvider.s3**.

NetCap Provider watches the referenced Secrets. When you rotate a credential, NetCap Provider reads the new value and updates the traffic capture configuration. See [`NetCaptureStorage` CR](https://docs.cennso.com/cennso/netcap/latest/concepts/netcapturestorage.md#read-parameters-from-kubernetes-secrets).

### Read S3 credentials from the NetCap Sink container environment

This release adds the **spec.forProvider.s3.env_auth** parameter to the `NetCaptureStorage` CR. Set it to `true` and leave **spec.forProvider.s3.access_key_id** and **spec.forProvider.s3.secret_access_key** empty. NetCap Sink then reads `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` from the environment of its own container. When neither variable is set, NetCap Sink falls back to instance metadata. This covers clusters that authenticate through an Identity and Access Management (IAM) role. See [`NetCaptureStorage` CR](https://docs.cennso.com/cennso/netcap/latest/concepts/netcapturestorage.md#read-credentials-from-the-container-environment).

The same container environment also accepts rclone's `RCLONE_CONFIG_` variables. These set any storage parameter, credentials included. NetCap Sink names its rclone remotes `s3` and `sftp`, so `RCLONE_CONFIG_S3_ACCESS_KEY_ID` sets the S3 access key. A parameter that the `NetCaptureStorage` CR already sets takes precedence, so these variables apply to what you leave out of the CR.

You set that environment with three new parameters on the `NetCapClusterDeployment` CR:

- **spec.sinkEnv** sets environment variables on the NetCap Sink container.
- **spec.sinkVolumes** adds volumes to the NetCap Sink pod.
- **spec.sinkVolumeMounts** mounts those volumes into the NetCap Sink container.

All three take standard Kubernetes syntax. An environment variable can read its value from a Secret, and a volume can mount a Secret or a ConfigMap. **spec.sinkEnv** also takes `RCLONE_` option variables such as `RCLONE_S3_UPLOAD_CONCURRENCY`, which set rclone options that the `NetCaptureStorage` CR does not expose as fields. See [`NetCapClusterDeployment` CR](https://docs.cennso.com/cennso/netcap/latest/concepts/netcapclusterdeployment.md#netcap-sink-environment-variables-and-volumes).

### Group rotated PCAP files into date directories

This release adds the **spec.forProvider.destinationTemplate.spec.destinations.fileParams.dateDirectories** parameter to the `NetCaptureJob` CR. On every storage type, NetCap writes each rotated PCAP file into a subdirectory named after its rotation time in UTC. The parameter sets the grouping interval, from one month to one hour.

By default, NetCap creates no date directories. See [`NetCaptureJob` CR](https://docs.cennso.com/cennso/netcap/latest/concepts/netcapturejob.md#date-directories-for-rotated-pcap-files).

## Fixes

### Fixed stale statuses on a recreated `NetCaptureJob`

Previously, the statuses of a `NetCaptureStream` and its destinations could remain after the object they described was removed. A `NetCaptureJob` recreated under the same name read those statuses and reported a failure from the earlier capture.

NetCap 1.1.6 removes the statuses together with the stream or destination they belong to, and also when the removal fails. A `NetCaptureJob` then reports only the state of its own capture. See [`NetCaptureJob` CR](https://docs.cennso.com/cennso/netcap/latest/concepts/netcapturejob.md#status).

### Fixed destination statuses lost after a Data Mesh connection error

Previously, NetCap treated any error from a stream lookup in the Data Mesh Key-Value store as a deleted stream. A timeout or a connection that was not ready after a reconnect produced such an error. NetCap then stopped reporting the status of that stream's destinations, and reporting did not resume.

NetCap 1.1.6 treats only a missing key as a deleted stream. For any other error, NetCap keeps the stream's status, and its destinations resume reporting once the connection recovers. See [`NetCaptureJob` CR](https://docs.cennso.com/cennso/netcap/latest/concepts/netcapturejob.md#status).
