Skip to content
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
16 changes: 10 additions & 6 deletions api/v1alpha1/cacheruntimeclass_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ type ExecutionCommonEntry struct {
TimeoutSeconds int32 `json:"timeout,omitempty"`
}

// EncryptOptionComponentDependency defines the configuration for encrypt option dependency
type EncryptOptionComponentDependency struct {
}

// ExtraResourcesComponentDependency defines the extra resources configuration for component dependencies
type ExtraResourcesComponentDependency struct {
// ConfigMaps is a list of ConfigMaps in the same namespace to mount into the component
Expand All @@ -94,15 +90,23 @@ type ExtraResourcesComponentDependency struct {

// RuntimeComponentDependencies defines the dependencies required by a CacheRuntime component
type RuntimeComponentDependencies struct {
// EncryptOption is the configuration for encrypt option secret mount
// SecretMount controls whether dataset encrypt-option secrets are mounted into this component pod.
// Defaults to true for Master/Worker, false for Client unless explicitly enabled.
// +optional
EncryptOption *EncryptOptionComponentDependency `json:"encryptOption,omitempty"`
SecretMount *SecretMountComponentDependency `json:"secretMount,omitempty"`

// ExtraResources specifies the usage of extra resources such as ConfigMaps
// +optional
ExtraResources *ExtraResourcesComponentDependency `json:"extraResources,omitempty"`
}

// SecretMountComponentDependency defines the secret mount configuration for component dependencies
type SecretMountComponentDependency struct {
// Enabled indicates whether dataset encrypt-option secrets should be mounted into this component pod.
// +optional
Enabled bool `json:"enabled,omitempty"`
}

// HeadlessRuntimeComponentService defines the configuration for headless service
type HeadlessRuntimeComponentService struct {
}
Expand Down
41 changes: 25 additions & 16 deletions api/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 50 additions & 18 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 15 additions & 6 deletions charts/fluid/fluid/crds/data.fluid.io_cacheruntimeclasses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ spec:
properties:
dependencies:
properties:
encryptOption:
type: object
extraResources:
properties:
configMaps:
Expand All @@ -86,6 +84,11 @@ spec:
type: object
type: array
type: object
secretMount:
properties:
enabled:
type: boolean
type: object
type: object
executionEntries:
properties:
Expand Down Expand Up @@ -3489,8 +3492,6 @@ spec:
properties:
dependencies:
properties:
encryptOption:
type: object
extraResources:
properties:
configMaps:
Expand All @@ -3503,6 +3504,11 @@ spec:
type: object
type: array
type: object
secretMount:
properties:
enabled:
type: boolean
type: object
type: object
executionEntries:
properties:
Expand Down Expand Up @@ -6906,8 +6912,6 @@ spec:
properties:
dependencies:
properties:
encryptOption:
type: object
extraResources:
properties:
configMaps:
Expand All @@ -6920,6 +6924,11 @@ spec:
type: object
type: array
type: object
secretMount:
properties:
enabled:
type: boolean
type: object
type: object
executionEntries:
properties:
Expand Down
21 changes: 15 additions & 6 deletions config/crd/bases/data.fluid.io_cacheruntimeclasses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ spec:
properties:
dependencies:
properties:
encryptOption:
type: object
extraResources:
properties:
configMaps:
Expand All @@ -86,6 +84,11 @@ spec:
type: object
type: array
type: object
secretMount:
properties:
enabled:
type: boolean
type: object
type: object
executionEntries:
properties:
Expand Down Expand Up @@ -3489,8 +3492,6 @@ spec:
properties:
dependencies:
properties:
encryptOption:
type: object
extraResources:
properties:
configMaps:
Expand All @@ -3503,6 +3504,11 @@ spec:
type: object
type: array
type: object
secretMount:
properties:
enabled:
type: boolean
type: object
type: object
executionEntries:
properties:
Expand Down Expand Up @@ -6906,8 +6912,6 @@ spec:
properties:
dependencies:
properties:
encryptOption:
type: object
extraResources:
properties:
configMaps:
Expand All @@ -6920,6 +6924,11 @@ spec:
type: object
type: array
type: object
secretMount:
properties:
enabled:
type: boolean
type: object
type: object
executionEntries:
properties:
Expand Down
9 changes: 6 additions & 3 deletions docs/en/dev/generic_cache_runtime_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ The component in Topology mainly contains the following content:
| Options | Default options, will be overridden by user settings | |
| Template | PodTemplateSpec native field | |
| Service | Currently only supports Headless | |
| Dependencies | EncryptOption | Whether this component needs Fluid to mount the access keys defined in Dataset for accessing data sources [Not supported in current version], using the keys defined in Dataset for access. |
| | ExtraResources | Whether this component needs to mount additional ConfigMaps (the dependent ConfigMap information is defined in the ExtraResources field of CacheRuntimeClass). |
| Dependencies | ExtraResources | Whether this component needs to mount additional ConfigMaps (the dependent ConfigMap information is defined in the ExtraResources field of CacheRuntimeClass). |
| ExecutionEntries| MountUFS | For Master-Worker architecture, when Master is Ready, the underlying file system mount operation needs to be executed. |
| ExecutionEntries| ReportSummary | How the cache system defines operations to obtain cache information metrics [Not supported in current version]. |

Expand Down Expand Up @@ -260,7 +259,7 @@ spec:
In cacheruntime, all control plane processes are handled by Fluid. However, as a data caching engine, when providing services, the entire cache system requires **topology**, **data source**, **authentication**, and **cache information**. Fluid will provide this information to components through configuration files based on different Component roles. The component's internal process is responsible for parsing this configuration to perform environment variable configuration, data engine configuration file generation, and other operations. After preparation is complete, the data engine process can be started. For specific parsing details, please refer to the table below:

* Taking the above resources as an example, the Config examples mounted by Master/Worker/Client and maintained by Fluid are as follows:

the `mounts`, `accessModes`, and `targetPath` fields in the JSON are all derived from the Dataset's Spec definition.

```json
{
Expand All @@ -274,6 +273,10 @@ In cacheruntime, all control plane processes are handled by Fluid. However, as a
"region_name": "us-east-1",
"secret": "minioadmin"
},
"encryptOptions": {
"access-key": "/etc/fluid/secrets/minio-secret/access-key",
"secret-key": "/etc/fluid/secrets/minio-secret/secret-key"
},
"name": "minio",
"path": "/minio"
}
Expand Down
Loading
Loading