Use v1alpha2 Jenkins schema

This commit is contained in:
Tomasz Sęk
2019-06-10 17:55:09 +02:00
parent a835c64524
commit 8178e2315e
38 changed files with 362 additions and 311 deletions
+3 -3
View File
@@ -17,7 +17,7 @@ mkdir -p $GOPATH/src/github.com/jenkinsci
cd $GOPATH/src/github.com/jenkinsci/
git clone git@github.com:jenkinsci/kubernetes-operator.git
cd kubernetes-operator
make dep
make go-dependencies
```
## Build and run
@@ -31,7 +31,7 @@ make build && make minikube-run EXTRA_ARGS='--minikube --local'
Once minikube and **jenkins-operator** are up and running, apply Jenkins custom resource:
```bash
kubectl apply -f deploy/crds/jenkins_v1alpha1_jenkins_cr.yaml
kubectl apply -f deploy/crds/jenkins_v1alpha2_jenkins_cr.yaml
kubectl get jenkins -o yaml
kubectl get po
```
@@ -68,7 +68,7 @@ To be able to work with the docker daemon on `minikube` machine run the followin
eval $(minikube docker-env)
```
### When `pkg/apis/jenkinsio/v1alpha1/jenkins_types.go` has changed
### When `pkg/apis/jenkinsio/*/jenkins_types.go` has changed
Run:
+5 -5
View File
@@ -20,7 +20,7 @@ Once jenkins-operator is up and running let's deploy actual Jenkins instance.
Create manifest ie. **jenkins_instance.yaml** with following data and save it on drive.
```bash
apiVersion: jenkins.io/v1alpha1
apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: example
@@ -173,7 +173,7 @@ podTemplate(label: label,
Jenkins Seed Jobs are configured using `Jenkins.spec.seedJobs` section from your custom resource manifest:
```
apiVersion: jenkins.io/v1alpha1
apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: example
@@ -205,7 +205,7 @@ If your GitHub repository is **private** you have to configure SSH or username/p
Configure seed job like:
```
apiVersion: jenkins.io/v1alpha1
apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: example
@@ -243,7 +243,7 @@ data:
Configure seed job like:
```
apiVersion: jenkins.io/v1alpha1
apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: example
@@ -350,7 +350,7 @@ runs the **jenkins-operator-user-configuration-casc** Jenkins Job which applies
Edit CR under `spec.master.plugins`:
```
apiVersion: jenkins.io/v1alpha1
apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: example
+3 -3
View File
@@ -6,15 +6,15 @@ All container images can be found at [virtuslab/jenkins-operator](https://hub.do
## Requirements
To run **jenkins-operator**, you will need:
- running Kubernetes cluster
- kubectl
- running Kubernetes cluster version 1.11+
- kubectl version 1.11+
## Configure Custom Resource Definition
Install Jenkins Custom Resource Definition:
```bash
kubectl apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/crds/jenkins_v1alpha1_jenkins_crd.yaml
kubectl apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/crds/jenkins_v1alpha2_jenkins_crd.yaml
```
## Deploy jenkins-operator