Add jenkins_v1alpha2_jenkinsimage_crd.yaml
After upgrading to jenkins-operator:v0.5.0 the operator enters
crashloop backoff becasuse JenkinsImage CRD is missing. Adding this file
fixes the problem as per (disregard Helm mentionings):
https://github.com/jenkinsci/kubernetes-operator/issues/503
Change-Id: If4edd89d90bf2c7f438b98eb4f0073d1ff065733
diff --git a/k8s/Makefile b/k8s/Makefile
index 78c935e..04ec8be 100644
--- a/k8s/Makefile
+++ b/k8s/Makefile
@@ -1,4 +1,5 @@
deploy: $(HOME)/.gke-jenkins/oauth-credentials.yaml
+ @kubectl apply -f jenkins_v1alpha2_jenkinsimage_crd.yaml
@kubectl apply -f 00-jenkins_v1alpha2_jenkins_crd.yaml
@kubectl apply -f 01-all-in-one-v1alpha2.yaml
@cat configmap.yaml $(HOME)/.gke-jenkins/oauth-credentials.yaml \
@@ -21,6 +22,7 @@
@kubectl delete -f configmap.yaml
@kubectl delete -f 01-all-in-one-v1alpha2.yaml
@kubectl delete -f 00-jenkins_v1alpha2_jenkins_crd.yaml
+ @kubectl delete -f jenkins_v1alpha2_jenkinsimage_crd.yaml
mrclean: undeploy
@kubectl delete -f ssl-cert.yaml
diff --git a/k8s/jenkins_v1alpha2_jenkinsimage_crd.yaml b/k8s/jenkins_v1alpha2_jenkinsimage_crd.yaml
new file mode 100644
index 0000000..acf4f08
--- /dev/null
+++ b/k8s/jenkins_v1alpha2_jenkinsimage_crd.yaml
@@ -0,0 +1,85 @@
+apiVersion: apiextensions.k8s.io/v1beta1
+kind: CustomResourceDefinition
+metadata:
+ name: jenkinsimages.jenkins.io
+spec:
+ group: jenkins.io
+ names:
+ kind: JenkinsImage
+ listKind: JenkinsImageList
+ plural: jenkinsimages
+ singular: jenkinsimage
+ scope: Namespaced
+ subresources:
+ status: {}
+ validation:
+ openAPIV3Schema:
+ description: JenkinsImage is the Schema for the jenkinsimages API
+ properties:
+ apiVersion:
+ description: 'APIVersion defines the versioned schema of this representation
+ of an object. Servers should convert recognized schemas to the latest
+ internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+ type: string
+ kind:
+ description: 'Kind is a string value representing the REST resource this
+ object represents. Servers may infer this from the endpoint the client
+ submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: JenkinsImageSpec defines the desired state of JenkinsImage
+ properties:
+ image:
+ description: Defines Jenkins Plugin structure
+ properties:
+ name:
+ type: string
+ version:
+ type: string
+ required:
+ - name
+ type: object
+ plugins:
+ items:
+ description: Defines Jenkins Plugin structure
+ properties:
+ name:
+ type: string
+ version:
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ required:
+ - image
+ - plugins
+ type: object
+ status:
+ description: JenkinsImageStatus defines the observed state of JenkinsImage
+ properties:
+ image:
+ type: string
+ installedPlugins:
+ items:
+ description: Defines Jenkins Plugin structure
+ properties:
+ name:
+ type: string
+ version:
+ type: string
+ required:
+ - name
+ type: object
+ type: array
+ md5sum:
+ type: string
+ type: object
+ type: object
+ version: v1alpha2
+ versions:
+ - name: v1alpha2
+ served: true
+ storage: true