|
8 | 8 | b64 "encoding/base64" |
9 | 9 | "encoding/json" |
10 | 10 |
|
11 | | - batchv1beta1 "k8s.io/api/batch/v1beta1" |
12 | | - clientbatchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1" |
| 11 | + batchv1 "k8s.io/api/batch/v1" |
| 12 | + clientbatchv1 "k8s.io/client-go/kubernetes/typed/batch/v1" |
13 | 13 |
|
14 | 14 | apiacidv1 "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1" |
15 | 15 | zalandoclient "github.com/zalando/postgres-operator/pkg/generated/clientset/versioned" |
@@ -63,7 +63,7 @@ type KubernetesClient struct { |
63 | 63 | rbacv1.RoleBindingsGetter |
64 | 64 | policyv1.PodDisruptionBudgetsGetter |
65 | 65 | apiextv1.CustomResourceDefinitionsGetter |
66 | | - clientbatchv1beta1.CronJobsGetter |
| 66 | + clientbatchv1.CronJobsGetter |
67 | 67 | acidv1.OperatorConfigurationsGetter |
68 | 68 | acidv1.PostgresTeamsGetter |
69 | 69 | acidv1.PostgresqlsGetter |
@@ -159,7 +159,7 @@ func NewFromConfig(cfg *rest.Config) (KubernetesClient, error) { |
159 | 159 | kubeClient.PodDisruptionBudgetsGetter = client.PolicyV1() |
160 | 160 | kubeClient.RESTClient = client.CoreV1().RESTClient() |
161 | 161 | kubeClient.RoleBindingsGetter = client.RbacV1() |
162 | | - kubeClient.CronJobsGetter = client.BatchV1beta1() |
| 162 | + kubeClient.CronJobsGetter = client.BatchV1() |
163 | 163 | kubeClient.EventsGetter = client.CoreV1() |
164 | 164 |
|
165 | 165 | apiextClient, err := apiextclient.NewForConfig(cfg) |
@@ -224,12 +224,12 @@ func SamePDB(cur, new *apipolicyv1.PodDisruptionBudget) (match bool, reason stri |
224 | 224 | return |
225 | 225 | } |
226 | 226 |
|
227 | | -func getJobImage(cronJob *batchv1beta1.CronJob) string { |
| 227 | +func getJobImage(cronJob *batchv1.CronJob) string { |
228 | 228 | return cronJob.Spec.JobTemplate.Spec.Template.Spec.Containers[0].Image |
229 | 229 | } |
230 | 230 |
|
231 | 231 | // SameLogicalBackupJob compares Specs of logical backup cron jobs |
232 | | -func SameLogicalBackupJob(cur, new *batchv1beta1.CronJob) (match bool, reason string) { |
| 232 | +func SameLogicalBackupJob(cur, new *batchv1.CronJob) (match bool, reason string) { |
233 | 233 |
|
234 | 234 | if cur.Spec.Schedule != new.Spec.Schedule { |
235 | 235 | return false, fmt.Sprintf("new job's schedule %q does not match the current one %q", |
|
0 commit comments