properly generate podTemplate for the cron job's pod

This commit is contained in:
Sergey Dudoladov
2019-04-02 15:26:27 +02:00
parent de9ffb6eff
commit 40175633a5
5 changed files with 59 additions and 23 deletions
+4 -4
View File
@@ -67,10 +67,10 @@ type Scalyr struct {
// LogicalBackup
type LogicalBackup struct {
EnableLogicalBackup bool `json:"enable_logical_backup,omitempty"`
LogicalBackupSchedule string `json:"logical_backup_schedule,omitempty"`
LogicalBackupDockerImage string `json:"logical_backup_docker_image,omitempty"`
LogicalBackupS3Bucket string `json:"logical_backup_s3_bucket,omitempty"`
EnableLogicalBackup bool `name:"enable_logical_backup" default:"false"`
LogicalBackupSchedule string `name:"logical_backup_schedule" default:"30 00 * * *"`
LogicalBackupDockerImage string `name:"logical_backup_image" default:""`
LogicalBackupS3Bucket string `name:"logical_backup_s3_bucket"`
}
// Config describes operator config
+1
View File
@@ -87,6 +87,7 @@ func NewFromConfig(cfg *rest.Config) (KubernetesClient, error) {
kubeClient.PodDisruptionBudgetsGetter = client.PolicyV1beta1()
kubeClient.RESTClient = client.CoreV1().RESTClient()
kubeClient.RoleBindingsGetter = client.RbacV1beta1()
kubeClient.CronJobsGetter = client.BatchV1beta1()
apiextClient, err := apiextclient.NewForConfig(cfg)
if err != nil {