Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilya Bumarskov committed Nov 23, 2021
1 parent a98381d commit 0d55496
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions pkg/apis/zookeeper/v1beta1/zookeeperbackup_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ type ZookeeperBackupSpec struct {

// Name of the ZookeeperCluster to backup
// +kubebuilder:validation:Required
ZookeeperCluster string `json:"zookeeperCluster"`
ZookeeperCluster string `json:"zookeeperCluster"`
// Schedule in Cron format
// +kubebuilder:default:="0 0 */1 * *"
// +optional
Schedule string `json:"schedule,omitempty"`
Schedule string `json:"schedule,omitempty"`
// Number of backups to store
// +kubebuilder:default:="7"
// +optional
BackupsToKeep string `json:"backupsToKeep,omitempty"`
BackupsToKeep string `json:"backupsToKeep,omitempty"`
// Data Storage Capacity
// +kubebuilder:default:="1Gi"
// +optional
Expand Down
18 changes: 9 additions & 9 deletions pkg/controller/zookeeperbackup/zookeeperbackup_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ type ReconcileZookeeperBackup struct {
// that reads objects from the cache and writes to the apiserver
client client.Client
scheme *runtime.Scheme
log logr.Logger
log logr.Logger
}

// Reconcile reads that state of the cluster for a ZookeeperBackup object and makes changes based on the state read
Expand Down Expand Up @@ -272,7 +272,7 @@ func (r *ReconcileZookeeperBackup) GetLeaderIP(zkCluster *zookeeperv1beta1.Zooke
return "", err
}

adminIp := foundSvcAdmin.Spec.ClusterIP
adminIp := foundSvcAdmin.Spec.ClusterIP
svcPort := GetServicePortByName(foundSvcAdmin, "tcp-admin-server")

resp, err := http.Get(fmt.Sprintf("http://%s:%d/commands/leader", adminIp, svcPort.Port))
Expand Down Expand Up @@ -355,24 +355,24 @@ func newCronJobForCR(cr *zookeeperv1beta1.ZookeeperBackup) *batchv1beta1.CronJob
},
Spec: batchv1beta1.CronJobSpec{
Schedule: cr.Spec.Schedule,
Suspend: &suspend,
JobTemplate: batchv1beta1.JobTemplateSpec {
Suspend: &suspend,
JobTemplate: batchv1beta1.JobTemplateSpec{
Spec: batchv1.JobSpec{
Template: corev1.PodTemplateSpec{
Spec: corev1.PodSpec {
Spec: corev1.PodSpec{
RestartPolicy: "Never",
Containers: []corev1.Container{
{
Name: "run-zookeeperbackup",
Image: cr.Spec.Image.ToString(),
Name: "run-zookeeperbackup",
Image: cr.Spec.Image.ToString(),
ImagePullPolicy: cr.Spec.Image.PullPolicy,
VolumeMounts: []corev1.VolumeMount{
{
Name: "zookeeperbackup-vol",
Name: "zookeeperbackup-vol",
MountPath: backupMountPath,
},
{
Name: "zookeeperbackup-data",
Name: "zookeeperbackup-data",
MountPath: "/data",
},
},
Expand Down

0 comments on commit 0d55496

Please sign in to comment.