API Reference
Configuration details
Config
Configuration for Kubernetes to Bucket synchronization
| Field | Description | Type | Required |
|---|
concurrency | Concurrent processes to be executed to improve performance | int | false |
destinationName | Bucket name where data will be synchronized | string | false |
globalSelector | Overrides selectors properties | KubernetesGlobalSelector | false |
logLevel | Log level to be used by the synchronization Pod | string | false |
observability | Observability configuration | ObservabilityConfig | false |
options | Synchronization options | SynchronizationOptions | false |
pathPrefix | Path prefix to be used to retreive objects in the Bucket | string | false |
resources | Resources to be assigned to the synchronization Pod | ResourceRequirements | false |
selectors | Selectors to filter the Kubernetes resources to be synchronized | []KubernetesObjectSelector | false |
sourceName | KubernetesCluster name from where data will be read | string | false |
transformations | Transform Kubernetes objects before to be written to the destination | []Transformations | false |
useCachedData | Use cached data instead of get data from assets on startup | bool | false |
KubernetesGlobalSelector
Global selector is used to set the default value on all selectors
| Field | Description | Type | Required |
|---|
objectSelector | Rules to filter Kubernetes objects by ObjectSelector | ObjectSelector | false |
namespaceSelector | Rules to filter Kubernetes objects by NamespaceSelector | NamespaceSelector | false |
ObjectSelector
| Field | Description | Type | Required |
|---|
nameSelector | Filter objects by their name | NameSelector | false |
labelSelector | Filter objects by their labels | LabelSelector | false |
NameSelector
Select object by their name
| Field | Description | Type | Required |
|---|
includeRegex | Include names that matches at least one regex | []string | false |
excludeRegex | Exlcude names that matches at least one regex | []string | false |
LabelSelector
A label selector is a label query over a set of resources. The result of matchLabels and
matchExpressions are ANDed. An empty label selector matches all objects. A null
label selector matches no objects.
+structType=atomic
| Field | Description | Type | Required |
|---|
matchLabels | matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabelsmap is equivalent to an element of matchExpressions, whose key field is “key”, theoperator is “In”, and the values array contains only “value”. The requirements are ANDed.+optional | map[string]string | false |
matchExpressions | matchExpressions is a list of label selector requirements. The requirements are ANDed.+optional+listType=atomic | []LabelSelectorRequirement | false |
LabelSelectorRequirement
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
| Field | Description | Type | Required |
|---|
key | key is the label key that the selector applies to. | string | false |
operator | operator represents a key’s relationship to a set of values.Valid operators are In, NotIn, Exists and DoesNotExist. | LabelSelectorOperator | false |
values | values is an array of string values. If the operator is In or NotIn,the values array must be non-empty. If the operator is Exists or DoesNotExist,the values array must be empty. This array is replaced during a strategicmerge patch.+optional+listType=atomic | []string | false |
LabelSelectorOperator
A label selector operator is the set of operators that can be used in a selector requirement.
| Field | Description | Type | Required |
|---|
NamespaceSelector
| Field | Description | Type | Required |
|---|
nameSelector | Filter Namespaces by their name | NameSelector | false |
labelSelector | Filter Namespaces by their labels | LabelSelector | false |
ObservabilityConfig
Configure the synchronization process observability using Prometheus ServiceMonitor
| Field | Description | Type | Required |
|---|
enabled | Enable the Observability with a Prometheus ServiceMonitor | bool | false |
interval | Configure the interval in the ServiceMonitor that Prometheus will use to scrape metrics | Duration | false |
Duration
Duration is a wrapper around time.Duration which supports correct
marshaling to YAML and JSON. In particular, it marshals into strings, which
can be used as map keys in json.
| Field | Description | Type | Required |
|---|
SynchronizationOptions
Customize the synchronization process with special options
| Field | Description | Type | Required |
|---|
dryRun | Simulate the synchronization process but don’t execute the write operations | bool | false |
forceSync | Synchronize object in the destination even if the object exists in the destination and it doesn’t match the configured selectors | bool | false |
forcePrune | Prune object in the destination even if it doesn’t match the configured selectors | bool | false |
showLogIfObjectIsAlreadyInSync | Show a log message if object is already in sync | bool | false |
showLogIfObjectHaveBeenAdapted | Show a log message if object have been adapted for the destination | bool | false |
KubernetesObjectSelector
GroupVersionResources
Select a set of GroupVersionResource
| Field | Description | Type | Required |
|---|
group | Kubernetes resource group. Example: apps | string | false |
version | Kubernetes resource version. Example: v1 | string | false |
resources | Kubernetes resource names. Example: deployments | []string | false |
Transformations is a list of operations to modifiy the Kubernetes objects matching the given selectors
| Field | Description | Type | Required |
|---|
resources | Select the objects to be transfomred by their resource type | []GroupVersionResources | false |
namespaceSelector | Filter the objects to be transformed by NamespaceSelector | NamespaceSelector | false |
objectSelector | Filter the objects to be transformed by ObjectSelector | ObjectSelector | false |
operations | Operations to be executed to transform the objects | []TransformationOperation | false |
The operation to execute to transform the objects
OperationJSONPatch
The JSONPatch operation
| Field | Description | Type | Required |
|---|
skipIfNotFoundOnDelete | Skip if not found on delete | bool | false |
operations | List of operations to be executed | []JSONPatchOperation | false |
JSONPatchOperation
JSONPAtch operation
| Field | Description | Type | Required |
|---|
op | JSONPatch operation: add, copy, move, remove, replace, test | string | false |
path | Execute the operation to the given path | string | false |
value | Optional value to be used in the operation | interface{} | false |