Fix the Kubernetes client for V1 CronJobs (not beta anymore)
@@ -32,11 +32,11 @@ def pykube_object(pykube):
@pytest.fixture()
def kubernetes_model(kubernetes):
# The most tricky class -- with attribute-to-key mapping (jobTemplate).
- obj = kubernetes.client.V1beta1CronJob(
+ obj = kubernetes.client.V1CronJob(
metadata=kubernetes.client.V1ObjectMeta(),
- spec=kubernetes.client.V1beta1CronJobSpec(
+ spec=kubernetes.client.V1CronJobSpec(
schedule='* * * * *',
- job_template=kubernetes.client.V1beta1JobTemplateSpec(),
+ job_template=kubernetes.client.V1JobTemplateSpec(),
),
)
return obj
