diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index f25ee024e..3e094d0ff 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -175,6 +175,7 @@ rules: - delete - get - list + - update - watch - apiGroups: - "" diff --git a/helm-charts/aerospike-backup-service/README.md b/helm-charts/aerospike-backup-service/README.md index 13f768a88..36da1642e 100644 --- a/helm-charts/aerospike-backup-service/README.md +++ b/helm-charts/aerospike-backup-service/README.md @@ -1,6 +1,6 @@ # Aerospike Backup Service (Custom Resource) Helm Chart -A Helm chart for `AerospikeBackupService` custom resource to be used with the Aerospike Kubernetes Operator. +A Helm chart for `AerospikeBackupService` (ABS) custom resource to be used with the Aerospike Kubernetes Operator. ## Pre Requisites @@ -18,9 +18,21 @@ helm repo update ### Deploy Aerospike Backup Service +#### Prepare the namespace + +We recommend using one ABS deployment per Aerospike cluster. + +Create the service account for the ABS in the namespace where Aerospike cluster is deployed + +```sh +kubectl create serviceaccount aerospike-backup-service -n +``` + +> Note: ServiceAccount name can be configured. Update the configured ServiceAccount in a ABS CR file to use a different service account name. + #### Install the chart -`` used to install Aerospike backup service chart must be included in `watchNamespaces` value of +`` used to install ABS chart must be included in `watchNamespaces` value of aerospike-kubernetes-operator's `values.yaml` ```sh @@ -38,22 +50,18 @@ helm install aerospike-backup-service aerospike/aerospike-backup-service \ ## Configurations -| Name | Description | Default | -|------------------------------|-------------------------------------------------------------------------------|--------------------------------------| -| `image.repository` | Aerospike backup service container image repository | `aerospike/aerospike-backup-service` | -| `image.tag` | Aerospike backup service container image tag | `3.0.0` | -| `customLabels` | Custom labels to add on the AerospikeBackupService resource | `{}` (nil) | -| `serviceAccount.create` | Enable ServiceAccount creation for Aerospike backup service. | true | -| `serviceAccount.annotations` | ServiceAccount annotations | `{}` (nil) | -| `backupServiceConfig` | Aerospike backup service configuration | `{}` (nil) | -| `secrets` | Secrets to be mounted in the Aerospike Backup Service pod like aws creds etc. | `[]` (nil) | -| `resources` | Aerospike backup service pod resource requirements | `{}` (nil) | -| `service` | Kubernetes service configuration for Aerospike backup service | `{}` (nil) | - +| Name | Description | Default | +|-----------------------|-------------------------------------------------------------------------------|--------------------------------------| +| `image.repository` | Aerospike backup service container image repository | `aerospike/aerospike-backup-service` | +| `image.tag` | Aerospike backup service container image tag | `3.0.0` | +| `customLabels` | Custom labels to add on the Aerospike backup service resource | `{}` (nil) | +| `backupServiceConfig` | Aerospike backup service configuration | `{}` (nil) | +| `secrets` | Secrets to be mounted in the Aerospike backup service pod like aws creds etc. | `[]` (nil) | +| `resources` | Aerospike backup service pod resource requirements | `{}` (nil) | +| `service` | Kubernetes service configuration for Aerospike backup service | `{}` (nil) | +| `podSpec` | Aerospike backup service pod configuration | `{}` (nil) | ### Configurations Explained - -[//]: # (TODO: Update below link when the documentation is available.) Refer -to [AerospikeBackupService Customer Resource Spec](https://docs.aerospike.com/cloud/kubernetes/operator/cluster-configuration-settings#spec) +to [AerospikeBackupService Customer Resource Spec](https://aerospike.com/docs/cloud/kubernetes/operator/backup-and-restore/backup-service-configuration#spec) for details on above [configuration fields](#Configurations) diff --git a/helm-charts/aerospike-backup-service/values.yaml b/helm-charts/aerospike-backup-service/values.yaml index 73e0b8975..d487ec3ed 100644 --- a/helm-charts/aerospike-backup-service/values.yaml +++ b/helm-charts/aerospike-backup-service/values.yaml @@ -25,7 +25,6 @@ backupServiceConfig: {} # backup-policies: # test-policy: # parallel: 3 -# remove-files: KeepAll # storage: # local: # local-storage: diff --git a/helm-charts/aerospike-backup/README.md b/helm-charts/aerospike-backup/README.md index fbc268aaf..73e5c2334 100644 --- a/helm-charts/aerospike-backup/README.md +++ b/helm-charts/aerospike-backup/README.md @@ -49,8 +49,6 @@ helm install aerospike-backup aerospike/aerospike-backup \ | `onDemandBackups[*].delay` | Delay interval before starting the on-demand backup | | ### Configurations Explained - -[//]: # (TODO: Update below link when the documentation is available.) Refer -to [AerospikeBackup Customer Resource Spec](https://docs.aerospike.com/cloud/kubernetes/operator/cluster-configuration-settings#spec) +to [AerospikeBackup Customer Resource Spec](https://aerospike.com/docs/cloud/kubernetes/operator/backup-and-restore/backup-configuration#spec) for details on above [configuration fields](#Configurations) diff --git a/helm-charts/aerospike-cluster/README.md b/helm-charts/aerospike-cluster/README.md index 4c297a8c5..27fe21577 100644 --- a/helm-charts/aerospike-cluster/README.md +++ b/helm-charts/aerospike-cluster/README.md @@ -116,4 +116,4 @@ validationPolicy: ### Configurations Explained -Refer to [AerospikeCluster Customer Resource Spec](https://docs.aerospike.com/cloud/kubernetes/operator/cluster-configuration-settings#spec) for details on above [configuration fields](#Configurations) +Refer to [AerospikeCluster Customer Resource Spec](https://aerospike.com/docs/cloud/kubernetes/operator/configuration/Cluster-configuration-settings#spec) for details on above [configuration fields](#Configurations) diff --git a/helm-charts/aerospike-kubernetes-operator/templates/aerospike-operator-manager-clusterrole.yaml b/helm-charts/aerospike-kubernetes-operator/templates/aerospike-operator-manager-clusterrole.yaml index cf2759980..218e8ac4a 100644 --- a/helm-charts/aerospike-kubernetes-operator/templates/aerospike-operator-manager-clusterrole.yaml +++ b/helm-charts/aerospike-kubernetes-operator/templates/aerospike-operator-manager-clusterrole.yaml @@ -181,6 +181,7 @@ rules: - get - list - watch + - update - apiGroups: - "" resources: diff --git a/helm-charts/aerospike-restore/README.md b/helm-charts/aerospike-restore/README.md index 06966f8cb..51ed22824 100644 --- a/helm-charts/aerospike-restore/README.md +++ b/helm-charts/aerospike-restore/README.md @@ -48,8 +48,6 @@ helm install aerospike-restore aerospike/aerospike-restore \ | `pollingPeriod` | Polling period for restore operation status | `60s` | ### Configurations Explained - -[//]: # (TODO: Update below link when the documentation is available.) Refer -to [AerospikeRestore Customer Resource Spec](https://docs.aerospike.com/cloud/kubernetes/operator/cluster-configuration-settings#spec) +to [AerospikeRestore Customer Resource Spec](https://aerospike.com/docs/cloud/kubernetes/operator/backup-and-restore/restore-configuration#spec) for details on above [configuration fields](#Configurations) diff --git a/internal/controller/backup-service/reconciler.go b/internal/controller/backup-service/reconciler.go index f1873e321..a8930262a 100644 --- a/internal/controller/backup-service/reconciler.go +++ b/internal/controller/backup-service/reconciler.go @@ -131,6 +131,8 @@ func (r *SingleBackupServiceReconciler) Reconcile() (result ctrl.Result, recErr return ctrl.Result{}, err } + r.Log.Info("Reconcile completed successfully") + return ctrl.Result{}, nil } diff --git a/internal/controller/backup/reconciler.go b/internal/controller/backup/reconciler.go index 8e443747c..1e8ad5d31 100644 --- a/internal/controller/backup/reconciler.go +++ b/internal/controller/backup/reconciler.go @@ -96,6 +96,8 @@ func (r *SingleBackupReconciler) Reconcile() (result ctrl.Result, recErr error) return reconcile.Result{}, err } + r.Log.Info("Reconcile completed successfully") + return ctrl.Result{}, nil } diff --git a/internal/controller/cluster/aerospikecluster_controller.go b/internal/controller/cluster/aerospikecluster_controller.go index 07563e3a4..c1ebb6699 100644 --- a/internal/controller/cluster/aerospikecluster_controller.go +++ b/internal/controller/cluster/aerospikecluster_controller.go @@ -66,7 +66,7 @@ type RackState struct { Size int } -// +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch;delete +// +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch;delete;update // +kubebuilder:rbac:groups=core,resources=pods/exec,verbs=create // +kubebuilder:rbac:groups=core,resources=services,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=core,resources=persistentvolumeclaims,verbs=get;list;watch;create;update;patch;delete diff --git a/internal/controller/restore/reconciler.go b/internal/controller/restore/reconciler.go index d529cb0d9..8c84b3909 100644 --- a/internal/controller/restore/reconciler.go +++ b/internal/controller/restore/reconciler.go @@ -93,6 +93,8 @@ func (r *SingleRestoreReconciler) Reconcile() (result ctrl.Result, recErr error) r.Recorder.Eventf(r.aeroRestore, corev1.EventTypeNormal, "RestoreCompleted", "Restore completed successfully %s/%s", r.aeroRestore.Namespace, r.aeroRestore.Name) + r.Log.Info("Reconcile completed successfully") + return ctrl.Result{}, nil }