Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

CronJob creation fails during fabric8:apply goal #1271

Closed
smoyer64 opened this issue Apr 12, 2018 · 4 comments
Closed

CronJob creation fails during fabric8:apply goal #1271

smoyer64 opened this issue Apr 12, 2018 · 4 comments
Assignees
Labels
cat/feature Feature request group/kubernetes Kubernetes related issue group/openshift OpenShift related issue
Projects
Milestone

Comments

@smoyer64
Copy link

FMP accepts a manifest (or template) for a kind: CronJob but fails to deploy it to the Kubernetes cluster. Apparently the kubernetes-client library used by FMP doesn't support CronJob yet, so while FMP processes it, pushing it to the cluster causes the following error:

[ERROR] Failed to execute goal io.fabric8:fabric8-maven-plugin:3.5.38:apply (deploy) on project academics-student-importer: Failed to create CronJob from kubernetes.yml. io.fabric8.kubernetes.client.KubernetesClientException: No handler found for object:CronJob(
<the generated manifest>), status=null, additionalProperties={}) -> [Help 1]

See fabric8io/kubernetes-client#1018 for the kubernetes-client roadmap

@rohanKanojia rohanKanojia self-assigned this Jul 12, 2018
@rohanKanojia rohanKanojia added group/kubernetes Kubernetes related issue cat/feature Feature request group/openshift OpenShift related issue labels Jul 13, 2018
@rohanKanojia rohanKanojia added this to the Sprint 153 milestone Aug 1, 2018
@rohanKanojia
Copy link
Member

@smoyer64 : Hi, Do you use CronJobs with v2alpha or v1beta1? Actually, I pushed a change in kubernetes-client for using v1beta1 for CronJob. And after this release of kubernetes-client, we will upgrade fmp to latest kubernetes-client.

@smoyer64
Copy link
Author

smoyer64 commented Aug 9, 2018

Here's the (slightly anonymized) YAML for several of our projects:

apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: application-importer
spec:
  schedule: "*/5 * * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: application-importer
            image: application-importer:${timestamp}
            imagePullPolicy: IfNotPresent
            envFrom:
            - configMapRef:
                name: application-config
            - secretRef:
                name: application-secret
          restartPolicy: Never

@rohanKanojia
Copy link
Member

rohanKanojia commented Aug 9, 2018

@smoyer64 : okay, I see you're using v1beta1. Cool ;-) . Thanks for your feedback

@rohanKanojia
Copy link
Member

Since fmp now has latest kubernetes client i.e v4.0.4, this issue can be closed ;-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cat/feature Feature request group/kubernetes Kubernetes related issue group/openshift OpenShift related issue
Projects
fmp 3.5
  
Awaiting triage
Development

No branches or pull requests

2 participants