Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor
Etcdcopybackupstask
to eliminate Helm chart (#553)
* Refactor the EtcdCopyBackupsTask controller to formulate/create an EtcdCopyBackupsTaskjob using Golang instead of a Helm chart. * removed helm chart * Add test case for handling ownerReferences with numeric names and leading 0 * Rename `08foo` to `01234` * Apply suggestions from code review Co-authored-by: Shreyas Rao <[email protected]> * Addressed review comments - Added function `GetCopyBackupsJobName` which returns the name of the CopyBackups Job. - Used common constants `GardenerOwnedBy`, `GardenerOwnerType`, `LabelNetworkPolicyToDNS`, `LabelNetworkPolicyToPublicNetworks` instead of static string. - Added function `GetBackupRestoreImage` which returns the image for `backup-restore` from the given image vector. * Fix intergration test * Update api/v1alpha1/types_etcdcopybackupstask.go Co-authored-by: Madhav Bhargava <[email protected]> * revert changes related to Used common constants , * Addressed review comments: - Renamed functions: - `GetCopyBackupsJobName` to `GetJobName` - `getVolumes` to `createVolumesFromstore` - `getVolumeMounts` to `createVolumeMountsFromStore` - `getEnvVarFromValues` to `mapToEnvVar` - `getProviderEnvs` to `createEnvVarsFromStore` - `setEtcdBackupJobCommands` to `createJobCommandFromStore` - Refactored code to formulate the job while addressing review comments. * changed the way Job command is created, removed some methods from image.gog * Add unit tests * Apply suggestions from code review Co-authored-by: Madhav Bhargava <[email protected]> * Addressed review feeback * Removed duplicate test case --------- Co-authored-by: Shreyas Rao <[email protected]> Co-authored-by: Madhav Bhargava <[email protected]>
- Loading branch information