Merge pull request #167 from jakalkhalili/website-fix

#157 Improved website documentation, removed old github docs
This commit is contained in:
Tomasz Sęk 2019-10-24 15:35:56 +02:00 committed by GitHub
commit fa28fbc30d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
74 changed files with 23762 additions and 4381 deletions

View File

@ -27,14 +27,14 @@ We want to make Jenkins more robust, suitable for dynamic and multi-tenant envir
Some of the problems we want to solve:
- volumes handling (AWS EBS volume attach/detach issue when using PVC)
- installing plugins with incompatible versions or security vulnerabilities
- better configuration as code
- [installing plugins with incompatible versions or security vulnerabilities](https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customization/#install-plugins)
- [better configuration as code](https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customization/)
- lack of end to end tests
- handle graceful shutdown properly
- security and hardening out of the box
- [security and hardening out of the box](https://jenkinsci.github.io/kubernetes-operator/docs/security/)
- orphaned jobs with no jnlp connection
- make errors more visible for end users
- backup and restore for jobs history
- [make errors more visible for end users](https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/diagnostics/)
- [backup and restore for jobs history](https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/)
## Documentation

View File

@ -21,7 +21,7 @@
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-192x192.png"sizes="192x192">
<title>Another Great Release | Jenkins Operator</title><meta property="og:title" content="Another Great Release" />
<meta property="og:description" content="A short lead descripton about this content page. Text here can also be **bold** or _italic_ and can even be split over multiple paragraphs.
<meta property="og:description" content="A short lead description about this content page. Text here can also be **bold** or _italic_ and can even be split over multiple paragraphs.
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/blog/2018/01/04/another-great-release/" />
@ -29,7 +29,7 @@
<meta property="article:modified_time" content="2018-01-04T00:00:00&#43;00:00"/><meta property="og:site_name" content="Jenkins Operator" />
<meta itemprop="name" content="Another Great Release">
<meta itemprop="description" content="A short lead descripton about this content page. Text here can also be **bold** or _italic_ and can even be split over multiple paragraphs.
<meta itemprop="description" content="A short lead description about this content page. Text here can also be **bold** or _italic_ and can even be split over multiple paragraphs.
">
@ -42,7 +42,7 @@
<meta itemprop="keywords" content="" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Another Great Release"/>
<meta name="twitter:description" content="A short lead descripton about this content page. Text here can also be **bold** or _italic_ and can even be split over multiple paragraphs.
<meta name="twitter:description" content="A short lead description about this content page. Text here can also be **bold** or _italic_ and can even be split over multiple paragraphs.
"/>
@ -201,6 +201,23 @@
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/blog/releases/in-depth-monoliths-detailed-spec.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=Another%20Great%20Release" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
<nav id="TableOfContents">
<ul>
<li>
@ -249,7 +266,7 @@
<div class="td-content">
<h1>Another Great Release</h1>
<div class="lead">A short lead descripton about this content page. Text here can also be <strong>bold</strong> or <em>italic</em> and can even be split over multiple paragraphs.</div>
<div class="lead">A short lead description about this content page. Text here can also be <strong>bold</strong> or <em>italic</em> and can even be split over multiple paragraphs.</div>
<div class="td-byline mb-4">
<time datetime="2018-01-04" class="text-muted">Thursday, January 04, 2018</time>

View File

@ -199,6 +199,23 @@
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/blog/news/first-post/index.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=Easy%20documentation%20with%20Docsy" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
</div>

View File

@ -21,7 +21,7 @@
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-192x192.png"sizes="192x192">
<title>The second blog post | Jenkins Operator</title><meta property="og:title" content="The second blog post" />
<meta property="og:description" content="A short lead descripton about this content page. Text here can also be **bold** or _italic_ and can even be split over multiple paragraphs.
<meta property="og:description" content="A short lead description about this content page. Text here can also be **bold** or _italic_ and can even be split over multiple paragraphs.
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/blog/2018/10/06/the-second-blog-post/" />
@ -29,7 +29,7 @@
<meta property="article:modified_time" content="2018-10-06T00:00:00&#43;00:00"/><meta property="og:site_name" content="Jenkins Operator" />
<meta itemprop="name" content="The second blog post">
<meta itemprop="description" content="A short lead descripton about this content page. Text here can also be **bold** or _italic_ and can even be split over multiple paragraphs.
<meta itemprop="description" content="A short lead description about this content page. Text here can also be **bold** or _italic_ and can even be split over multiple paragraphs.
">
@ -42,7 +42,7 @@
<meta itemprop="keywords" content="" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="The second blog post"/>
<meta name="twitter:description" content="A short lead descripton about this content page. Text here can also be **bold** or _italic_ and can even be split over multiple paragraphs.
<meta name="twitter:description" content="A short lead description about this content page. Text here can also be **bold** or _italic_ and can even be split over multiple paragraphs.
"/>
@ -201,6 +201,23 @@
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/blog/news/second-post.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=The%20second%20blog%20post" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
<nav id="TableOfContents">
<ul>
<li>
@ -249,7 +266,7 @@
<div class="td-content">
<h1>The second blog post</h1>
<div class="lead">A short lead descripton about this content page. Text here can also be <strong>bold</strong> or <em>italic</em> and can even be split over multiple paragraphs.</div>
<div class="lead">A short lead description about this content page. Text here can also be <strong>bold</strong> or <em>italic</em> and can even be split over multiple paragraphs.</div>
<div class="td-byline mb-4">
<time datetime="2018-10-06" class="text-muted">Saturday, October 06, 2018</time>

View File

@ -190,6 +190,23 @@
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/blog/_index.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=Docsy%20Blog" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5 pr-md-4" role="main">
<a class="btn btn-lg -bg-orange td-rss-button d-none d-lg-block" href="https://jenkinsci.github.io/kubernetes-operator/blog/index.xml" target="_blank">

View File

@ -191,6 +191,23 @@
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/blog/news/_index.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=News%20About%20Docsy" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5 pr-md-4" role="main">
<a class="btn btn-lg -bg-orange td-rss-button d-none d-lg-block" href="https://jenkinsci.github.io/kubernetes-operator/blog/news/index.xml" target="_blank">

View File

@ -191,6 +191,23 @@
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/blog/releases/_index.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=New%20Releases" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5 pr-md-4" role="main">
<a class="btn btn-lg -bg-orange td-rss-button d-none d-lg-block" href="https://jenkinsci.github.io/kubernetes-operator/blog/releases/index.xml" target="_blank">

View File

@ -199,59 +199,65 @@
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.1.1/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.1.1</a>
<a href="/kubernetes-operator/docs/getting-started/latest/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Latest (v0.2.x)</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-1-1">
<li class="collapse " id="kubernetes-operator-docs-getting-started-latest">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.1/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.1/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configuration" href="/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-customization" href="/kubernetes-operator/docs/getting-started/v0.1.1/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-customization" href="/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-aks" href="/kubernetes-operator/docs/getting-started/v0.1.1/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-aks" href="/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.1/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.1/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-custom-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.1/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-migration" href="/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.1/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-diagnostics" href="/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</li>
@ -270,59 +276,59 @@
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.2.0/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.2.0</a>
<a href="/kubernetes-operator/docs/getting-started/v0.1.x/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.1.x</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-2-0">
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-1-x">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.2.0/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-configuration" href="/kubernetes-operator/docs/getting-started/v0.2.0/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-customization" href="/kubernetes-operator/docs/getting-started/v0.2.0/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-customization" href="/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-aks" href="/kubernetes-operator/docs/getting-started/v0.2.0/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-aks" href="/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.2.0/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-migration" href="/kubernetes-operator/docs/getting-started/v0.2.0/migration/">Migration from v0.1.1</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.2.0/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-scheme" href="/kubernetes-operator/docs/getting-started/v0.2.0/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
@ -400,7 +406,55 @@
</div>
<main class="col-12 col-md-9 col-xl-10 pl-md-5" role="main">
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/docs/Developer%20Guide/_index.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=Developer%20Guide" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
<nav id="TableOfContents">
<ul>
<li>
<ul>
<li><a href="#prerequisites">Prerequisites</a></li>
<li><a href="#clone-repository-and-download-dependencies">Clone repository and download dependencies</a></li>
<li><a href="#build-and-run-with-a-minikube">Build and run with a minikube</a></li>
<li><a href="#build-and-run-with-a-remote-kubernetes-cluster">Build and run with a remote Kubernetes cluster</a></li>
<li><a href="#testing">Testing</a>
<ul>
<li><a href="#running-e2e-tests-on-linux">Running E2E tests on Linux</a></li>
<li><a href="#running-e2e-tests-on-macos">Running E2E tests on macOS</a></li>
</ul></li>
<li><a href="#tips-tricks">Tips &amp; Tricks</a>
<ul>
<li><a href="#building-docker-image-on-minikube-for-e2e-tests">Building docker image on minikube (for e2e tests)</a></li>
<li><a href="#when-pkg-apis-jenkinsio-jenkins-types-go-has-changed">When <code>pkg/apis/jenkinsio/*/jenkins_types.go</code> has changed</a></li>
<li><a href="#getting-the-jenkins-url-and-basic-credentials">Getting the Jenkins URL and basic credentials</a></li>
</ul></li>
</ul></li>
</ul>
</nav>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
<ol class="breadcrumb spb-1">
@ -459,7 +513,7 @@ make go-dependencies</code></pre></div>
<h2 id="build-and-run-with-a-minikube">Build and run with a minikube</h2>
<p>Build and run <strong>Jenkins Operator</strong> locally:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">make minikube-run <span style="color:#000">EXTRA_ARGS</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">&#39;--minikube --local&#39;</span></code></pre></div>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">make build minikube-run <span style="color:#000">EXTRA_ARGS</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">&#39;--minikube --local&#39;</span></code></pre></div>
<p>Once minikube and <strong>Jenkins Operator</strong> are up and running, apply Jenkins custom resource:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply -f deploy/crds/jenkins_v1alpha2_jenkins_cr.yaml
kubectl get jenkins -o yaml
@ -489,9 +543,9 @@ make build e2e</code></pre></div>
<p>At first, you need to start minikube:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ make minikube-start
$ <span style="color:#204a87">eval</span> <span style="color:#204a87;font-weight:bold">$(</span>minikube docker-env<span style="color:#204a87;font-weight:bold">)</span> </code></pre></div>
<p>Build Docker image inside provided Linux container by:</p>
<p>Build a Docker image inside the provided Linux container by:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ make indocker</code></pre></div>
<p>Build <strong>Jenkins Operator</strong> inside container using:</p>
<p>Build <strong>Jenkins Operator</strong> inside a container using:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ make build</code></pre></div>
<p>Then exit the container and run:</p>
@ -508,7 +562,7 @@ $ <span style="color:#204a87">eval</span> <span style="color:#204a87;font-weight
<p>Run:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">make deepcopy-gen</code></pre></div>
<h3 id="getting-jenkins-url-and-basic-credentials">Getting Jenkins URL and basic credentials</h3>
<h3 id="getting-the-jenkins-url-and-basic-credentials">Getting the Jenkins URL and basic credentials</h3>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">minikube service jenkins-operator-http-&lt;cr_name&gt; --url
kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.user}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d
kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.password}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d</code></pre></div>
@ -555,6 +609,8 @@ kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="

View File

@ -206,59 +206,65 @@
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.1.1/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.1.1</a>
<a href="/kubernetes-operator/docs/getting-started/latest/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Latest (v0.2.x)</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-1-1">
<li class="collapse " id="kubernetes-operator-docs-getting-started-latest">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.1/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.1/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configuration" href="/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-customization" href="/kubernetes-operator/docs/getting-started/v0.1.1/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-customization" href="/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-aks" href="/kubernetes-operator/docs/getting-started/v0.1.1/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-aks" href="/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.1/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.1/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-custom-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.1/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-migration" href="/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.1/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-diagnostics" href="/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</li>
@ -277,59 +283,59 @@
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.2.0/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.2.0</a>
<a href="/kubernetes-operator/docs/getting-started/v0.1.x/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.1.x</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-2-0">
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-1-x">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.2.0/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-configuration" href="/kubernetes-operator/docs/getting-started/v0.2.0/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-customization" href="/kubernetes-operator/docs/getting-started/v0.2.0/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-customization" href="/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-aks" href="/kubernetes-operator/docs/getting-started/v0.2.0/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-aks" href="/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.2.0/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-migration" href="/kubernetes-operator/docs/getting-started/v0.2.0/migration/">Migration from v0.1.1</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.2.0/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-scheme" href="/kubernetes-operator/docs/getting-started/v0.2.0/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
@ -407,7 +413,45 @@
</div>
<main class="col-12 col-md-9 col-xl-10 pl-md-5" role="main">
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/docs/Developer%20Guide/tools.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=Tools" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
<nav id="TableOfContents">
<ul>
<li>
<ul>
<li><a href="#configure-environment-variables">Configure environment variables</a></li>
<li><a href="#goimports">goimports</a></li>
<li><a href="#golint">golint</a></li>
<li><a href="#checkmake">checkmake</a></li>
<li><a href="#staticcheck">staticcheck</a></li>
</ul></li>
</ul>
</nav>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
<ol class="breadcrumb spb-1">

View File

@ -199,59 +199,65 @@
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.1.1/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">v0.1.1</a>
<a href="/kubernetes-operator/docs/getting-started/latest/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Latest (v0.2.x)</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started-v0-1-1">
<li class="collapse show" id="kubernetes-operator-docs-getting-started-latest">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.1/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.1/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configuration" href="/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-customization" href="/kubernetes-operator/docs/getting-started/v0.1.1/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-customization" href="/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-aks" href="/kubernetes-operator/docs/getting-started/v0.1.1/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-aks" href="/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.1/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.1/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-custom-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.1/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-migration" href="/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.1/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-diagnostics" href="/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</li>
@ -270,59 +276,59 @@
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.2.0/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">v0.2.0</a>
<a href="/kubernetes-operator/docs/getting-started/v0.1.x/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">v0.1.x</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started-v0-2-0">
<li class="collapse show" id="kubernetes-operator-docs-getting-started-v0-1-x">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.2.0/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-configuration" href="/kubernetes-operator/docs/getting-started/v0.2.0/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-customization" href="/kubernetes-operator/docs/getting-started/v0.2.0/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-customization" href="/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-aks" href="/kubernetes-operator/docs/getting-started/v0.2.0/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-aks" href="/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.2.0/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-migration" href="/kubernetes-operator/docs/getting-started/v0.2.0/migration/">Migration from v0.1.1</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.2.0/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-scheme" href="/kubernetes-operator/docs/getting-started/v0.2.0/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
@ -400,7 +406,32 @@
</div>
<main class="col-12 col-md-9 col-xl-10 pl-md-5" role="main">
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/docs/Getting%20Started/_index.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=Getting%20Started" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
<ol class="breadcrumb spb-1">
@ -486,19 +517,21 @@ Once you have running Kubernetes cluster you can focus on installing <strong>Jen
<div class="entry">
<h5>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.1/">v0.1.1</a>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/">Latest (v0.2.x)</a>
</h5>
<p>How to work with jenkins-operator legacy version. We recommend migration to v0.2.0 version
<p>How to work with jenkins-operator latest version
</p>
</div>
<div class="entry">
<h5>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.0/">v0.2.0</a>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/">v0.1.x</a>
</h5>
<p>How to work with jenkins-operator latest version
<p>How to work with jenkins-operator legacy version. We recommend migration to v0.2.0 version
</p>
</div>

View File

@ -0,0 +1,546 @@
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.55.6" />
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link rel="shortcut icon" href="/favicons/favicon.ico" >
<link rel="apple-touch-icon" href="/kubernetes-operator/favicons/apple-touch-icon-180x180.png" sizes="180x180">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-36x36.png" sizes="36x36">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-48x48.png" sizes="48x48">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-72x72.png" sizes="72x72">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-96x196.png" sizes="96x196">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-144x144.png" sizes="144x144">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-192x192.png"sizes="192x192">
<title>AKS | Jenkins Operator</title><meta property="og:title" content="AKS" />
<meta property="og:description" content="Additional configuration for Azure Kubernetes Service
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/aks/" />
<meta property="article:published_time" content="2019-08-05T00:00:00&#43;00:00"/>
<meta property="article:modified_time" content="2019-08-05T00:00:00&#43;00:00"/><meta property="og:site_name" content="Jenkins Operator" />
<meta itemprop="name" content="AKS">
<meta itemprop="description" content="Additional configuration for Azure Kubernetes Service
">
<meta itemprop="datePublished" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="dateModified" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="wordCount" content="41">
<meta itemprop="keywords" content="" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="AKS"/>
<meta name="twitter:description" content="Additional configuration for Azure Kubernetes Service
"/>
<link rel="preload" href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" as="style">
<link href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" rel="stylesheet" integrity="">
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<title>AKS | Jenkins Operator</title>
</head>
<body class="td-page">
<header>
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
<a class="navbar-brand" href="/kubernetes-operator/">
<img style="width: 32px; height: 32px; margin-right: 7.5px;" src="/kubernetes-operator/img/logo.svg"></img><span class="text-uppercase font-weight-bold">Jenkins Operator</span>
</a>
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
<ul class="navbar-nav mt-2 mt-lg-0">
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/about"><span>What's the Jenkins Operator?</span></a>
</li>
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/docs"><span>Documentation</span></a>
</li>
</ul>
</div>
<div class="navbar-nav d-none d-lg-block">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
</div>
</nav>
</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
<div id="td-sidebar-menu" class="td-sidebar__inner">
<form class="td-sidebar__search d-flex align-items-center">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
</button>
</form>
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Documentation</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/installation/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Installation</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-installation">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/how-it-works/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">How it works</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-how-it-works">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-architecture-and-design" href="/kubernetes-operator/docs/how-it-works/architecture-and-design/">Architecture and design</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-jenkins-docker-images" href="/kubernetes-operator/docs/how-it-works/jenkins-docker-images/">Jenkins Docker Images</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Getting Started</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/latest/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">Latest (v0.2.x)</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started-latest">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configuration" href="/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-customization" href="/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page active" id="m-kubernetes-operator-docs-getting-started-latest-aks" href="/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-custom-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-migration" href="/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-diagnostics" href="/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.1.x/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.1.x</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-1-x">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-customization" href="/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-aks" href="/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/security/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Security</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-security">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/developer-guide/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Developer Guide</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-developer-guide">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-developer-guide-tools" href="/kubernetes-operator/docs/developer-guide/tools/">Tools</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
</nav>
</div>
</div>
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/docs/Getting%20Started/latest/aks.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=AKS" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
<ol class="breadcrumb spb-1">
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/">Documentation</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/">Getting Started</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/">Latest (v0.2.x)</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
</li>
</ol>
</nav >
<div class="td-content">
<h1>AKS</h1>
<div class="lead">Additional configuration for Azure Kubernetes Service</div>
<p>Azure AKS managed Kubernetes service adds to every pod the following envs:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP_ADDR<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_SERVICE_HOST<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span></code></pre></div>
<p>The operator is aware of it and omits these envs when checking if Jenkins pod envs have been changed. It prevents
restart Jenkins pod over and over again.</p>
<div class="text-muted mt-5 pt-3 border-top">Last modified August 5, 2019
</div>
</div>
</main>
</div>
</div>
<footer class="bg-dark py-5 row d-print-none">
<div class="container-fluid mx-sm-5">
<div class="row">
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
</div>
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
<small class="text-white">&copy; 2019 VirtusLab All Rights Reserved</small>
<p class="mt-2"><a href="/kubernetes-operator/about/">What&#39;s the Jenkins Operator?</a></p>
</div>
</div>
</div>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="/kubernetes-operator/js/main.min.15ba3b50c3bd013e1b26793d1a59390ea2e0f21481eafe4022de05a44eba88fc.js" integrity="sha256-Fbo7UMO9AT4bJnk9Glk5DqLg8hSB6v5AIt4FpE66iPw="></script>
</body>
</html>

View File

@ -0,0 +1,851 @@
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.55.6" />
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link rel="shortcut icon" href="/favicons/favicon.ico" >
<link rel="apple-touch-icon" href="/kubernetes-operator/favicons/apple-touch-icon-180x180.png" sizes="180x180">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-36x36.png" sizes="36x36">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-48x48.png" sizes="48x48">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-72x72.png" sizes="72x72">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-96x196.png" sizes="96x196">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-144x144.png" sizes="144x144">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-192x192.png"sizes="192x192">
<title>Configuration | Jenkins Operator</title><meta property="og:title" content="Configuration" />
<meta property="og:description" content="How to configure Jenkins with Operator
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration/" />
<meta property="article:published_time" content="2019-08-05T00:00:00&#43;00:00"/>
<meta property="article:modified_time" content="2019-08-05T00:00:00&#43;00:00"/><meta property="og:site_name" content="Jenkins Operator" />
<meta itemprop="name" content="Configuration">
<meta itemprop="description" content="How to configure Jenkins with Operator
">
<meta itemprop="datePublished" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="dateModified" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="wordCount" content="710">
<meta itemprop="keywords" content="" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Configuration"/>
<meta name="twitter:description" content="How to configure Jenkins with Operator
"/>
<link rel="preload" href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" as="style">
<link href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" rel="stylesheet" integrity="">
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<title>Configuration | Jenkins Operator</title>
</head>
<body class="td-page">
<header>
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
<a class="navbar-brand" href="/kubernetes-operator/">
<img style="width: 32px; height: 32px; margin-right: 7.5px;" src="/kubernetes-operator/img/logo.svg"></img><span class="text-uppercase font-weight-bold">Jenkins Operator</span>
</a>
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
<ul class="navbar-nav mt-2 mt-lg-0">
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/about"><span>What's the Jenkins Operator?</span></a>
</li>
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/docs"><span>Documentation</span></a>
</li>
</ul>
</div>
<div class="navbar-nav d-none d-lg-block">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
</div>
</nav>
</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
<div id="td-sidebar-menu" class="td-sidebar__inner">
<form class="td-sidebar__search d-flex align-items-center">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
</button>
</form>
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Documentation</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/installation/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Installation</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-installation">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/how-it-works/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">How it works</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-how-it-works">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-architecture-and-design" href="/kubernetes-operator/docs/how-it-works/architecture-and-design/">Architecture and design</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-jenkins-docker-images" href="/kubernetes-operator/docs/how-it-works/jenkins-docker-images/">Jenkins Docker Images</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Getting Started</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/latest/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">Latest (v0.2.x)</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started-latest">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page active" id="m-kubernetes-operator-docs-getting-started-latest-configuration" href="/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-customization" href="/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-aks" href="/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-custom-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-migration" href="/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-diagnostics" href="/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.1.x/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.1.x</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-1-x">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-customization" href="/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-aks" href="/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/security/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Security</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-security">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/developer-guide/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Developer Guide</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-developer-guide">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-developer-guide-tools" href="/kubernetes-operator/docs/developer-guide/tools/">Tools</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
</nav>
</div>
</div>
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/docs/Getting%20Started/latest/configuration.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=Configuration" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
<nav id="TableOfContents">
<ul>
<li>
<ul>
<li><a href="#configure-seed-jobs-and-pipelines">Configure Seed Jobs and Pipelines</a></li>
<li><a href="#prepare-job-definitions-and-pipelines">Prepare job definitions and pipelines</a></li>
<li><a href="#configure-seed-jobs">Configure Seed Jobs</a>
<ul>
<li><a href="#ssh-authentication">SSH authentication</a>
<ul>
<li><a href="#generate-ssh-keys">Generate SSH Keys</a></li>
<li><a href="#public-key">Public key</a></li>
<li><a href="#configure-ssh-authentication">Configure SSH authentication</a></li>
</ul></li>
<li><a href="#username-password-authentication">Username &amp; password authentication</a></li>
</ul></li>
<li><a href="#http-proxy-for-downloading-plugins">HTTP Proxy for downloading plugins</a></li>
<li><a href="#pulling-docker-images-from-private-repositories">Pulling Docker images from private repositories</a>
<ul>
<li><a href="#docker-hub-configuration">Docker Hub Configuration</a></li>
</ul></li>
</ul></li>
</ul>
</nav>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
<ol class="breadcrumb spb-1">
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/">Documentation</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/">Getting Started</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/">Latest (v0.2.x)</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
</li>
</ol>
</nav >
<div class="td-content">
<h1>Configuration</h1>
<div class="lead">How to configure Jenkins with Operator</div>
<h2 id="configure-seed-jobs-and-pipelines">Configure Seed Jobs and Pipelines</h2>
<p>Jenkins operator uses <a href="https://github.com/jenkinsci/job-dsl-plugin" target="_blank">job-dsl</a> and <a href="https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/" target="_blank">kubernetes-credentials-provider</a> plugins for configuring jobs
and deploy keys.</p>
<h2 id="prepare-job-definitions-and-pipelines">Prepare job definitions and pipelines</h2>
<p>First you have to prepare pipelines and job definition in your GitHub repository using the following structure:</p>
<pre><code>cicd/
├── jobs
│   └── build.jenkins
└── pipelines
└── build.jenkins
</code></pre>
<p><strong>cicd/jobs/build.jenkins</strong> it&rsquo;s a job definition:</p>
<pre><code>#!/usr/bin/env groovy
pipelineJob('build-jenkins-operator') {
displayName('Build jenkins-operator')
definition {
cpsScm {
scm {
git {
remote {
url('https://github.com/jenkinsci/kubernetes-operator.git')
credentials('jenkins-operator')
}
branches('*/master')
}
}
scriptPath('cicd/pipelines/build.jenkins')
}
}
}
</code></pre>
<p><strong>cicd/pipelines/build.jenkins</strong> it&rsquo;s an actual Jenkins pipeline:</p>
<pre><code>#!/usr/bin/env groovy
def label = &quot;build-jenkins-operator-${UUID.randomUUID().toString()}&quot;
def home = &quot;/home/jenkins&quot;
def workspace = &quot;${home}/workspace/build-jenkins-operator&quot;
def workdir = &quot;${workspace}/src/github.com/jenkinsci/kubernetes-operator/&quot;
podTemplate(label: label,
containers: [
containerTemplate(name: 'jnlp', image: 'jenkins/jnlp-slave:alpine'),
containerTemplate(name: 'go', image: 'golang:1-alpine', command: 'cat', ttyEnabled: true),
],
envVars: [
envVar(key: 'GOPATH', value: workspace),
],
) {
node(label) {
dir(workdir) {
stage('Init') {
timeout(time: 3, unit: 'MINUTES') {
checkout scm
}
container('go') {
sh 'apk --no-cache --update add make git gcc libc-dev'
}
}
stage('Dep') {
container('go') {
sh 'make dep'
}
}
stage('Test') {
container('go') {
sh 'make test'
}
}
stage('Build') {
container('go') {
sh 'make build'
}
}
}
}
}
</code></pre>
<h2 id="configure-seed-jobs">Configure Seed Jobs</h2>
<p>Jenkins Seed Jobs are configured using <code>Jenkins.spec.seedJobs</code> section from your custom resource manifest:</p>
<pre><code>apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: example
spec:
seedJobs:
- id: jenkins-operator
targets: &quot;cicd/jobs/*.jenkins&quot;
description: &quot;Jenkins Operator repository&quot;
repositoryBranch: master
repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
</code></pre>
<p><strong>Jenkins Operator</strong> will automatically discover and configure all seed jobs.</p>
<p>You can verify if deploy keys were successfully configured in Jenkins <strong>Credentials</strong> tab.</p>
<p><img src="/kubernetes-operator/img/jenkins-credentials.png" alt="jenkins" /></p>
<p>You can verify if your pipelines were successfully configured in Jenkins Seed Job console output.</p>
<p><img src="/kubernetes-operator/img/jenkins-seed.png" alt="jenkins" /></p>
<p>If your GitHub repository is <strong>private</strong> you have to configure SSH or username/password authentication.</p>
<h3 id="ssh-authentication">SSH authentication</h3>
<h4 id="generate-ssh-keys">Generate SSH Keys</h4>
<p>There are two methods of SSH private key generation:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl genrsa -out &lt;filename&gt; <span style="color:#0000cf;font-weight:bold">2048</span></code></pre></div>
<p>or</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ ssh-keygen -t rsa -b <span style="color:#0000cf;font-weight:bold">2048</span>
$ ssh-keygen -p -f &lt;filename&gt; -m pem</code></pre></div>
<p>Then copy content from generated file.</p>
<h4 id="public-key">Public key</h4>
<p>If you want to upload your public key to your Git server you need to extract it.</p>
<p>If key was generated by <code>openssl</code> then you need to type this to extract public key:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl rsa -in &lt;filename&gt; -pubout &gt; &lt;filename&gt;.pub</code></pre></div>
<p>If key was generated by <code>ssh-keygen</code> the public key content is located in <filename>.pub and there is no need to extract public key</p>
<h4 id="configure-ssh-authentication">Configure SSH authentication</h4>
<p>Configure seed job like:</p>
<pre><code>apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: example
spec:
seedJobs:
- id: jenkins-operator-ssh
credentialType: basicSSHUserPrivateKey
credentialID: k8s-ssh
targets: &quot;cicd/jobs/*.jenkins&quot;
description: &quot;Jenkins Operator repository&quot;
repositoryBranch: master
repositoryUrl: git@github.com:jenkinsci/kubernetes-operator.git
</code></pre>
<p>and create Kubernetes Secret(name of secret should be the same from <code>credentialID</code> field):</p>
<pre><code>apiVersion: v1
kind: Secret
metadata:
name: k8s-ssh
stringData:
privateKey: |
-----BEGIN RSA PRIVATE KEY-----
MIIJKAIBAAKCAgEAxxDpleJjMCN5nusfW/AtBAZhx8UVVlhhhIKXvQ+dFODQIdzO
oDXybs1zVHWOj31zqbbJnsfsVZ9Uf3p9k6xpJ3WFY9b85WasqTDN1xmSd6swD4N8
...
username: github_user_name
</code></pre>
<h3 id="username-password-authentication">Username &amp; password authentication</h3>
<p>Configure seed job like:</p>
<pre><code>apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: example
spec:
seedJobs:
- id: jenkins-operator-user-pass
credentialType: usernamePassword
credentialID: k8s-user-pass
targets: &quot;cicd/jobs/*.jenkins&quot;
description: &quot;Jenkins Operator repository&quot;
repositoryBranch: master
repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
</code></pre>
<p>and create Kubernetes Secret(name of secret should be the same from <code>credentialID</code> field):</p>
<pre><code>apiVersion: v1
kind: Secret
metadata:
name: k8s-user-pass
stringData:
username: github_user_name
password: password_or_token
</code></pre>
<h2 id="http-proxy-for-downloading-plugins">HTTP Proxy for downloading plugins</h2>
<p>To use forwarding proxy with operator to downloading plugins you need to put environment var to Jenkins CR, for e.g.:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>CURL_OPTIONS<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-L<span style="color:#f8f8f8;text-decoration:underline"> </span>-x<span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;proxy_url&gt;</code></pre></div>
<p>In <code>CURL_OPTIONS</code> var you can set additional arguments to curl command.</p>
<h2 id="pulling-docker-images-from-private-repositories">Pulling Docker images from private repositories</h2>
<p>To pull Docker Image from private repository you can use <code>imagePullSecrets</code>.</p>
<p>Please follow the instructions on <a href="https://kubernetes.io/docs/concepts/containers/images/?origin_team=T42NTAGHM#creating-a-secret-with-a-docker-config" target="_blank">creating a secret with a docker config</a>.</p>
<h3 id="docker-hub-configuration">Docker Hub Configuration</h3>
<p>To use Docker Hub additional steps are required.</p>
<p>Edit the previously created secret:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl -n &lt;namespace&gt; edit secret &lt;name&gt;</code></pre></div>
<p>The <code>.dockerconfigjson</code> key&rsquo;s value needs to be replaced with a modified version.</p>
<p>After modifications it needs to be encoded as Base64 value before setting the <code>.dockerconfigjson</code> key:q.</p>
<p>Example config file to modify and use:</p>
<pre><code>{
&quot;auths&quot;:{
&quot;https://index.docker.io/v1/&quot;:{
&quot;username&quot;:&quot;user&quot;,
&quot;password&quot;:&quot;password&quot;,
&quot;email&quot;:&quot;yourdockeremail@gmail.com&quot;,
&quot;auth&quot;:&quot;base64 of string user:password&quot;
},
&quot;auth.docker.io&quot;:{
&quot;username&quot;:&quot;user&quot;,
&quot;password&quot;:&quot;password&quot;,
&quot;email&quot;:&quot;yourdockeremail@gmail.com&quot;,
&quot;auth&quot;:&quot;base64 of string user:password&quot;
},
&quot;registry.docker.io&quot;:{
&quot;username&quot;:&quot;user&quot;,
&quot;password&quot;:&quot;password&quot;,
&quot;email&quot;:&quot;yourdockeremail@gmail.com&quot;,
&quot;auth&quot;:&quot;base64 of string user:password&quot;
},
&quot;docker.io&quot;:{
&quot;username&quot;:&quot;user&quot;,
&quot;password&quot;:&quot;password&quot;,
&quot;email&quot;:&quot;yourdockeremail@gmail.com&quot;,
&quot;auth&quot;:&quot;base64 of string user:password&quot;
},
&quot;https://registry-1.docker.io/v2/&quot;: {
&quot;username&quot;:&quot;user&quot;,
&quot;password&quot;:&quot;password&quot;,
&quot;email&quot;:&quot;yourdockeremail@gmail.com&quot;,
&quot;auth&quot;:&quot;base64 of string user:password&quot;
},
&quot;registry-1.docker.io/v2/&quot;: {
&quot;username&quot;:&quot;user&quot;,
&quot;password&quot;:&quot;password&quot;,
&quot;email&quot;:&quot;yourdockeremail@gmail.com&quot;,
&quot;auth&quot;:&quot;base64 of string user:password&quot;
},
&quot;registry-1.docker.io&quot;: {
&quot;username&quot;:&quot;user&quot;,
&quot;password&quot;:&quot;password&quot;,
&quot;email&quot;:&quot;yourdockeremail@gmail.com&quot;,
&quot;auth&quot;:&quot;base64 of string user:password&quot;
},
&quot;https://registry-1.docker.io&quot;: {
&quot;username&quot;:&quot;user&quot;,
&quot;password&quot;:&quot;password&quot;,
&quot;email&quot;:&quot;yourdockeremail@gmail.com&quot;,
&quot;auth&quot;:&quot;base64 of string user:password&quot;
}
}
}
</code></pre>
<div class="text-muted mt-5 pt-3 border-top">Last modified August 5, 2019
</div>
</div>
</main>
</div>
</div>
<footer class="bg-dark py-5 row d-print-none">
<div class="container-fluid mx-sm-5">
<div class="row">
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
</div>
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
<small class="text-white">&copy; 2019 VirtusLab All Rights Reserved</small>
<p class="mt-2"><a href="/kubernetes-operator/about/">What&#39;s the Jenkins Operator?</a></p>
</div>
</div>
</div>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="/kubernetes-operator/js/main.min.15ba3b50c3bd013e1b26793d1a59390ea2e0f21481eafe4022de05a44eba88fc.js" integrity="sha256-Fbo7UMO9AT4bJnk9Glk5DqLg8hSB6v5AIt4FpE66iPw="></script>
</body>
</html>

View File

@ -0,0 +1,622 @@
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.55.6" />
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link rel="shortcut icon" href="/favicons/favicon.ico" >
<link rel="apple-touch-icon" href="/kubernetes-operator/favicons/apple-touch-icon-180x180.png" sizes="180x180">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-36x36.png" sizes="36x36">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-48x48.png" sizes="48x48">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-72x72.png" sizes="72x72">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-96x196.png" sizes="96x196">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-144x144.png" sizes="144x144">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-192x192.png"sizes="192x192">
<title>Configure backup and restore | Jenkins Operator</title><meta property="og:title" content="Configure backup and restore" />
<meta property="og:description" content="Prevent loss of job history
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/" />
<meta property="article:published_time" content="2019-08-05T00:00:00&#43;00:00"/>
<meta property="article:modified_time" content="2019-08-05T00:00:00&#43;00:00"/><meta property="og:site_name" content="Jenkins Operator" />
<meta itemprop="name" content="Configure backup and restore">
<meta itemprop="description" content="Prevent loss of job history
">
<meta itemprop="datePublished" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="dateModified" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="wordCount" content="149">
<meta itemprop="keywords" content="" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Configure backup and restore"/>
<meta name="twitter:description" content="Prevent loss of job history
"/>
<link rel="preload" href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" as="style">
<link href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" rel="stylesheet" integrity="">
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<title>Configure backup and restore | Jenkins Operator</title>
</head>
<body class="td-page">
<header>
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
<a class="navbar-brand" href="/kubernetes-operator/">
<img style="width: 32px; height: 32px; margin-right: 7.5px;" src="/kubernetes-operator/img/logo.svg"></img><span class="text-uppercase font-weight-bold">Jenkins Operator</span>
</a>
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
<ul class="navbar-nav mt-2 mt-lg-0">
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/about"><span>What's the Jenkins Operator?</span></a>
</li>
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/docs"><span>Documentation</span></a>
</li>
</ul>
</div>
<div class="navbar-nav d-none d-lg-block">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
</div>
</nav>
</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
<div id="td-sidebar-menu" class="td-sidebar__inner">
<form class="td-sidebar__search d-flex align-items-center">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
</button>
</form>
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Documentation</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/installation/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Installation</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-installation">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/how-it-works/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">How it works</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-how-it-works">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-architecture-and-design" href="/kubernetes-operator/docs/how-it-works/architecture-and-design/">Architecture and design</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-jenkins-docker-images" href="/kubernetes-operator/docs/how-it-works/jenkins-docker-images/">Jenkins Docker Images</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Getting Started</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/latest/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">Latest (v0.2.x)</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started-latest">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configuration" href="/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-customization" href="/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-aks" href="/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page active" id="m-kubernetes-operator-docs-getting-started-latest-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-custom-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-migration" href="/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-diagnostics" href="/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.1.x/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.1.x</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-1-x">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-customization" href="/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-aks" href="/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/security/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Security</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-security">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/developer-guide/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Developer Guide</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-developer-guide">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-developer-guide-tools" href="/kubernetes-operator/docs/developer-guide/tools/">Tools</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
</nav>
</div>
</div>
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/docs/Getting%20Started/latest/configure-backup-and-restore.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=Configure%20backup%20and%20restore" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
<nav id="TableOfContents">
<ul>
<li>
<ul>
<li>
<ul>
<li><a href="#pvc">PVC</a>
<ul>
<li><a href="#create-pvc">Create PVC</a></li>
<li><a href="#configure-jenkins-cr">Configure Jenkins CR</a></li>
</ul></li>
</ul></li>
</ul></li>
</ul>
</nav>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
<ol class="breadcrumb spb-1">
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/">Documentation</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/">Getting Started</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/">Latest (v0.2.x)</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
</li>
</ol>
</nav >
<div class="td-content">
<h1>Configure backup and restore</h1>
<div class="lead">Prevent loss of job history</div>
<p>Backup and restore is done by container sidecar.</p>
<h3 id="pvc">PVC</h3>
<h4 id="create-pvc">Create PVC</h4>
<p>Save to file pvc.yaml:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>PersistentVolumeClaim<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt;
</span><span style="color:#8f5902;font-style:italic"> namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>accessModes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>ReadWriteOnce<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>storage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Gi</code></pre></div>
<p>Run command:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n &lt;namespace&gt; create -f pvc.yaml</code></pre></div>
<h4 id="configure-jenkins-cr">Configure Jenkins CR</h4>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;cr_name<span style="color:#8f5902;font-style:italic">&gt;
</span><span style="color:#8f5902;font-style:italic"> namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>runAsUser<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>fsGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/jenkins<span style="color:#000;font-weight:bold">:</span>lts<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container responsible for backup and restore</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_DIR<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_COUNT<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;3&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># keep only the 2 most recent backups</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>virtuslab/jenkins-operator-backup-pvc<span style="color:#000;font-weight:bold">:</span>v0.<span style="color:#0000cf;font-weight:bold">0.7</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># look at backup/pvc directory</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>IfNotPresent<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumeMounts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Jenkins home volume</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-home<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># backup volume</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># PVC volume where backups will be stored</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>persistentVolumeClaim<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>claimName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt;
</span><span style="color:#8f5902;font-style:italic"> backup:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for backup</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to make backup, for example /home/user/bin/backup.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>interval<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">30</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># how often make backup in seconds</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>makeBackupBeforePodDeletion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># make backup before pod deletion</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for restore backup</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to make restore backup, for example /home/user/bin/restore.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">#recoveryOnce: &lt;backup_number&gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored</span></code></pre></div>
<div class="text-muted mt-5 pt-3 border-top">Last modified August 5, 2019
</div>
</div>
</main>
</div>
</div>
<footer class="bg-dark py-5 row d-print-none">
<div class="container-fluid mx-sm-5">
<div class="row">
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
</div>
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
<small class="text-white">&copy; 2019 VirtusLab All Rights Reserved</small>
<p class="mt-2"><a href="/kubernetes-operator/about/">What&#39;s the Jenkins Operator?</a></p>
</div>
</div>
</div>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="/kubernetes-operator/js/main.min.15ba3b50c3bd013e1b26793d1a59390ea2e0f21481eafe4022de05a44eba88fc.js" integrity="sha256-Fbo7UMO9AT4bJnk9Glk5DqLg8hSB6v5AIt4FpE66iPw="></script>
</body>
</html>

View File

@ -0,0 +1,712 @@
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.55.6" />
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link rel="shortcut icon" href="/favicons/favicon.ico" >
<link rel="apple-touch-icon" href="/kubernetes-operator/favicons/apple-touch-icon-180x180.png" sizes="180x180">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-36x36.png" sizes="36x36">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-48x48.png" sizes="48x48">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-72x72.png" sizes="72x72">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-96x196.png" sizes="96x196">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-144x144.png" sizes="144x144">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-192x192.png"sizes="192x192">
<title>Custom Backup and Restore Providers | Jenkins Operator</title><meta property="og:title" content="Custom Backup and Restore Providers" />
<meta property="og:description" content="Custom backup and restore provider
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/" />
<meta property="article:published_time" content="2019-08-05T00:00:00&#43;00:00"/>
<meta property="article:modified_time" content="2019-08-05T00:00:00&#43;00:00"/><meta property="og:site_name" content="Jenkins Operator" />
<meta itemprop="name" content="Custom Backup and Restore Providers">
<meta itemprop="description" content="Custom backup and restore provider
">
<meta itemprop="datePublished" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="dateModified" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="wordCount" content="515">
<meta itemprop="keywords" content="" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Custom Backup and Restore Providers"/>
<meta name="twitter:description" content="Custom backup and restore provider
"/>
<link rel="preload" href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" as="style">
<link href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" rel="stylesheet" integrity="">
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<title>Custom Backup and Restore Providers | Jenkins Operator</title>
</head>
<body class="td-page">
<header>
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
<a class="navbar-brand" href="/kubernetes-operator/">
<img style="width: 32px; height: 32px; margin-right: 7.5px;" src="/kubernetes-operator/img/logo.svg"></img><span class="text-uppercase font-weight-bold">Jenkins Operator</span>
</a>
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
<ul class="navbar-nav mt-2 mt-lg-0">
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/about"><span>What's the Jenkins Operator?</span></a>
</li>
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/docs"><span>Documentation</span></a>
</li>
</ul>
</div>
<div class="navbar-nav d-none d-lg-block">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
</div>
</nav>
</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
<div id="td-sidebar-menu" class="td-sidebar__inner">
<form class="td-sidebar__search d-flex align-items-center">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
</button>
</form>
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Documentation</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/installation/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Installation</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-installation">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/how-it-works/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">How it works</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-how-it-works">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-architecture-and-design" href="/kubernetes-operator/docs/how-it-works/architecture-and-design/">Architecture and design</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-jenkins-docker-images" href="/kubernetes-operator/docs/how-it-works/jenkins-docker-images/">Jenkins Docker Images</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Getting Started</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/latest/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">Latest (v0.2.x)</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started-latest">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configuration" href="/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-customization" href="/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-aks" href="/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page active" id="m-kubernetes-operator-docs-getting-started-latest-custom-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-migration" href="/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-diagnostics" href="/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.1.x/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.1.x</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-1-x">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-customization" href="/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-aks" href="/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/security/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Security</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-security">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/developer-guide/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Developer Guide</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-developer-guide">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-developer-guide-tools" href="/kubernetes-operator/docs/developer-guide/tools/">Tools</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
</nav>
</div>
</div>
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/docs/Getting%20Started/latest/custom-backup-and-restore.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=Custom%20Backup%20and%20Restore%20Providers" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
<nav id="TableOfContents">
<ul>
<li>
<ul>
<li><a href="#requirements">Requirements</a></li>
<li><a href="#how-it-works">How it works</a></li>
<li><a href="#example-aws-s3-backup-using-the-cli">Example AWS S3 backup using the CLI</a></li>
</ul></li>
</ul>
</nav>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
<ol class="breadcrumb spb-1">
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/">Documentation</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/">Getting Started</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/">Latest (v0.2.x)</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
</li>
</ol>
</nav >
<div class="td-content">
<h1>Custom Backup and Restore Providers</h1>
<div class="lead">Custom backup and restore provider</div>
<p>With enough effort one can create a custom backup and restore provider
for the Jenkins Operator.</p>
<h2 id="requirements">Requirements</h2>
<p>Two commands (e.g. scripts) are required:
- a backup command, e.g. <code>backup.sh</code> that takes one argument, a <strong>backup number</strong>
- a restore command, e.g. <code>backup.sh</code> that takes one argument, a <strong>backup number</strong></p>
<p>Both scripts need to return an exit code of <code>0</code> on success and <code>1</code> or greater for failure.</p>
<p>One of those scripts (or the entry point of the container) needs to be responsible
for backup cleanup or rotation if required, or an external system.</p>
<h2 id="how-it-works">How it works</h2>
<p>The mechanism relies on basic Kubernetes and UNIX functionalities.</p>
<p>The backup (and restore) container runs as a sidecar in the same
Kubernetes pod as the Jenkins master.</p>
<p>Name of the backup and restore containers can be set as necessary using
<code>spec.backup.containerName</code> and <code>spec.restore.containerName</code>.
In most cases it will be the same container, but we allow for less common use cases.</p>
<p>The operator will call a backup or restore commands inside a sidecar container when necessary:
- backup command (defined in <code>spec.backup.action.exec.command</code>)
will be called every <code>N</code> seconds configurable in: <code>spec.backup.interval</code>
and on pod shutdown (if enabled in <code>spec.backup.makeBackupBeforePodDeletion</code>)
with an integer representing the current backup number as first and only argument
- restore command (defined in <code>spec.restore.action.exec.command</code>)
will be called at Jenkins startup
with an integer representing the backup number to restore as first and only argument
(can be overridden using <code>spec.restore.recoveryOnce</code>)</p>
<h2 id="example-aws-s3-backup-using-the-cli">Example AWS S3 backup using the CLI</h2>
<p>This example shows abbreviated version of a simple AWS S3 backup implementation
using: <code>aws-cli</code>, <code>bash</code> and <code>kube2iam</code>.</p>
<p>In addition to your normal <code>Jenkins</code> <code>CustomResource</code> some additional settings
for backup and restore are required, e.g.:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha1<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>masterAnnotations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>iam.amazonaws.com/role<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;my-example-backup-role&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># tell kube2iam where the AWS IAM role is</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container responsible for backup and restore</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>quay.io/virtuslab/aws-cli<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.16</span>.<span style="color:#0000cf;font-weight:bold">263</span>-<span style="color:#0000cf;font-weight:bold">2</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workingDir<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># our container entry point</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>sleep<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>infinity<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_BUCKET<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-example-bucket<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the S3 bucket name to use</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_PATH<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-backup-path<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the S3 bucket path prefix to use</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># the path to mount jenkins home dir in the backup container</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumeMounts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Jenkins home volume</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-home<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>subPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup.sh<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readOnly<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>subPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore.sh<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readOnly<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup-scripts<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configMap<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>defaultMode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0754</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-backup-s3<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># make sure both containers use the same UID and GUID</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>runAsUser<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>fsGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name responsible for backup</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>interval<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3600</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># how often make a backup in seconds</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>makeBackupBeforePodDeletion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># trigger backup just before deleting the pod</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to create a backup,</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># &lt;backup_number&gt; is passed by operator,</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># for example /home/user/bin/backup.sh &lt;backup_number&gt;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for restore backup</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to restore a backup,</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># for example /home/user/bin/restore.sh &lt;backup_number&gt;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#8f5902;font-style:italic"># recoveryOnce: &lt;backup_number&gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored</span></code></pre></div>
<p>The actual backup and restore scripts will be provided in a <code>ConfigMap</code>:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-backup-s3<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>labels<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>app<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup.sh<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>|<span style="color:#8f5902;font-style:italic">-
</span><span style="color:#8f5902;font-style:italic"> #!/bin/bash -xeu</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>!<span style="color:#f8f8f8;text-decoration:underline"> </span>$<span style="color:#8f5902;font-style:italic"># -eq 1 ]] &amp;&amp; echo &#34;Usage: $0 backup_number&#34; &amp;&amp; exit 1;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_BUCKET}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_BUCKET&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_PATH}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_PATH&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${JENKINS_HOME}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;JENKINS_HOME&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup_number=$<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Running backup #${backup_number}&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_TMP_DIR=$(mktemp<span style="color:#f8f8f8;text-decoration:underline"> </span>-d)<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tar<span style="color:#f8f8f8;text-decoration:underline"> </span>-C<span style="color:#f8f8f8;text-decoration:underline"> </span>${JENKINS_HOME}<span style="color:#f8f8f8;text-decoration:underline"> </span>-czf<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_TMP_DIR}/${backup_number}.tar.gz&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>--exclude<span style="color:#f8f8f8;text-decoration:underline"> </span>jobs/<span style="color:#8f5902;font-style:italic">*/config.xml</span><span style="color:#f8f8f8;text-decoration:underline"> </span>--exclude<span style="color:#f8f8f8;text-decoration:underline"> </span>jobs/<span style="color:#8f5902;font-style:italic">*/workspace*</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-c<span style="color:#f8f8f8;text-decoration:underline"> </span>jobs<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>\<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>aws<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#f8f8f8;text-decoration:underline"> </span>cp<span style="color:#f8f8f8;text-decoration:underline"> </span>${BACKUP_TMP_DIR}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#000;font-weight:bold">:</span>//${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span>Done<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore.sh<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>|<span style="color:#8f5902;font-style:italic">-
</span><span style="color:#8f5902;font-style:italic"> #!/bin/bash -xeu</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>!<span style="color:#f8f8f8;text-decoration:underline"> </span>$<span style="color:#8f5902;font-style:italic"># -eq 1 ]] &amp;&amp; echo &#34;Usage: $0 backup_number&#34; &amp;&amp; exit 1</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_BUCKET}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_BUCKET&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_PATH}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;BACKUP_PATH&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[[</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-z<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${JENKINS_HOME}&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">]]</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Required &#39;JENKINS_HOME&#39; env not set&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exit<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>;<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup_number=$<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Running restore #${backup_number}&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_TMP_DIR=$(mktemp<span style="color:#f8f8f8;text-decoration:underline"> </span>-d)<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>aws<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#f8f8f8;text-decoration:underline"> </span>cp<span style="color:#f8f8f8;text-decoration:underline"> </span>s3<span style="color:#000;font-weight:bold">:</span>//${BACKUP_BUCKET}/${BACKUP_PATH}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline"> </span>${BACKUP_TMP_DIR}/${backup_number}.tar.gz<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tar<span style="color:#f8f8f8;text-decoration:underline"> </span>-C<span style="color:#f8f8f8;text-decoration:underline"> </span>${JENKINS_HOME}<span style="color:#f8f8f8;text-decoration:underline"> </span>-zxf<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;${BACKUP_TMP_DIR}/${backup_number}.tar.gz&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>echo<span style="color:#f8f8f8;text-decoration:underline"> </span>Done</code></pre></div>
<p>In our example we will use S3 bucket lifecycle policy to keep
the number of backups under control, e.g. Cloud Formation fragment:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#f8f8f8;text-decoration:underline"> </span>Type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>AWS<span style="color:#000;font-weight:bold">::</span>S3<span style="color:#000;font-weight:bold">::</span>Bucket<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Properties<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BucketName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-example-bucket<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>...<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>LifecycleConfiguration<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Rules<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>Id<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BackupCleanup<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Status<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Enabled<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Prefix<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>my-backup-path<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ExpirationInDays<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">7</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>NoncurrentVersionExpirationInDays<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">14</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>AbortIncompleteMultipartUpload<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>DaysAfterInitiation<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3</span></code></pre></div>
<div class="text-muted mt-5 pt-3 border-top">Last modified August 5, 2019
</div>
</div>
</main>
</div>
</div>
<footer class="bg-dark py-5 row d-print-none">
<div class="container-fluid mx-sm-5">
<div class="row">
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
</div>
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
<small class="text-white">&copy; 2019 VirtusLab All Rights Reserved</small>
<p class="mt-2"><a href="/kubernetes-operator/about/">What&#39;s the Jenkins Operator?</a></p>
</div>
</div>
</div>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="/kubernetes-operator/js/main.min.15ba3b50c3bd013e1b26793d1a59390ea2e0f21481eafe4022de05a44eba88fc.js" integrity="sha256-Fbo7UMO9AT4bJnk9Glk5DqLg8hSB6v5AIt4FpE66iPw="></script>
</body>
</html>

View File

@ -0,0 +1,703 @@
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.55.6" />
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link rel="shortcut icon" href="/favicons/favicon.ico" >
<link rel="apple-touch-icon" href="/kubernetes-operator/favicons/apple-touch-icon-180x180.png" sizes="180x180">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-36x36.png" sizes="36x36">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-48x48.png" sizes="48x48">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-72x72.png" sizes="72x72">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-96x196.png" sizes="96x196">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-144x144.png" sizes="144x144">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-192x192.png"sizes="192x192">
<title>Customization | Jenkins Operator</title><meta property="og:title" content="Customization" />
<meta property="og:description" content="How to customize Jenkins
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customization/" />
<meta property="article:published_time" content="2019-08-05T00:00:00&#43;00:00"/>
<meta property="article:modified_time" content="2019-08-05T00:00:00&#43;00:00"/><meta property="og:site_name" content="Jenkins Operator" />
<meta itemprop="name" content="Customization">
<meta itemprop="description" content="How to customize Jenkins
">
<meta itemprop="datePublished" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="dateModified" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="wordCount" content="252">
<meta itemprop="keywords" content="" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Customization"/>
<meta name="twitter:description" content="How to customize Jenkins
"/>
<link rel="preload" href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" as="style">
<link href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" rel="stylesheet" integrity="">
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<title>Customization | Jenkins Operator</title>
</head>
<body class="td-page">
<header>
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
<a class="navbar-brand" href="/kubernetes-operator/">
<img style="width: 32px; height: 32px; margin-right: 7.5px;" src="/kubernetes-operator/img/logo.svg"></img><span class="text-uppercase font-weight-bold">Jenkins Operator</span>
</a>
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
<ul class="navbar-nav mt-2 mt-lg-0">
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/about"><span>What's the Jenkins Operator?</span></a>
</li>
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/docs"><span>Documentation</span></a>
</li>
</ul>
</div>
<div class="navbar-nav d-none d-lg-block">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
</div>
</nav>
</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
<div id="td-sidebar-menu" class="td-sidebar__inner">
<form class="td-sidebar__search d-flex align-items-center">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
</button>
</form>
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Documentation</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/installation/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Installation</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-installation">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/how-it-works/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">How it works</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-how-it-works">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-architecture-and-design" href="/kubernetes-operator/docs/how-it-works/architecture-and-design/">Architecture and design</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-jenkins-docker-images" href="/kubernetes-operator/docs/how-it-works/jenkins-docker-images/">Jenkins Docker Images</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Getting Started</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/latest/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">Latest (v0.2.x)</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started-latest">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configuration" href="/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page active" id="m-kubernetes-operator-docs-getting-started-latest-customization" href="/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-aks" href="/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-custom-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-migration" href="/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-diagnostics" href="/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.1.x/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.1.x</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-1-x">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-customization" href="/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-aks" href="/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/security/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Security</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-security">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/developer-guide/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Developer Guide</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-developer-guide">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-developer-guide-tools" href="/kubernetes-operator/docs/developer-guide/tools/">Tools</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
</nav>
</div>
</div>
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/docs/Getting%20Started/latest/customization.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=Customization" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
<nav id="TableOfContents">
<ul>
<li>
<ul>
<li>
<ul>
<li><a href="#using-secrets-from-a-groovy-script">Using secrets from a Groovy script</a></li>
</ul></li>
<li><a href="#install-plugins">Install Plugins</a></li>
</ul></li>
</ul>
</nav>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
<ol class="breadcrumb spb-1">
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/">Documentation</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/">Getting Started</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/">Latest (v0.2.x)</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
</li>
</ol>
</nav >
<div class="td-content">
<h1>Customization</h1>
<div class="lead">How to customize Jenkins</div>
<p>Jenkins can be customized using groovy scripts or the <a href="https://github.com/jenkinsci/configuration-as-code-plugin" target="_blank">configuration as code plugin</a>.
By using a <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/" target="_blank">ConfigMap</a> you can create your own <strong>Jenkins</strong> customized configuration.
Then you must reference the <em>ConfigMap</em> in the <strong>Jenkins</strong> pod customization file in <code>spec.groovyScripts</code> or <code>spec.configurationAsCode</code></p>
<p>For example create a <em>ConfigMap</em> with name <code>jenkins-operator-user-configuration</code>. Then, modify the <strong>Jenkins</strong> manifest to look like this:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration</code></pre></div>
<p>Here is an example of <code>jenkins-operator-user-configuration</code>:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-configure-theme.groovy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">|
</span><span style="color:#8f5902;font-style:italic"> import jenkins.*</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.model.*<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.*<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.model.*<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.ThemeElement<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.CssTextThemeElement<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>org.jenkinsci.plugins.simpletheme.CssUrlThemeElement<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.getInstance()<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>def<span style="color:#f8f8f8;text-decoration:underline"> </span>decorator<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.instance.getDescriptorByType(org.codefirst.SimpleThemeDecorator.class)<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>List&lt;ThemeElement&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span>configElements<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>new<span style="color:#f8f8f8;text-decoration:underline"> </span>ArrayList&lt;&gt;();<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configElements.add(new<span style="color:#f8f8f8;text-decoration:underline"> </span>CssTextThemeElement(<span style="color:#4e9a06">&#34;DEFAULT&#34;</span>));<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configElements.add(new<span style="color:#f8f8f8;text-decoration:underline"> </span>CssUrlThemeElement(<span style="color:#4e9a06">&#34;https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-light-green.css&#34;</span>));<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>decorator.setElements(configElements);<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>decorator.save();<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.save()<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">|
</span><span style="color:#8f5902;font-style:italic"> jenkins:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>systemMessage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;Configuration as Code integration works!!!&#34;</span></code></pre></div>
<ul>
<li>*.groovy is Groovy script configuration</li>
<li>*.yaml is configuration as code</li>
</ul>
<p>If you want to correct your configuration you can edit it while the <strong>Jenkins Operator</strong> is running.
Jenkins will reconcile and apply the new configuration.</p>
<h3 id="using-secrets-from-a-groovy-script">Using secrets from a Groovy script</h3>
<p>If you configured <code>spec.groovyScripts.secret.name</code>, then this secret is available to use from map Groovy scripts.
The secrets are loaded to <code>secrets</code> map.</p>
<p>Create a <a href="https://kubernetes.io/docs/concepts/configuration/secret/" target="_blank">secret</a> with for example the name <code>jenkins-conf-secrets</code>.</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Secret<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>type<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Opaque<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>namespace<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>default<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SYSTEM_MESSAGE<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>SGVsbG8gd29ybGQ=</code></pre></div>
<p>Then modify the <strong>Jenkins</strong> pod manifest by changing <code>spec.groovyScripts.secret.name</code> to <code>jenkins-conf-secrets</code>.</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>groovyScripts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>secret<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-conf-secrets</code></pre></div>
<p>Now you can test that the secret is mounted by applying this ConfigMap for Groovy script:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.groovy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">|
</span><span style="color:#8f5902;font-style:italic"> import jenkins.*</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.model.*<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.*<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>import<span style="color:#f8f8f8;text-decoration:underline"> </span>hudson.model.*<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins<span style="color:#f8f8f8;text-decoration:underline"> </span>=<span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins.getInstance()<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.setSystemMessage(secrets<span style="color:#000;font-weight:bold">[</span><span style="color:#4e9a06">&#34;SYSTEM_MESSAGE&#34;</span><span style="color:#000;font-weight:bold">]</span>)<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.save()</code></pre></div>
<p>Or by applying this configuration as code:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>ConfigMap<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span>-system-message.yaml<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">|
</span><span style="color:#8f5902;font-style:italic"> jenkins:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>systemMessage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>${SYSTEM_MESSAGE}</code></pre></div>
<p>After this, you should see the <code>Hello world</code> system message from the <strong>Jenkins</strong> homepage.</p>
<h2 id="install-plugins">Install Plugins</h2>
<p>Edit CR under <code>spec.master.plugins</code>:</p>
<pre><code>apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: example
spec:
master:
plugins:
- name: simple-theme-plugin
version: 0.5.1
</code></pre>
<p>Under <code>spec.master.basePlugins</code> you can find plugins for a valid <strong>Jenkins Operator</strong>:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>basePlugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1.18</span>.<span style="color:#0000cf;font-weight:bold">3</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-job<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2.34&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-aggregator<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2.6&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>git<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3.12</span>.<span style="color:#0000cf;font-weight:bold">0</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>job-dsl<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.76&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configuration-as-code<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.29&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configuration-as-code-support<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.19&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes-credentials-provider<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0.12</span>.<span style="color:#0000cf;font-weight:bold">1</span></code></pre></div>
<p>You can change their versions.</p>
<p>Then the <strong>Jenkins Operator</strong> will automatically install plugins after the Jenkins master pod restarts.</p>
<div class="text-muted mt-5 pt-3 border-top">Last modified August 5, 2019
</div>
</div>
</main>
</div>
</div>
<footer class="bg-dark py-5 row d-print-none">
<div class="container-fluid mx-sm-5">
<div class="row">
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
</div>
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
<small class="text-white">&copy; 2019 VirtusLab All Rights Reserved</small>
<p class="mt-2"><a href="/kubernetes-operator/about/">What&#39;s the Jenkins Operator?</a></p>
</div>
</div>
</div>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="/kubernetes-operator/js/main.min.15ba3b50c3bd013e1b26793d1a59390ea2e0f21481eafe4022de05a44eba88fc.js" integrity="sha256-Fbo7UMO9AT4bJnk9Glk5DqLg8hSB6v5AIt4FpE66iPw="></script>
</body>
</html>

View File

@ -0,0 +1,593 @@
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.55.6" />
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link rel="shortcut icon" href="/favicons/favicon.ico" >
<link rel="apple-touch-icon" href="/kubernetes-operator/favicons/apple-touch-icon-180x180.png" sizes="180x180">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-36x36.png" sizes="36x36">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-48x48.png" sizes="48x48">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-72x72.png" sizes="72x72">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-96x196.png" sizes="96x196">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-144x144.png" sizes="144x144">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-192x192.png"sizes="192x192">
<title>Deploy Jenkins | Jenkins Operator</title><meta property="og:title" content="Deploy Jenkins" />
<meta property="og:description" content="Deploy production ready Jenkins Operator manifest
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/" />
<meta property="article:published_time" content="2019-08-05T00:00:00&#43;00:00"/>
<meta property="article:modified_time" content="2019-08-05T00:00:00&#43;00:00"/><meta property="og:site_name" content="Jenkins Operator" />
<meta itemprop="name" content="Deploy Jenkins">
<meta itemprop="description" content="Deploy production ready Jenkins Operator manifest
">
<meta itemprop="datePublished" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="dateModified" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="wordCount" content="163">
<meta itemprop="keywords" content="" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Deploy Jenkins"/>
<meta name="twitter:description" content="Deploy production ready Jenkins Operator manifest
"/>
<link rel="preload" href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" as="style">
<link href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" rel="stylesheet" integrity="">
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<title>Deploy Jenkins | Jenkins Operator</title>
</head>
<body class="td-page">
<header>
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
<a class="navbar-brand" href="/kubernetes-operator/">
<img style="width: 32px; height: 32px; margin-right: 7.5px;" src="/kubernetes-operator/img/logo.svg"></img><span class="text-uppercase font-weight-bold">Jenkins Operator</span>
</a>
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
<ul class="navbar-nav mt-2 mt-lg-0">
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/about"><span>What's the Jenkins Operator?</span></a>
</li>
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/docs"><span>Documentation</span></a>
</li>
</ul>
</div>
<div class="navbar-nav d-none d-lg-block">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
</div>
</nav>
</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
<div id="td-sidebar-menu" class="td-sidebar__inner">
<form class="td-sidebar__search d-flex align-items-center">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
</button>
</form>
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Documentation</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/installation/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Installation</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-installation">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/how-it-works/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">How it works</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-how-it-works">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-architecture-and-design" href="/kubernetes-operator/docs/how-it-works/architecture-and-design/">Architecture and design</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-jenkins-docker-images" href="/kubernetes-operator/docs/how-it-works/jenkins-docker-images/">Jenkins Docker Images</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Getting Started</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/latest/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">Latest (v0.2.x)</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started-latest">
<a class="td-sidebar-link td-sidebar-link__page active" id="m-kubernetes-operator-docs-getting-started-latest-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configuration" href="/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-customization" href="/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-aks" href="/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-custom-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-migration" href="/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-diagnostics" href="/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.1.x/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.1.x</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-1-x">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-customization" href="/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-aks" href="/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/security/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Security</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-security">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/developer-guide/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Developer Guide</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-developer-guide">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-developer-guide-tools" href="/kubernetes-operator/docs/developer-guide/tools/">Tools</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
</nav>
</div>
</div>
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/docs/Getting%20Started/latest/deploy-jenkins.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=Deploy%20Jenkins" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
<ol class="breadcrumb spb-1">
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/">Documentation</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/">Getting Started</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/">Latest (v0.2.x)</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
</li>
</ol>
</nav >
<div class="td-content">
<h1>Deploy Jenkins</h1>
<div class="lead">Deploy production ready Jenkins Operator manifest</div>
<p>Once jenkins-operator is up and running let&rsquo;s deploy actual Jenkins instance.
Create manifest ie. <strong>jenkins_instance.yaml</strong> with following data and save it on drive.</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: example
spec:
master:
containers:
- name: jenkins-master
image: jenkins/jenkins:lts
imagePullPolicy: Always
livenessProbe:
failureThreshold: <span style="color:#0000cf;font-weight:bold">12</span>
httpGet:
path: /login
port: http
scheme: HTTP
initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">80</span>
periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span>
successThreshold: <span style="color:#0000cf;font-weight:bold">1</span>
timeoutSeconds: <span style="color:#0000cf;font-weight:bold">5</span>
readinessProbe:
failureThreshold: <span style="color:#0000cf;font-weight:bold">3</span>
httpGet:
path: /login
port: http
scheme: HTTP
initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">30</span>
periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span>
successThreshold: <span style="color:#0000cf;font-weight:bold">1</span>
timeoutSeconds: <span style="color:#0000cf;font-weight:bold">1</span>
resources:
limits:
cpu: 1500m
memory: 3Gi
requests:
cpu: <span style="color:#4e9a06">&#34;1&#34;</span>
memory: 500Mi
seedJobs:
- id: jenkins-operator
targets: <span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span>
description: <span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span>
repositoryBranch: master
repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre></div>
<p>Deploy Jenkins to K8s:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl create -f jenkins_instance.yaml</code></pre></div>
<p>Watch Jenkins instance being created:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get pods -w</code></pre></div>
<p>Get Jenkins credentials:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.user}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d
kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.password}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d</code></pre></div>
<p>Connect to Jenkins (minikube):</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">minikube service jenkins-operator-http-&lt;cr_name&gt; --url</code></pre></div>
<p>Connect to Jenkins (actual Kubernetes cluster):</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl port-forward jenkins-&lt;cr_name&gt; <span style="color:#0000cf;font-weight:bold">8080</span>:8080</code></pre></div>
<p>Then open browser with address <code>http://localhost:8080</code>.
<img src="/img/jenkins.png" alt="jenkins" /></p>
<div class="text-muted mt-5 pt-3 border-top">Last modified August 5, 2019
</div>
</div>
</main>
</div>
</div>
<footer class="bg-dark py-5 row d-print-none">
<div class="container-fluid mx-sm-5">
<div class="row">
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
</div>
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
<small class="text-white">&copy; 2019 VirtusLab All Rights Reserved</small>
<p class="mt-2"><a href="/kubernetes-operator/about/">What&#39;s the Jenkins Operator?</a></p>
</div>
</div>
</div>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="/kubernetes-operator/js/main.min.15ba3b50c3bd013e1b26793d1a59390ea2e0f21481eafe4022de05a44eba88fc.js" integrity="sha256-Fbo7UMO9AT4bJnk9Glk5DqLg8hSB6v5AIt4FpE66iPw="></script>
</body>
</html>

View File

@ -0,0 +1,551 @@
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.55.6" />
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link rel="shortcut icon" href="/favicons/favicon.ico" >
<link rel="apple-touch-icon" href="/kubernetes-operator/favicons/apple-touch-icon-180x180.png" sizes="180x180">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-36x36.png" sizes="36x36">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-48x48.png" sizes="48x48">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-72x72.png" sizes="72x72">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-96x196.png" sizes="96x196">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-144x144.png" sizes="144x144">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-192x192.png"sizes="192x192">
<title>Diagnostics | Jenkins Operator</title><meta property="og:title" content="Diagnostics" />
<meta property="og:description" content="How to deal with jenkins-operator problems
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/diagnostics/" />
<meta property="article:published_time" content="2019-08-05T00:00:00&#43;00:00"/>
<meta property="article:modified_time" content="2019-08-05T00:00:00&#43;00:00"/><meta property="og:site_name" content="Jenkins Operator" />
<meta itemprop="name" content="Diagnostics">
<meta itemprop="description" content="How to deal with jenkins-operator problems
">
<meta itemprop="datePublished" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="dateModified" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="wordCount" content="55">
<meta itemprop="keywords" content="" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Diagnostics"/>
<meta name="twitter:description" content="How to deal with jenkins-operator problems
"/>
<link rel="preload" href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" as="style">
<link href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" rel="stylesheet" integrity="">
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<title>Diagnostics | Jenkins Operator</title>
</head>
<body class="td-page">
<header>
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
<a class="navbar-brand" href="/kubernetes-operator/">
<img style="width: 32px; height: 32px; margin-right: 7.5px;" src="/kubernetes-operator/img/logo.svg"></img><span class="text-uppercase font-weight-bold">Jenkins Operator</span>
</a>
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
<ul class="navbar-nav mt-2 mt-lg-0">
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/about"><span>What's the Jenkins Operator?</span></a>
</li>
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/docs"><span>Documentation</span></a>
</li>
</ul>
</div>
<div class="navbar-nav d-none d-lg-block">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
</div>
</nav>
</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
<div id="td-sidebar-menu" class="td-sidebar__inner">
<form class="td-sidebar__search d-flex align-items-center">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
</button>
</form>
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Documentation</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/installation/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Installation</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-installation">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/how-it-works/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">How it works</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-how-it-works">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-architecture-and-design" href="/kubernetes-operator/docs/how-it-works/architecture-and-design/">Architecture and design</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-jenkins-docker-images" href="/kubernetes-operator/docs/how-it-works/jenkins-docker-images/">Jenkins Docker Images</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Getting Started</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/latest/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">Latest (v0.2.x)</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started-latest">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configuration" href="/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-customization" href="/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-aks" href="/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-custom-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-migration" href="/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
<a class="td-sidebar-link td-sidebar-link__page active" id="m-kubernetes-operator-docs-getting-started-latest-diagnostics" href="/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.1.x/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.1.x</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-1-x">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-customization" href="/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-aks" href="/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/security/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Security</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-security">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/developer-guide/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Developer Guide</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-developer-guide">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-developer-guide-tools" href="/kubernetes-operator/docs/developer-guide/tools/">Tools</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
</nav>
</div>
</div>
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/docs/Getting%20Started/latest/diagnostics.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=Diagnostics" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
<ol class="breadcrumb spb-1">
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/">Documentation</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/">Getting Started</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/">Latest (v0.2.x)</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
</li>
</ol>
</nav >
<div class="td-content">
<h1>Diagnostics</h1>
<div class="lead">How to deal with jenkins-operator problems</div>
<p>Turn on debug in <strong>Jenkins Operator</strong> deployment:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sed -i <span style="color:#4e9a06">&#39;s|\(args:\).*|\1\ [&#34;--debug&#34;\]|&#39;</span> deploy/operator.yaml
kubectl apply -f deploy/operator.yaml</code></pre></div>
<p>Watch Kubernetes events:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get events --sort-by<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">&#39;{.lastTimestamp}&#39;</span></code></pre></div>
<p>Verify Jenkins master logs:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl logs -f jenkins-&lt;cr_name&gt;</code></pre></div>
<p>Verify jenkins-operator logs:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl logs deployment/jenkins-operator</code></pre></div>
<h2 id="troubleshooting">Troubleshooting</h2>
<p>Delete Jenkins master pod and wait for the new one to come up:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl delete pod jenkins-&lt;cr_name&gt;</code></pre></div>
<div class="text-muted mt-5 pt-3 border-top">Last modified August 5, 2019
</div>
</div>
</main>
</div>
</div>
<footer class="bg-dark py-5 row d-print-none">
<div class="container-fluid mx-sm-5">
<div class="row">
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
</div>
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
<small class="text-white">&copy; 2019 VirtusLab All Rights Reserved</small>
<p class="mt-2"><a href="/kubernetes-operator/about/">What&#39;s the Jenkins Operator?</a></p>
</div>
</div>
</div>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="/kubernetes-operator/js/main.min.15ba3b50c3bd013e1b26793d1a59390ea2e0f21481eafe4022de05a44eba88fc.js" integrity="sha256-Fbo7UMO9AT4bJnk9Glk5DqLg8hSB6v5AIt4FpE66iPw="></script>
</body>
</html>

View File

@ -0,0 +1,671 @@
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.55.6" />
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link rel="alternate" type="application/rss&#43;xml" href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/index.xml">
<link rel="shortcut icon" href="/favicons/favicon.ico" >
<link rel="apple-touch-icon" href="/kubernetes-operator/favicons/apple-touch-icon-180x180.png" sizes="180x180">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-36x36.png" sizes="36x36">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-48x48.png" sizes="48x48">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-72x72.png" sizes="72x72">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-96x196.png" sizes="96x196">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-144x144.png" sizes="144x144">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-192x192.png"sizes="192x192">
<title>Latest (v0.2.x) | Jenkins Operator</title><meta property="og:title" content="Latest (v0.2.x)" />
<meta property="og:description" content="How to work with jenkins-operator latest version
" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/" />
<meta property="og:updated_time" content="2019-08-05T00:00:00&#43;00:00"/><meta property="og:site_name" content="Jenkins Operator" />
<meta itemprop="name" content="Latest (v0.2.x)">
<meta itemprop="description" content="How to work with jenkins-operator latest version
">
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Latest (v0.2.x)"/>
<meta name="twitter:description" content="How to work with jenkins-operator latest version
"/>
<link rel="preload" href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" as="style">
<link href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" rel="stylesheet" integrity="">
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<title>Latest (v0.2.x) | Jenkins Operator</title>
</head>
<body class="td-section">
<header>
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
<a class="navbar-brand" href="/kubernetes-operator/">
<img style="width: 32px; height: 32px; margin-right: 7.5px;" src="/kubernetes-operator/img/logo.svg"></img><span class="text-uppercase font-weight-bold">Jenkins Operator</span>
</a>
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
<ul class="navbar-nav mt-2 mt-lg-0">
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/about"><span>What's the Jenkins Operator?</span></a>
</li>
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/docs"><span>Documentation</span></a>
</li>
</ul>
</div>
<div class="navbar-nav d-none d-lg-block">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
</div>
</nav>
</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
<div id="td-sidebar-menu" class="td-sidebar__inner">
<form class="td-sidebar__search d-flex align-items-center">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
</button>
</form>
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Documentation</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/installation/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Installation</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-installation">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/how-it-works/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">How it works</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-how-it-works">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-architecture-and-design" href="/kubernetes-operator/docs/how-it-works/architecture-and-design/">Architecture and design</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-jenkins-docker-images" href="/kubernetes-operator/docs/how-it-works/jenkins-docker-images/">Jenkins Docker Images</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Getting Started</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/latest/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">Latest (v0.2.x)</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started-latest">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configuration" href="/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-customization" href="/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-aks" href="/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-custom-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-migration" href="/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-diagnostics" href="/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.1.x/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.1.x</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-1-x">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-customization" href="/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-aks" href="/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/security/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Security</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-security">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/developer-guide/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Developer Guide</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-developer-guide">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-developer-guide-tools" href="/kubernetes-operator/docs/developer-guide/tools/">Tools</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
</nav>
</div>
</div>
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/docs/Getting%20Started/latest/_index.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=Latest%20%28v0.2.x%29" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
<ol class="breadcrumb spb-1">
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/">Documentation</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/">Getting Started</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/">Latest (v0.2.x)</a>
</li>
</ol>
</nav >
<div class="td-content">
<h1>Latest (v0.2.x)</h1>
<div class="lead">How to work with jenkins-operator latest version</div>
<div class="pageinfo pageinfo-primary">
<p>This document describes a getting started guide for <strong>Jenkins Operator</strong> <code>v0.2.x</code> and an additional configuration.</p>
</div>
<h2 id="first-steps">First Steps</h2>
<p>Prepare your Kubernetes cluster and set up access.
Once you have running Kubernetes cluster you can focus on installing <strong>Jenkins Operator</strong> according to the <a href="/docs/installation/">Installation</a> guide.</p>
<div class="section-index">
<hr class="panel-line">
<div class="entry">
<h5>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
</h5>
<p>Deploy production ready Jenkins Operator manifest
</p>
</div>
<div class="entry">
<h5>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
</h5>
<p>How to configure Jenkins with Operator
</p>
</div>
<div class="entry">
<h5>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
</h5>
<p>How to customize Jenkins
</p>
</div>
<div class="entry">
<h5>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
</h5>
<p>Additional configuration for Azure Kubernetes Service
</p>
</div>
<div class="entry">
<h5>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
</h5>
<p>Prevent loss of job history
</p>
</div>
<div class="entry">
<h5>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
</h5>
<p>Custom backup and restore provider
</p>
</div>
<div class="entry">
<h5>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
</h5>
<p>How to migrate from v0.1.x to v0.2.x
</p>
</div>
<div class="entry">
<h5>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
</h5>
<p>How to deal with jenkins-operator problems
</p>
</div>
<div class="entry">
<h5>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</h5>
<p>API Schema definitions for Jenkins CR
</p>
</div>
</div>
<div class="text-muted mt-5 pt-3 border-top">Last modified August 5, 2019
</div>
</div>
</main>
</div>
</div>
<footer class="bg-dark py-5 row d-print-none">
<div class="container-fluid mx-sm-5">
<div class="row">
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
</div>
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
<small class="text-white">&copy; 2019 VirtusLab All Rights Reserved</small>
<p class="mt-2"><a href="/kubernetes-operator/about/">What&#39;s the Jenkins Operator?</a></p>
</div>
</div>
</div>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="/kubernetes-operator/js/main.min.15ba3b50c3bd013e1b26793d1a59390ea2e0f21481eafe4022de05a44eba88fc.js" integrity="sha256-Fbo7UMO9AT4bJnk9Glk5DqLg8hSB6v5AIt4FpE66iPw="></script>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,581 @@
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.55.6" />
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link rel="shortcut icon" href="/favicons/favicon.ico" >
<link rel="apple-touch-icon" href="/kubernetes-operator/favicons/apple-touch-icon-180x180.png" sizes="180x180">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-36x36.png" sizes="36x36">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-48x48.png" sizes="48x48">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-72x72.png" sizes="72x72">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-96x196.png" sizes="96x196">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-144x144.png" sizes="144x144">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-192x192.png"sizes="192x192">
<title>Migration from v0.1.x | Jenkins Operator</title><meta property="og:title" content="Migration from v0.1.x" />
<meta property="og:description" content="How to migrate from v0.1.x to v0.2.x
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/migration/" />
<meta property="article:published_time" content="2019-08-05T00:00:00&#43;00:00"/>
<meta property="article:modified_time" content="2019-08-05T00:00:00&#43;00:00"/><meta property="og:site_name" content="Jenkins Operator" />
<meta itemprop="name" content="Migration from v0.1.x">
<meta itemprop="description" content="How to migrate from v0.1.x to v0.2.x
">
<meta itemprop="datePublished" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="dateModified" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="wordCount" content="132">
<meta itemprop="keywords" content="" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Migration from v0.1.x"/>
<meta name="twitter:description" content="How to migrate from v0.1.x to v0.2.x
"/>
<link rel="preload" href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" as="style">
<link href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" rel="stylesheet" integrity="">
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<title>Migration from v0.1.x | Jenkins Operator</title>
</head>
<body class="td-page">
<header>
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
<a class="navbar-brand" href="/kubernetes-operator/">
<img style="width: 32px; height: 32px; margin-right: 7.5px;" src="/kubernetes-operator/img/logo.svg"></img><span class="text-uppercase font-weight-bold">Jenkins Operator</span>
</a>
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
<ul class="navbar-nav mt-2 mt-lg-0">
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/about"><span>What's the Jenkins Operator?</span></a>
</li>
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/docs"><span>Documentation</span></a>
</li>
</ul>
</div>
<div class="navbar-nav d-none d-lg-block">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
</div>
</nav>
</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
<div id="td-sidebar-menu" class="td-sidebar__inner">
<form class="td-sidebar__search d-flex align-items-center">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
</button>
</form>
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Documentation</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/installation/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Installation</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-installation">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/how-it-works/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">How it works</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-how-it-works">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-architecture-and-design" href="/kubernetes-operator/docs/how-it-works/architecture-and-design/">Architecture and design</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-jenkins-docker-images" href="/kubernetes-operator/docs/how-it-works/jenkins-docker-images/">Jenkins Docker Images</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Getting Started</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/latest/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">Latest (v0.2.x)</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started-latest">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configuration" href="/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-customization" href="/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-aks" href="/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-custom-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
<a class="td-sidebar-link td-sidebar-link__page active" id="m-kubernetes-operator-docs-getting-started-latest-migration" href="/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-diagnostics" href="/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.1.x/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.1.x</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-1-x">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-customization" href="/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-aks" href="/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/security/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Security</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-security">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/developer-guide/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Developer Guide</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-developer-guide">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-developer-guide-tools" href="/kubernetes-operator/docs/developer-guide/tools/">Tools</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
</nav>
</div>
</div>
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/docs/Getting%20Started/latest/migration.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=Migration%20from%20v0.1.x" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
<nav id="TableOfContents">
<ul>
<li>
<ul>
<li>
<ul>
<li><a href="#added-seed-job-agent">Added seed job agent</a></li>
<li><a href="#apply-jenkins-configuration-via-groovy-scripts-instead-of-jenkins-jobs">Apply Jenkins configuration via Groovy scripts instead of Jenkins jobs</a></li>
</ul></li>
</ul></li>
</ul>
</nav>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
<ol class="breadcrumb spb-1">
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/">Documentation</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/">Getting Started</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/">Latest (v0.2.x)</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
</li>
</ol>
</nav >
<div class="td-content">
<h1>Migration from v0.1.x</h1>
<div class="lead">How to migrate from v0.1.x to v0.2.x</div>
<h3 id="added-seed-job-agent">Added seed job agent</h3>
<p>Now seed jobs are not built by master executors, but by dedicated agent deployed into Kubernetes. We disabled master executors for security reasons.</p>
<h3 id="apply-jenkins-configuration-via-groovy-scripts-instead-of-jenkins-jobs">Apply Jenkins configuration via Groovy scripts instead of Jenkins jobs</h3>
<p>We have removed hardcoded configuration by <strong>Jenkins</strong> jobs.</p>
<p>In <code>v0.1.1</code> <strong>Jenkins Operator</strong> configuration was stored in <code>jenkins-operator-user-configuration-&lt;cr_name&gt;</code>
If you want to use <code>v0.2.0</code> or newer you must simply write refer to old ConfigMap by modifying CR, for example:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurationAsCode<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration-&lt;cr_name<span style="color:#8f5902;font-style:italic">&gt;
</span><span style="color:#8f5902;font-style:italic"> secret:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration-&lt;cr_name<span style="color:#8f5902;font-style:italic">&gt;
</span><span style="color:#8f5902;font-style:italic"> groovyScripts:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configurations<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration-&lt;cr_name<span style="color:#8f5902;font-style:italic">&gt;
</span><span style="color:#8f5902;font-style:italic"> secret:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-user-configuration-&lt;cr_name&gt;</code></pre></div>
<p><strong>Jenkins</strong> configuration jobs (<em>Configure Seed Jobs</em>, <em>jenkins-operator-base-configuration</em>, <em>jenkins-operator-user-configuration</em>) have been removed from <strong>Jenkins</strong>.</p>
<p>In <code>v0.1.1</code> you can see if configuration failed or successfully updated in <strong>Jenkins</strong> UI (job build logs).
Now, when Jenkins configuration jobs are removed, you must use this command to see if configuration was failed.</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n logs deployment/jenkins-operator</code></pre></div>
<div class="text-muted mt-5 pt-3 border-top">Last modified August 5, 2019
</div>
</div>
</main>
</div>
</div>
<footer class="bg-dark py-5 row d-print-none">
<div class="container-fluid mx-sm-5">
<div class="row">
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
</div>
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
<small class="text-white">&copy; 2019 VirtusLab All Rights Reserved</small>
<p class="mt-2"><a href="/kubernetes-operator/about/">What&#39;s the Jenkins Operator?</a></p>
</div>
</div>
</div>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="/kubernetes-operator/js/main.min.15ba3b50c3bd013e1b26793d1a59390ea2e0f21481eafe4022de05a44eba88fc.js" integrity="sha256-Fbo7UMO9AT4bJnk9Glk5DqLg8hSB6v5AIt4FpE66iPw="></script>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,546 @@
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.55.6" />
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link rel="shortcut icon" href="/favicons/favicon.ico" >
<link rel="apple-touch-icon" href="/kubernetes-operator/favicons/apple-touch-icon-180x180.png" sizes="180x180">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-36x36.png" sizes="36x36">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-48x48.png" sizes="48x48">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-72x72.png" sizes="72x72">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-96x196.png" sizes="96x196">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-144x144.png" sizes="144x144">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-192x192.png"sizes="192x192">
<title>AKS | Jenkins Operator</title><meta property="og:title" content="AKS" />
<meta property="og:description" content="Additional configuration for Azure Kubernetes Service
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/aks/" />
<meta property="article:published_time" content="2019-08-05T00:00:00&#43;00:00"/>
<meta property="article:modified_time" content="2019-08-05T00:00:00&#43;00:00"/><meta property="og:site_name" content="Jenkins Operator" />
<meta itemprop="name" content="AKS">
<meta itemprop="description" content="Additional configuration for Azure Kubernetes Service
">
<meta itemprop="datePublished" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="dateModified" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="wordCount" content="47">
<meta itemprop="keywords" content="" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="AKS"/>
<meta name="twitter:description" content="Additional configuration for Azure Kubernetes Service
"/>
<link rel="preload" href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" as="style">
<link href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" rel="stylesheet" integrity="">
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<title>AKS | Jenkins Operator</title>
</head>
<body class="td-page">
<header>
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
<a class="navbar-brand" href="/kubernetes-operator/">
<img style="width: 32px; height: 32px; margin-right: 7.5px;" src="/kubernetes-operator/img/logo.svg"></img><span class="text-uppercase font-weight-bold">Jenkins Operator</span>
</a>
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
<ul class="navbar-nav mt-2 mt-lg-0">
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/about"><span>What's the Jenkins Operator?</span></a>
</li>
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/docs"><span>Documentation</span></a>
</li>
</ul>
</div>
<div class="navbar-nav d-none d-lg-block">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
</div>
</nav>
</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
<div id="td-sidebar-menu" class="td-sidebar__inner">
<form class="td-sidebar__search d-flex align-items-center">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
</button>
</form>
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Documentation</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/installation/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Installation</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-installation">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/how-it-works/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">How it works</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-how-it-works">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-architecture-and-design" href="/kubernetes-operator/docs/how-it-works/architecture-and-design/">Architecture and design</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-jenkins-docker-images" href="/kubernetes-operator/docs/how-it-works/jenkins-docker-images/">Jenkins Docker Images</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Getting Started</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/latest/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Latest (v0.2.x)</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-latest">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configuration" href="/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-customization" href="/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-aks" href="/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-custom-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-migration" href="/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-diagnostics" href="/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.1.x/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">v0.1.x</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started-v0-1-x">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-customization" href="/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page active" id="m-kubernetes-operator-docs-getting-started-v0-1-x-aks" href="/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/security/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Security</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-security">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/developer-guide/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Developer Guide</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-developer-guide">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-developer-guide-tools" href="/kubernetes-operator/docs/developer-guide/tools/">Tools</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
</nav>
</div>
</div>
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/docs/Getting%20Started/v0.1.x/aks.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=AKS" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
<ol class="breadcrumb spb-1">
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/">Documentation</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/">Getting Started</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/">v0.1.x</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
</li>
</ol>
</nav >
<div class="td-content">
<h1>AKS</h1>
<div class="lead">Additional configuration for Azure Kubernetes Service</div>
<p>Azure AKS managed Kubernetes service adds to every pod the following environment variables:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP_ADDR<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_PORT_443_TCP<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>tcp<span style="color:#000;font-weight:bold">:</span>//<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>KUBERNETES_SERVICE_HOST<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span></code></pre></div>
<p>The operator is aware of it and omits these environment variables when checking if a Jenkins pod environment has been changed. It prevents
the restart of a Jenkins pod over and over again.</p>
<div class="text-muted mt-5 pt-3 border-top">Last modified August 5, 2019
</div>
</div>
</main>
</div>
</div>
<footer class="bg-dark py-5 row d-print-none">
<div class="container-fluid mx-sm-5">
<div class="row">
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
</div>
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
<small class="text-white">&copy; 2019 VirtusLab All Rights Reserved</small>
<p class="mt-2"><a href="/kubernetes-operator/about/">What&#39;s the Jenkins Operator?</a></p>
</div>
</div>
</div>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="/kubernetes-operator/js/main.min.15ba3b50c3bd013e1b26793d1a59390ea2e0f21481eafe4022de05a44eba88fc.js" integrity="sha256-Fbo7UMO9AT4bJnk9Glk5DqLg8hSB6v5AIt4FpE66iPw="></script>
</body>
</html>

View File

@ -0,0 +1,807 @@
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.55.6" />
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link rel="shortcut icon" href="/favicons/favicon.ico" >
<link rel="apple-touch-icon" href="/kubernetes-operator/favicons/apple-touch-icon-180x180.png" sizes="180x180">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-36x36.png" sizes="36x36">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-48x48.png" sizes="48x48">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-72x72.png" sizes="72x72">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-96x196.png" sizes="96x196">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-144x144.png" sizes="144x144">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-192x192.png"sizes="192x192">
<title>Configuration | Jenkins Operator</title><meta property="og:title" content="Configuration" />
<meta property="og:description" content="How to configure Jenkins with Operator
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/configuration/" />
<meta property="article:published_time" content="2019-08-05T00:00:00&#43;00:00"/>
<meta property="article:modified_time" content="2019-08-05T00:00:00&#43;00:00"/><meta property="og:site_name" content="Jenkins Operator" />
<meta itemprop="name" content="Configuration">
<meta itemprop="description" content="How to configure Jenkins with Operator
">
<meta itemprop="datePublished" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="dateModified" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="wordCount" content="675">
<meta itemprop="keywords" content="" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Configuration"/>
<meta name="twitter:description" content="How to configure Jenkins with Operator
"/>
<link rel="preload" href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" as="style">
<link href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" rel="stylesheet" integrity="">
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<title>Configuration | Jenkins Operator</title>
</head>
<body class="td-page">
<header>
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
<a class="navbar-brand" href="/kubernetes-operator/">
<img style="width: 32px; height: 32px; margin-right: 7.5px;" src="/kubernetes-operator/img/logo.svg"></img><span class="text-uppercase font-weight-bold">Jenkins Operator</span>
</a>
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
<ul class="navbar-nav mt-2 mt-lg-0">
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/about"><span>What's the Jenkins Operator?</span></a>
</li>
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/docs"><span>Documentation</span></a>
</li>
</ul>
</div>
<div class="navbar-nav d-none d-lg-block">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
</div>
</nav>
</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
<div id="td-sidebar-menu" class="td-sidebar__inner">
<form class="td-sidebar__search d-flex align-items-center">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
</button>
</form>
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Documentation</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/installation/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Installation</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-installation">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/how-it-works/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">How it works</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-how-it-works">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-architecture-and-design" href="/kubernetes-operator/docs/how-it-works/architecture-and-design/">Architecture and design</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-jenkins-docker-images" href="/kubernetes-operator/docs/how-it-works/jenkins-docker-images/">Jenkins Docker Images</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Getting Started</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/latest/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Latest (v0.2.x)</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-latest">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configuration" href="/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-customization" href="/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-aks" href="/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-custom-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-migration" href="/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-diagnostics" href="/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.1.x/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">v0.1.x</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started-v0-1-x">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page active" id="m-kubernetes-operator-docs-getting-started-v0-1-x-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-customization" href="/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-aks" href="/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/security/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Security</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-security">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/developer-guide/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Developer Guide</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-developer-guide">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-developer-guide-tools" href="/kubernetes-operator/docs/developer-guide/tools/">Tools</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
</nav>
</div>
</div>
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/docs/Getting%20Started/v0.1.x/configuration.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=Configuration" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
<nav id="TableOfContents">
<ul>
<li>
<ul>
<li><a href="#prepare-job-definitions-and-pipelines">Prepare job definitions and pipelines</a></li>
<li><a href="#configure-seed-jobs">Configure Seed Jobs</a>
<ul>
<li><a href="#ssh-authentication">SSH authentication</a>
<ul>
<li><a href="#generate-ssh-keys">Generate SSH Keys</a></li>
<li><a href="#public-key">Public key</a></li>
<li><a href="#configure-ssh-authentication">Configure SSH authentication</a></li>
</ul></li>
<li><a href="#username-password-authentication">Username &amp; password authentication</a></li>
</ul></li>
<li><a href="#http-proxy-for-downloading-plugins">HTTP Proxy for downloading plugins</a></li>
<li><a href="#jenkins-login-credentials">Jenkins login credentials</a></li>
<li><a href="#override-default-jenkins-container-command">Override default Jenkins container command</a></li>
</ul></li>
</ul>
</nav>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
<ol class="breadcrumb spb-1">
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/">Documentation</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/">Getting Started</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/">v0.1.x</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
</li>
</ol>
</nav >
<div class="td-content">
<h1>Configuration</h1>
<div class="lead">How to configure Jenkins with Operator</div>
<p>Jenkins operator uses <a href="https://github.com/jenkinsci/job-dsl-plugin" target="_blank">job-dsl</a> and <a href="https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/" target="_blank">kubernetes-credentials-provider</a> plugins for configuring jobs
and deploy keys.</p>
<h2 id="prepare-job-definitions-and-pipelines">Prepare job definitions and pipelines</h2>
<p>First you have to prepare pipelines and job definition in your GitHub repository using the following structure:</p>
<pre><code>cicd/
├── jobs
│   └── build.jenkins
└── pipelines
└── build.jenkins
</code></pre>
<p><strong>cicd/jobs/build.jenkins</strong> it&rsquo;s a job definition:</p>
<pre><code>#!/usr/bin/env groovy
pipelineJob('build-jenkins-operator') {
displayName('Build jenkins-operator')
definition {
cpsScm {
scm {
git {
remote {
url('https://github.com/jenkinsci/kubernetes-operator.git')
credentials('jenkins-operator')
}
branches('*/master')
}
}
scriptPath('cicd/pipelines/build.jenkins')
}
}
}
</code></pre>
<p><strong>cicd/pipelines/build.jenkins</strong> is an actual Jenkins pipeline:</p>
<pre><code>#!/usr/bin/env groovy
def label = &quot;build-jenkins-operator-${UUID.randomUUID().toString()}&quot;
def home = &quot;/home/jenkins&quot;
def workspace = &quot;${home}/workspace/build-jenkins-operator&quot;
def workdir = &quot;${workspace}/src/github.com/jenkinsci/kubernetes-operator/&quot;
podTemplate(label: label,
containers: [
containerTemplate(name: 'jnlp', image: 'jenkins/jnlp-slave:alpine'),
containerTemplate(name: 'go', image: 'golang:1-alpine', command: 'cat', ttyEnabled: true),
],
envVars: [
envVar(key: 'GOPATH', value: workspace),
],
) {
node(label) {
dir(workdir) {
stage('Init') {
timeout(time: 3, unit: 'MINUTES') {
checkout scm
}
container('go') {
sh 'apk --no-cache --update add make git gcc libc-dev'
}
}
stage('Dep') {
container('go') {
sh 'make dep'
}
}
stage('Test') {
container('go') {
sh 'make test'
}
}
stage('Build') {
container('go') {
sh 'make build'
}
}
}
}
}
</code></pre>
<h2 id="configure-seed-jobs">Configure Seed Jobs</h2>
<p>Jenkins Seed Jobs are configured using <code>Jenkins.spec.seedJobs</code> section from your custom resource manifest:</p>
<pre><code>apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: example
spec:
seedJobs:
- id: jenkins-operator
targets: &quot;cicd/jobs/*.jenkins&quot;
description: &quot;Jenkins Operator repository&quot;
repositoryBranch: master
repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
</code></pre>
<p><strong>Jenkins Operator</strong> will automatically discover and configure all the seed jobs.</p>
<p>You can verify if deploy keys were successfully configured in the Jenkins <strong>Credentials</strong> tab.</p>
<p><img src="/kubernetes-operator/img/jenkins-credentials.png" alt="jenkins" /></p>
<p>You can verify if your pipelines were successfully configured in the Jenkins Seed Job console output.</p>
<p><img src="/kubernetes-operator/img/jenkins-seed.png" alt="jenkins" /></p>
<p>If your GitHub repository is <strong>private</strong> you have to configure SSH or username/password authentication.</p>
<h3 id="ssh-authentication">SSH authentication</h3>
<h4 id="generate-ssh-keys">Generate SSH Keys</h4>
<p>There are two methods of SSH private key generation:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl genrsa -out &lt;filename&gt; <span style="color:#0000cf;font-weight:bold">2048</span></code></pre></div>
<p>or</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ ssh-keygen -t rsa -b <span style="color:#0000cf;font-weight:bold">2048</span>
$ ssh-keygen -p -f &lt;filename&gt; -m pem</code></pre></div>
<p>Then copy content from generated file.</p>
<h4 id="public-key">Public key</h4>
<p>If you want to upload your public key to your Git server you need to extract it.</p>
<p>If key was generated by <code>openssl</code> then you need to type this to extract public key:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ openssl rsa -in &lt;filename&gt; -pubout &gt; &lt;filename&gt;.pub</code></pre></div>
<p>If key was generated by <code>ssh-keygen</code> the public key content is located in <filename>.pub and there is no need to extract public key</p>
<h4 id="configure-ssh-authentication">Configure SSH authentication</h4>
<p>Configure a seed job like this:</p>
<pre><code>apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: example
spec:
seedJobs:
- id: jenkins-operator-ssh
credentialType: basicSSHUserPrivateKey
credentialID: k8s-ssh
targets: &quot;cicd/jobs/*.jenkins&quot;
description: &quot;Jenkins Operator repository&quot;
repositoryBranch: master
repositoryUrl: git@github.com:jenkinsci/kubernetes-operator.git
</code></pre>
<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p>
<pre><code>apiVersion: v1
kind: Secret
metadata:
name: k8s-ssh
stringData:
privateKey: |
-----BEGIN RSA PRIVATE KEY-----
MIIJKAIBAAKCAgEAxxDpleJjMCN5nusfW/AtBAZhx8UVVlhhhIKXvQ+dFODQIdzO
oDXybs1zVHWOj31zqbbJnsfsVZ9Uf3p9k6xpJ3WFY9b85WasqTDN1xmSd6swD4N8
...
username: github_user_name
</code></pre>
<h3 id="username-password-authentication">Username &amp; password authentication</h3>
<p>Configure a seed job like this:</p>
<pre><code>apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: example
spec:
seedJobs:
- id: jenkins-operator-user-pass
credentialType: usernamePassword
credentialID: k8s-user-pass
targets: &quot;cicd/jobs/*.jenkins&quot;
description: &quot;Jenkins Operator repository&quot;
repositoryBranch: master
repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
</code></pre>
<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p>
<pre><code>apiVersion: v1
kind: Secret
metadata:
name: k8s-user-pass
stringData:
username: github_user_name
password: password_or_token
</code></pre>
<h2 id="http-proxy-for-downloading-plugins">HTTP Proxy for downloading plugins</h2>
<p>To use forwarding proxy with an operator to download plugins you need to add the following environment variable to Jenkins CR, for e.g.:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>CURL_OPTIONS<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-L<span style="color:#f8f8f8;text-decoration:underline"> </span>-x<span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;proxy_url&gt;</code></pre></div>
<p>In <code>CURL_OPTIONS</code> var you can set additional arguments to curl command.</p>
<h2 id="jenkins-login-credentials">Jenkins login credentials</h2>
<p>The operator automatically generates a Jenkins username and password and stores it in Kubernetes secret named
<code>jenkins-operator-credentials-&lt;cr_name&gt;</code> in the namespace where Jenkins CR has been deployed.</p>
<p>If you want change it you can override the secret:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Secret<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-operator-credentials-&lt;cr-name<span style="color:#8f5902;font-style:italic">&gt;
</span><span style="color:#8f5902;font-style:italic"> namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>data<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>user<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;base64-encoded-new-username<span style="color:#8f5902;font-style:italic">&gt;
</span><span style="color:#8f5902;font-style:italic"> password: &lt;base64-encoded-new-password&gt;</span></code></pre></div>
<p>If needed <strong>Jenkins Operator</strong> will restart the Jenkins master pod and then you can login with the new username and password
credentials.</p>
<h2 id="override-default-jenkins-container-command">Override default Jenkins container command</h2>
<p>The default command for the Jenkins master container <code>jenkins/jenkins:lts</code> looks like:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>bash<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>-c<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/var/jenkins/scripts/init.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/sbin/tini<span style="color:#f8f8f8;text-decoration:underline"> </span>-s<span style="color:#f8f8f8;text-decoration:underline"> </span>--<span style="color:#f8f8f8;text-decoration:underline"> </span>/usr/local/bin/jenkins.sh</code></pre></div>
<p>The script<code>/var/jenkins/scripts/init.sh</code> is provided by the operator and configures init.groovy.d (creates the Jenkins user)
and installs plugins.
The <code>/sbin/tini -s -- /usr/local/bin/jenkins.sh</code> command runs the Jenkins master main process.</p>
<p>You can overwrite it in the following pattern:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>bash<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>-c<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/var/jenkins/scripts/init.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;custom-code-here&gt;<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">&amp;&amp;</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/sbin/tini<span style="color:#f8f8f8;text-decoration:underline"> </span>-s<span style="color:#f8f8f8;text-decoration:underline"> </span>--<span style="color:#f8f8f8;text-decoration:underline"> </span>/usr/local/bin/jenkins.sh</code></pre></div>
<div class="text-muted mt-5 pt-3 border-top">Last modified August 5, 2019
</div>
</div>
</main>
</div>
</div>
<footer class="bg-dark py-5 row d-print-none">
<div class="container-fluid mx-sm-5">
<div class="row">
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
</div>
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
<small class="text-white">&copy; 2019 VirtusLab All Rights Reserved</small>
<p class="mt-2"><a href="/kubernetes-operator/about/">What&#39;s the Jenkins Operator?</a></p>
</div>
</div>
</div>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="/kubernetes-operator/js/main.min.15ba3b50c3bd013e1b26793d1a59390ea2e0f21481eafe4022de05a44eba88fc.js" integrity="sha256-Fbo7UMO9AT4bJnk9Glk5DqLg8hSB6v5AIt4FpE66iPw="></script>
</body>
</html>

View File

@ -0,0 +1,620 @@
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.55.6" />
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link rel="shortcut icon" href="/favicons/favicon.ico" >
<link rel="apple-touch-icon" href="/kubernetes-operator/favicons/apple-touch-icon-180x180.png" sizes="180x180">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-36x36.png" sizes="36x36">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-48x48.png" sizes="48x48">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-72x72.png" sizes="72x72">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-96x196.png" sizes="96x196">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-144x144.png" sizes="144x144">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-192x192.png"sizes="192x192">
<title>Configure backup and restore | Jenkins Operator</title><meta property="og:title" content="Configure backup and restore" />
<meta property="og:description" content="Prevent loss of job history
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/" />
<meta property="article:published_time" content="2019-08-05T00:00:00&#43;00:00"/>
<meta property="article:modified_time" content="2019-08-05T00:00:00&#43;00:00"/><meta property="og:site_name" content="Jenkins Operator" />
<meta itemprop="name" content="Configure backup and restore">
<meta itemprop="description" content="Prevent loss of job history
">
<meta itemprop="datePublished" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="dateModified" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="wordCount" content="158">
<meta itemprop="keywords" content="" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Configure backup and restore"/>
<meta name="twitter:description" content="Prevent loss of job history
"/>
<link rel="preload" href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" as="style">
<link href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" rel="stylesheet" integrity="">
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<title>Configure backup and restore | Jenkins Operator</title>
</head>
<body class="td-page">
<header>
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
<a class="navbar-brand" href="/kubernetes-operator/">
<img style="width: 32px; height: 32px; margin-right: 7.5px;" src="/kubernetes-operator/img/logo.svg"></img><span class="text-uppercase font-weight-bold">Jenkins Operator</span>
</a>
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
<ul class="navbar-nav mt-2 mt-lg-0">
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/about"><span>What's the Jenkins Operator?</span></a>
</li>
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/docs"><span>Documentation</span></a>
</li>
</ul>
</div>
<div class="navbar-nav d-none d-lg-block">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
</div>
</nav>
</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
<div id="td-sidebar-menu" class="td-sidebar__inner">
<form class="td-sidebar__search d-flex align-items-center">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
</button>
</form>
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Documentation</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/installation/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Installation</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-installation">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/how-it-works/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">How it works</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-how-it-works">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-architecture-and-design" href="/kubernetes-operator/docs/how-it-works/architecture-and-design/">Architecture and design</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-jenkins-docker-images" href="/kubernetes-operator/docs/how-it-works/jenkins-docker-images/">Jenkins Docker Images</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Getting Started</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/latest/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Latest (v0.2.x)</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-latest">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configuration" href="/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-customization" href="/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-aks" href="/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-custom-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-migration" href="/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-diagnostics" href="/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.1.x/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">v0.1.x</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started-v0-1-x">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-customization" href="/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-aks" href="/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page active" id="m-kubernetes-operator-docs-getting-started-v0-1-x-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/security/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Security</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-security">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/developer-guide/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Developer Guide</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-developer-guide">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-developer-guide-tools" href="/kubernetes-operator/docs/developer-guide/tools/">Tools</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
</nav>
</div>
</div>
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/docs/Getting%20Started/v0.1.x/configure-backup-and-restore.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=Configure%20backup%20and%20restore" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
<nav id="TableOfContents">
<ul>
<li>
<ul>
<li>
<ul>
<li>
<ul>
<li><a href="#create-pvc">Create PVC</a></li>
<li><a href="#configure-jenkins-cr">Configure Jenkins CR</a></li>
</ul></li>
</ul></li>
</ul></li>
</ul>
</nav>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
<ol class="breadcrumb spb-1">
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/">Documentation</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/">Getting Started</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/">v0.1.x</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
</li>
</ol>
</nav >
<div class="td-content">
<h1>Configure backup and restore</h1>
<div class="lead">Prevent loss of job history</div>
<p>Backup and restore is done by a container sidecar.</p>
<h4 id="create-pvc">Create PVC</h4>
<p>Save to the file named pvc.yaml:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>v1<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>PersistentVolumeClaim<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt;
</span><span style="color:#8f5902;font-style:italic"> namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>accessModes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>ReadWriteOnce<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>storage<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Gi</code></pre></div>
<p>Run the following command:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n &lt;namespace&gt; create -f pvc.yaml</code></pre></div>
<h4 id="configure-jenkins-cr">Configure Jenkins CR</h4>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;cr_name<span style="color:#8f5902;font-style:italic">&gt;
</span><span style="color:#8f5902;font-style:italic"> namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>securityContext<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>runAsUser<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>fsGroup<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1000</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/jenkins<span style="color:#000;font-weight:bold">:</span>lts<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container responsible for the backup and restore</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>env<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_DIR<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>JENKINS_HOME<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>BACKUP_COUNT<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>value<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;3&#34;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># keep only the 2 most recent backups</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>virtuslab/jenkins-operator-backup-pvc<span style="color:#000;font-weight:bold">:</span>v0.<span style="color:#0000cf;font-weight:bold">0.7</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># look at backup/pvc directory</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>IfNotPresent<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumeMounts<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/jenkins-home<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Jenkins home volume</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-home<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mountPath<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># backup volume</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>volumes<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># PVC volume where backups will be stored</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>persistentVolumeClaim<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>claimName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;pvc_name<span style="color:#8f5902;font-style:italic">&gt;
</span><span style="color:#8f5902;font-style:italic"> backup:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible for backup</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/backup.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to make backup, for example /home/user/bin/backup.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>interval<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">30</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># how often to make a backup, in seconds</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>makeBackupBeforePodDeletion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># make a backup before pod deletion</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containerName<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>backup<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># container name is responsible to restore the backup</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>action<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/restore.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to restore the backup, for example /home/user/bin/restore.sh &lt;backup_number&gt;, &lt;backup_number&gt; is passed by operator</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">#recoveryOnce: &lt;backup_number&gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored</span></code></pre></div>
<div class="text-muted mt-5 pt-3 border-top">Last modified August 5, 2019
</div>
</div>
</main>
</div>
</div>
<footer class="bg-dark py-5 row d-print-none">
<div class="container-fluid mx-sm-5">
<div class="row">
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
</div>
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
<small class="text-white">&copy; 2019 VirtusLab All Rights Reserved</small>
<p class="mt-2"><a href="/kubernetes-operator/about/">What&#39;s the Jenkins Operator?</a></p>
</div>
</div>
</div>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="/kubernetes-operator/js/main.min.15ba3b50c3bd013e1b26793d1a59390ea2e0f21481eafe4022de05a44eba88fc.js" integrity="sha256-Fbo7UMO9AT4bJnk9Glk5DqLg8hSB6v5AIt4FpE66iPw="></script>
</body>
</html>

View File

@ -0,0 +1,637 @@
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.55.6" />
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link rel="shortcut icon" href="/favicons/favicon.ico" >
<link rel="apple-touch-icon" href="/kubernetes-operator/favicons/apple-touch-icon-180x180.png" sizes="180x180">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-36x36.png" sizes="36x36">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-48x48.png" sizes="48x48">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-72x72.png" sizes="72x72">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-96x196.png" sizes="96x196">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-144x144.png" sizes="144x144">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-192x192.png"sizes="192x192">
<title>Customization | Jenkins Operator</title><meta property="og:title" content="Customization" />
<meta property="og:description" content="How to customize Jenkins
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/customization/" />
<meta property="article:published_time" content="2019-08-05T00:00:00&#43;00:00"/>
<meta property="article:modified_time" content="2019-08-05T00:00:00&#43;00:00"/><meta property="og:site_name" content="Jenkins Operator" />
<meta itemprop="name" content="Customization">
<meta itemprop="description" content="How to customize Jenkins
">
<meta itemprop="datePublished" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="dateModified" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="wordCount" content="242">
<meta itemprop="keywords" content="" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Customization"/>
<meta name="twitter:description" content="How to customize Jenkins
"/>
<link rel="preload" href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" as="style">
<link href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" rel="stylesheet" integrity="">
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<title>Customization | Jenkins Operator</title>
</head>
<body class="td-page">
<header>
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
<a class="navbar-brand" href="/kubernetes-operator/">
<img style="width: 32px; height: 32px; margin-right: 7.5px;" src="/kubernetes-operator/img/logo.svg"></img><span class="text-uppercase font-weight-bold">Jenkins Operator</span>
</a>
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
<ul class="navbar-nav mt-2 mt-lg-0">
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/about"><span>What's the Jenkins Operator?</span></a>
</li>
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/docs"><span>Documentation</span></a>
</li>
</ul>
</div>
<div class="navbar-nav d-none d-lg-block">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
</div>
</nav>
</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
<div id="td-sidebar-menu" class="td-sidebar__inner">
<form class="td-sidebar__search d-flex align-items-center">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
</button>
</form>
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Documentation</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/installation/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Installation</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-installation">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/how-it-works/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">How it works</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-how-it-works">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-architecture-and-design" href="/kubernetes-operator/docs/how-it-works/architecture-and-design/">Architecture and design</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-jenkins-docker-images" href="/kubernetes-operator/docs/how-it-works/jenkins-docker-images/">Jenkins Docker Images</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Getting Started</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/latest/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Latest (v0.2.x)</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-latest">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configuration" href="/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-customization" href="/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-aks" href="/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-custom-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-migration" href="/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-diagnostics" href="/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.1.x/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">v0.1.x</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started-v0-1-x">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page active" id="m-kubernetes-operator-docs-getting-started-v0-1-x-customization" href="/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-aks" href="/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/security/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Security</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-security">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/developer-guide/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Developer Guide</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-developer-guide">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-developer-guide-tools" href="/kubernetes-operator/docs/developer-guide/tools/">Tools</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
</nav>
</div>
</div>
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/docs/Getting%20Started/v0.1.x/customization.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=Customization" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
<ol class="breadcrumb spb-1">
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/">Documentation</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/">Getting Started</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/">v0.1.x</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
</li>
</ol>
</nav >
<div class="td-content">
<h1>Customization</h1>
<div class="lead">How to customize Jenkins</div>
<p>Jenkins can be customized using by groovy scripts or the Jenkins Configuration as Code Plugin. All custom configuration is stored in
the <strong>jenkins-operator-user-configuration-<cr_name></strong> ConfigMap, which is automatically created by the <strong>Jenkins Operator</strong>.</p>
<p>The <strong>Jenkins Operator</strong> creates a <strong>jenkins-operator-user-configuration-<cr_name></strong> secret where the user can store sensitive
information used for custom configuration. If you have an entry in the secret named <code>PASSWORD</code> then you can use it in the
Jenkins Configuration as Code Plugin as <code>adminAddress: &quot;${PASSWORD}&quot;</code>.</p>
<pre><code>kubectl get secret jenkins-operator-user-configuration-&lt;cr_name&gt; -o yaml
kind: Secret
apiVersion: v1
type: Opaque
metadata:
name: jenkins-operator-user-configuration-&lt;cr_name&gt;
namespace: default
data:
SECRET_JENKINS_ADMIN_ADDRESS: YXNkZgo=
</code></pre>
<pre><code>kubectl get configmap jenkins-operator-user-configuration-&lt;cr_name&gt; -o yaml
apiVersion: v1
data:
1-configure-theme.groovy: |2
import jenkins.*
import jenkins.model.*
import hudson.*
import hudson.model.*
import org.jenkinsci.plugins.simpletheme.ThemeElement
import org.jenkinsci.plugins.simpletheme.CssTextThemeElement
import org.jenkinsci.plugins.simpletheme.CssUrlThemeElement
Jenkins jenkins = Jenkins.getInstance()
def decorator = Jenkins.instance.getDescriptorByType(org.codefirst.SimpleThemeDecorator.class)
List&lt;ThemeElement&gt; configElements = new ArrayList&lt;&gt;();
configElements.add(new CssTextThemeElement(&quot;DEFAULT&quot;));
configElements.add(new CssUrlThemeElement(&quot;https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-light-green.css&quot;));
decorator.setElements(configElements);
decorator.save();
jenkins.save()
1-system-message.yaml: |2
jenkins:
systemMessage: &quot;Configuration as Code integration works!!!&quot;
adminAddress: &quot;${SECRET_JENKINS_ADMIN_ADDRESS}&quot;
kind: ConfigMap
metadata:
name: jenkins-operator-user-configuration-&lt;cr_name&gt;
namespace: default
</code></pre>
<p>When the <strong>jenkins-operator-user-configuration-<cr_name></strong> ConfigMap is updated, Jenkins automatically
runs the <strong>jenkins-operator-user-configuration</strong> Jenkins Job which executes all scripts, and then
runs the <strong>jenkins-operator-user-configuration-casc</strong> Jenkins Job which applies the Configuration as Code configuration.</p>
<h2 id="install-plugins">Install Plugins</h2>
<p>Edit CR under <code>spec.master.plugins</code>:</p>
<pre><code>apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: example
spec:
master:
plugins:
- name: simple-theme-plugin
version: 0.5.1
</code></pre>
<p>Under <code>spec.master.basePlugins</code> you can find plugins for a valid <strong>Jenkins Operator</strong>:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>example<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>basePlugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1.18</span>.<span style="color:#0000cf;font-weight:bold">3</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-job<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2.34&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-aggregator<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2.6&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>git<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3.12</span>.<span style="color:#0000cf;font-weight:bold">0</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>job-dsl<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.76&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configuration-as-code<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.31&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes-credentials-provider<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0.12</span>.<span style="color:#0000cf;font-weight:bold">1</span></code></pre></div>
<p>You can change their versions.</p>
<p>The <strong>Jenkins Operator</strong> will then automatically install those plugins after the Jenkins master pod restart.</p>
<div class="text-muted mt-5 pt-3 border-top">Last modified August 5, 2019
</div>
</div>
</main>
</div>
</div>
<footer class="bg-dark py-5 row d-print-none">
<div class="container-fluid mx-sm-5">
<div class="row">
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
</div>
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
<small class="text-white">&copy; 2019 VirtusLab All Rights Reserved</small>
<p class="mt-2"><a href="/kubernetes-operator/about/">What&#39;s the Jenkins Operator?</a></p>
</div>
</div>
</div>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="/kubernetes-operator/js/main.min.15ba3b50c3bd013e1b26793d1a59390ea2e0f21481eafe4022de05a44eba88fc.js" integrity="sha256-Fbo7UMO9AT4bJnk9Glk5DqLg8hSB6v5AIt4FpE66iPw="></script>
</body>
</html>

View File

@ -0,0 +1,599 @@
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.55.6" />
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link rel="shortcut icon" href="/favicons/favicon.ico" >
<link rel="apple-touch-icon" href="/kubernetes-operator/favicons/apple-touch-icon-180x180.png" sizes="180x180">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-36x36.png" sizes="36x36">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-48x48.png" sizes="48x48">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-72x72.png" sizes="72x72">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-96x196.png" sizes="96x196">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-144x144.png" sizes="144x144">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-192x192.png"sizes="192x192">
<title>Deploy Jenkins | Jenkins Operator</title><meta property="og:title" content="Deploy Jenkins" />
<meta property="og:description" content="Deploy production ready Jenkins Operator manifest
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/" />
<meta property="article:published_time" content="2019-08-05T00:00:00&#43;00:00"/>
<meta property="article:modified_time" content="2019-08-05T00:00:00&#43;00:00"/><meta property="og:site_name" content="Jenkins Operator" />
<meta itemprop="name" content="Deploy Jenkins">
<meta itemprop="description" content="Deploy production ready Jenkins Operator manifest
">
<meta itemprop="datePublished" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="dateModified" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="wordCount" content="176">
<meta itemprop="keywords" content="" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Deploy Jenkins"/>
<meta name="twitter:description" content="Deploy production ready Jenkins Operator manifest
"/>
<link rel="preload" href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" as="style">
<link href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" rel="stylesheet" integrity="">
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<title>Deploy Jenkins | Jenkins Operator</title>
</head>
<body class="td-page">
<header>
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
<a class="navbar-brand" href="/kubernetes-operator/">
<img style="width: 32px; height: 32px; margin-right: 7.5px;" src="/kubernetes-operator/img/logo.svg"></img><span class="text-uppercase font-weight-bold">Jenkins Operator</span>
</a>
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
<ul class="navbar-nav mt-2 mt-lg-0">
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/about"><span>What's the Jenkins Operator?</span></a>
</li>
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/docs"><span>Documentation</span></a>
</li>
</ul>
</div>
<div class="navbar-nav d-none d-lg-block">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
</div>
</nav>
</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
<div id="td-sidebar-menu" class="td-sidebar__inner">
<form class="td-sidebar__search d-flex align-items-center">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
</button>
</form>
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Documentation</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/installation/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Installation</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-installation">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/how-it-works/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">How it works</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-how-it-works">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-architecture-and-design" href="/kubernetes-operator/docs/how-it-works/architecture-and-design/">Architecture and design</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-jenkins-docker-images" href="/kubernetes-operator/docs/how-it-works/jenkins-docker-images/">Jenkins Docker Images</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Getting Started</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/latest/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Latest (v0.2.x)</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-latest">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configuration" href="/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-customization" href="/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-aks" href="/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-custom-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-migration" href="/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-diagnostics" href="/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.1.x/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">v0.1.x</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started-v0-1-x">
<a class="td-sidebar-link td-sidebar-link__page active" id="m-kubernetes-operator-docs-getting-started-v0-1-x-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-customization" href="/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-aks" href="/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/security/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Security</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-security">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/developer-guide/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Developer Guide</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-developer-guide">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-developer-guide-tools" href="/kubernetes-operator/docs/developer-guide/tools/">Tools</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
</nav>
</div>
</div>
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/docs/Getting%20Started/v0.1.x/deploy-jenkins.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=Deploy%20Jenkins" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
<ol class="breadcrumb spb-1">
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/">Documentation</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/">Getting Started</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/">v0.1.x</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
</li>
</ol>
</nav >
<div class="td-content">
<h1>Deploy Jenkins</h1>
<div class="lead">Deploy production ready Jenkins Operator manifest</div>
<h2 id="deploy-jenkins">Deploy Jenkins</h2>
<p>Once the <strong>Jenkins Operator</strong> is up and running let&rsquo;s deploy an actual Jenkins instance.
Create a manifest ie. <strong>jenkins_instance.yaml</strong> with following data and save it on drive.</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: example
spec:
master:
containers:
- name: jenkins-master
image: jenkins/jenkins:lts
imagePullPolicy: Always
livenessProbe:
failureThreshold: <span style="color:#0000cf;font-weight:bold">12</span>
httpGet:
path: /login
port: http
scheme: HTTP
initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">80</span>
periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span>
successThreshold: <span style="color:#0000cf;font-weight:bold">1</span>
timeoutSeconds: <span style="color:#0000cf;font-weight:bold">5</span>
readinessProbe:
failureThreshold: <span style="color:#0000cf;font-weight:bold">3</span>
httpGet:
path: /login
port: http
scheme: HTTP
initialDelaySeconds: <span style="color:#0000cf;font-weight:bold">30</span>
periodSeconds: <span style="color:#0000cf;font-weight:bold">10</span>
successThreshold: <span style="color:#0000cf;font-weight:bold">1</span>
timeoutSeconds: <span style="color:#0000cf;font-weight:bold">1</span>
resources:
limits:
cpu: 1500m
memory: 3Gi
requests:
cpu: <span style="color:#4e9a06">&#34;1&#34;</span>
memory: 500Mi
seedJobs:
- id: jenkins-operator
targets: <span style="color:#4e9a06">&#34;cicd/jobs/*.jenkins&#34;</span>
description: <span style="color:#4e9a06">&#34;Jenkins Operator repository&#34;</span>
repositoryBranch: master
repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre></div>
<p>Deploy a Jenkins to K8s:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl create -f jenkins_instance.yaml</code></pre></div>
<p>Watch the Jenkins instance being created:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get pods -w</code></pre></div>
<p>Get the Jenkins credentials:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.user}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d
kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="color:#4e9a06">&#39;jsonpath={.data.password}&#39;</span> <span style="color:#000;font-weight:bold">|</span> base64 -d</code></pre></div>
<p>Connect to the Jenkins Operator (minikube):</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">minikube service jenkins-operator-http-&lt;cr_name&gt; --url</code></pre></div>
<p>Connect to the Jenkins intance (actual Kubernetes cluster):</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl port-forward jenkins-&lt;cr_name&gt; <span style="color:#0000cf;font-weight:bold">8080</span>:8080</code></pre></div>
<p>Then open browser with address <code>http://localhost:8080</code>.
<img src="/kubernetes-operator/img/jenkins.png" alt="jenkins" /></p>
<div class="text-muted mt-5 pt-3 border-top">Last modified August 5, 2019
</div>
</div>
</main>
</div>
</div>
<footer class="bg-dark py-5 row d-print-none">
<div class="container-fluid mx-sm-5">
<div class="row">
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
</div>
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
<small class="text-white">&copy; 2019 VirtusLab All Rights Reserved</small>
<p class="mt-2"><a href="/kubernetes-operator/about/">What&#39;s the Jenkins Operator?</a></p>
</div>
</div>
</div>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="/kubernetes-operator/js/main.min.15ba3b50c3bd013e1b26793d1a59390ea2e0f21481eafe4022de05a44eba88fc.js" integrity="sha256-Fbo7UMO9AT4bJnk9Glk5DqLg8hSB6v5AIt4FpE66iPw="></script>
</body>
</html>

View File

@ -0,0 +1,551 @@
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.55.6" />
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link rel="shortcut icon" href="/favicons/favicon.ico" >
<link rel="apple-touch-icon" href="/kubernetes-operator/favicons/apple-touch-icon-180x180.png" sizes="180x180">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-36x36.png" sizes="36x36">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-48x48.png" sizes="48x48">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-72x72.png" sizes="72x72">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-96x196.png" sizes="96x196">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-144x144.png" sizes="144x144">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-192x192.png"sizes="192x192">
<title>Diagnostics | Jenkins Operator</title><meta property="og:title" content="Diagnostics" />
<meta property="og:description" content="How to deal with jenkins-operator problems
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/" />
<meta property="article:published_time" content="2019-08-05T00:00:00&#43;00:00"/>
<meta property="article:modified_time" content="2019-08-05T00:00:00&#43;00:00"/><meta property="og:site_name" content="Jenkins Operator" />
<meta itemprop="name" content="Diagnostics">
<meta itemprop="description" content="How to deal with jenkins-operator problems
">
<meta itemprop="datePublished" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="dateModified" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="wordCount" content="56">
<meta itemprop="keywords" content="" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Diagnostics"/>
<meta name="twitter:description" content="How to deal with jenkins-operator problems
"/>
<link rel="preload" href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" as="style">
<link href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" rel="stylesheet" integrity="">
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<title>Diagnostics | Jenkins Operator</title>
</head>
<body class="td-page">
<header>
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
<a class="navbar-brand" href="/kubernetes-operator/">
<img style="width: 32px; height: 32px; margin-right: 7.5px;" src="/kubernetes-operator/img/logo.svg"></img><span class="text-uppercase font-weight-bold">Jenkins Operator</span>
</a>
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
<ul class="navbar-nav mt-2 mt-lg-0">
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/about"><span>What's the Jenkins Operator?</span></a>
</li>
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/docs"><span>Documentation</span></a>
</li>
</ul>
</div>
<div class="navbar-nav d-none d-lg-block">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
</div>
</nav>
</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
<div id="td-sidebar-menu" class="td-sidebar__inner">
<form class="td-sidebar__search d-flex align-items-center">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
</button>
</form>
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Documentation</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/installation/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Installation</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-installation">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/how-it-works/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">How it works</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-how-it-works">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-architecture-and-design" href="/kubernetes-operator/docs/how-it-works/architecture-and-design/">Architecture and design</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-jenkins-docker-images" href="/kubernetes-operator/docs/how-it-works/jenkins-docker-images/">Jenkins Docker Images</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Getting Started</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/latest/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Latest (v0.2.x)</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-latest">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configuration" href="/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-customization" href="/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-aks" href="/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-custom-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-migration" href="/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-diagnostics" href="/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.1.x/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">v0.1.x</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started-v0-1-x">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-customization" href="/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-aks" href="/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page active" id="m-kubernetes-operator-docs-getting-started-v0-1-x-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/security/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Security</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-security">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/developer-guide/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Developer Guide</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-developer-guide">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-developer-guide-tools" href="/kubernetes-operator/docs/developer-guide/tools/">Tools</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
</nav>
</div>
</div>
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/docs/Getting%20Started/v0.1.x/diagnostics.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=Diagnostics" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
<ol class="breadcrumb spb-1">
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/">Documentation</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/">Getting Started</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/">v0.1.x</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
</li>
</ol>
</nav >
<div class="td-content">
<h1>Diagnostics</h1>
<div class="lead">How to deal with jenkins-operator problems</div>
<p>Turn on debug in <strong>Jenkins Operator</strong> deployment:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sed -i <span style="color:#4e9a06">&#39;s|\(args:\).*|\1\ [&#34;--debug&#34;\]|&#39;</span> deploy/operator.yaml
kubectl apply -f deploy/operator.yaml</code></pre></div>
<p>Watch Kubernetes events:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get events --sort-by<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">&#39;{.lastTimestamp}&#39;</span></code></pre></div>
<p>Verify Jenkins master logs:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl logs -f jenkins-&lt;cr_name&gt;</code></pre></div>
<p>Verify jenkins-operator logs:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl logs deployment/jenkins-operator</code></pre></div>
<h2 id="troubleshooting">Troubleshooting</h2>
<p>Delete the Jenkins master pod and wait for the new one to come up:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl delete pod jenkins-&lt;cr_name&gt;</code></pre></div>
<div class="text-muted mt-5 pt-3 border-top">Last modified August 5, 2019
</div>
</div>
</main>
</div>
</div>
<footer class="bg-dark py-5 row d-print-none">
<div class="container-fluid mx-sm-5">
<div class="row">
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
</div>
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
<small class="text-white">&copy; 2019 VirtusLab All Rights Reserved</small>
<p class="mt-2"><a href="/kubernetes-operator/about/">What&#39;s the Jenkins Operator?</a></p>
</div>
</div>
</div>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="/kubernetes-operator/js/main.min.15ba3b50c3bd013e1b26793d1a59390ea2e0f21481eafe4022de05a44eba88fc.js" integrity="sha256-Fbo7UMO9AT4bJnk9Glk5DqLg8hSB6v5AIt4FpE66iPw="></script>
</body>
</html>

View File

@ -0,0 +1,663 @@
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.55.6" />
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link rel="alternate" type="application/rss&#43;xml" href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/index.xml">
<link rel="shortcut icon" href="/favicons/favicon.ico" >
<link rel="apple-touch-icon" href="/kubernetes-operator/favicons/apple-touch-icon-180x180.png" sizes="180x180">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-36x36.png" sizes="36x36">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-48x48.png" sizes="48x48">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-72x72.png" sizes="72x72">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-96x196.png" sizes="96x196">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-144x144.png" sizes="144x144">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-192x192.png"sizes="192x192">
<title>v0.1.x | Jenkins Operator</title><meta property="og:title" content="v0.1.x" />
<meta property="og:description" content="How to work with jenkins-operator legacy version. We recommend migration to v0.2.0 version
" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/" />
<meta property="og:updated_time" content="2019-08-05T00:00:00&#43;00:00"/><meta property="og:site_name" content="Jenkins Operator" />
<meta itemprop="name" content="v0.1.x">
<meta itemprop="description" content="How to work with jenkins-operator legacy version. We recommend migration to v0.2.0 version
">
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="v0.1.x"/>
<meta name="twitter:description" content="How to work with jenkins-operator legacy version. We recommend migration to v0.2.0 version
"/>
<link rel="preload" href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" as="style">
<link href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" rel="stylesheet" integrity="">
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<title>v0.1.x | Jenkins Operator</title>
</head>
<body class="td-section">
<header>
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
<a class="navbar-brand" href="/kubernetes-operator/">
<img style="width: 32px; height: 32px; margin-right: 7.5px;" src="/kubernetes-operator/img/logo.svg"></img><span class="text-uppercase font-weight-bold">Jenkins Operator</span>
</a>
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
<ul class="navbar-nav mt-2 mt-lg-0">
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/about"><span>What's the Jenkins Operator?</span></a>
</li>
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/docs"><span>Documentation</span></a>
</li>
</ul>
</div>
<div class="navbar-nav d-none d-lg-block">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
</div>
</nav>
</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
<div id="td-sidebar-menu" class="td-sidebar__inner">
<form class="td-sidebar__search d-flex align-items-center">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
</button>
</form>
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Documentation</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/installation/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Installation</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-installation">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/how-it-works/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">How it works</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-how-it-works">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-architecture-and-design" href="/kubernetes-operator/docs/how-it-works/architecture-and-design/">Architecture and design</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-jenkins-docker-images" href="/kubernetes-operator/docs/how-it-works/jenkins-docker-images/">Jenkins Docker Images</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Getting Started</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/latest/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Latest (v0.2.x)</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-latest">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configuration" href="/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-customization" href="/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-aks" href="/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-custom-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-migration" href="/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-diagnostics" href="/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.1.x/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">v0.1.x</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started-v0-1-x">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-customization" href="/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-aks" href="/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/security/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Security</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-security">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/developer-guide/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Developer Guide</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-developer-guide">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-developer-guide-tools" href="/kubernetes-operator/docs/developer-guide/tools/">Tools</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
</nav>
</div>
</div>
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/docs/Getting%20Started/v0.1.x/_index.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=v0.1.x" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
<ol class="breadcrumb spb-1">
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/">Documentation</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/">Getting Started</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/">v0.1.x</a>
</li>
</ol>
</nav >
<div class="td-content">
<h1>v0.1.x</h1>
<div class="lead">How to work with jenkins-operator legacy version. We recommend migration to v0.2.0 version</div>
<div class="pageinfo pageinfo-primary">
<p>This document describes a getting started guide for <strong>Jenkins Operator</strong> <code>v0.1.x</code> and an additional configuration.</p>
</div>
<h2 id="first-steps">First Steps</h2>
<p>Prepare your Kubernetes cluster and set up access.
Once you have running Kubernetes cluster you can focus on installing <strong>Jenkins Operator</strong> according to the <a href="/docs/installation/">Installation</a> guide.</p>
<div class="section-index">
<hr class="panel-line">
<div class="entry">
<h5>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
</h5>
<p>Deploy production ready Jenkins Operator manifest
</p>
</div>
<div class="entry">
<h5>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
</h5>
<p>How to configure Jenkins with Operator
</p>
</div>
<div class="entry">
<h5>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
</h5>
<p>How to customize Jenkins
</p>
</div>
<div class="entry">
<h5>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
</h5>
<p>Additional configuration for Azure Kubernetes Service
</p>
</div>
<div class="entry">
<h5>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
</h5>
<p>Prevent loss of job history
</p>
</div>
<div class="entry">
<h5>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
</h5>
<p>How to deal with jenkins-operator problems
</p>
</div>
<div class="entry">
<h5>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
</h5>
<p>API Schema definitions for Jenkins CR
</p>
</div>
<div class="entry">
<h5>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</h5>
<p>How to migrate to new CRD manifest
</p>
</div>
</div>
<div class="text-muted mt-5 pt-3 border-top">Last modified August 5, 2019
</div>
</div>
</main>
</div>
</div>
<footer class="bg-dark py-5 row d-print-none">
<div class="container-fluid mx-sm-5">
<div class="row">
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
</div>
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
<small class="text-white">&copy; 2019 VirtusLab All Rights Reserved</small>
<p class="mt-2"><a href="/kubernetes-operator/about/">What&#39;s the Jenkins Operator?</a></p>
</div>
</div>
</div>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="/kubernetes-operator/js/main.min.15ba3b50c3bd013e1b26793d1a59390ea2e0f21481eafe4022de05a44eba88fc.js" integrity="sha256-Fbo7UMO9AT4bJnk9Glk5DqLg8hSB6v5AIt4FpE66iPw="></script>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,864 @@
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.55.6" />
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link rel="shortcut icon" href="/favicons/favicon.ico" >
<link rel="apple-touch-icon" href="/kubernetes-operator/favicons/apple-touch-icon-180x180.png" sizes="180x180">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-36x36.png" sizes="36x36">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-48x48.png" sizes="48x48">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-72x72.png" sizes="72x72">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-96x196.png" sizes="96x196">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-144x144.png" sizes="144x144">
<link rel="icon" type="image/png" href="/kubernetes-operator/favicons/android-192x192.png"sizes="192x192">
<title>Migration guide from v1alpha1 to v1alpha2 | Jenkins Operator</title><meta property="og:title" content="Migration guide from v1alpha1 to v1alpha2" />
<meta property="og:description" content="How to migrate to new CRD manifest
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/" />
<meta property="article:published_time" content="2019-08-05T00:00:00&#43;00:00"/>
<meta property="article:modified_time" content="2019-08-05T00:00:00&#43;00:00"/><meta property="og:site_name" content="Jenkins Operator" />
<meta itemprop="name" content="Migration guide from v1alpha1 to v1alpha2">
<meta itemprop="description" content="How to migrate to new CRD manifest
">
<meta itemprop="datePublished" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="dateModified" content="2019-08-05T00:00:00&#43;00:00" />
<meta itemprop="wordCount" content="361">
<meta itemprop="keywords" content="" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Migration guide from v1alpha1 to v1alpha2"/>
<meta name="twitter:description" content="How to migrate to new CRD manifest
"/>
<link rel="preload" href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" as="style">
<link href="/kubernetes-operator/scss/main.min.401a1d444a3f374545e199eff2460fab833ab61f776ce23ec44dea9599dda6b1.css" rel="stylesheet" integrity="">
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<title>Migration guide from v1alpha1 to v1alpha2 | Jenkins Operator</title>
</head>
<body class="td-page">
<header>
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
<a class="navbar-brand" href="/kubernetes-operator/">
<img style="width: 32px; height: 32px; margin-right: 7.5px;" src="/kubernetes-operator/img/logo.svg"></img><span class="text-uppercase font-weight-bold">Jenkins Operator</span>
</a>
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
<ul class="navbar-nav mt-2 mt-lg-0">
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/about"><span>What's the Jenkins Operator?</span></a>
</li>
<li class="nav-item mr-4 mb-2 mb-lg-0">
<a class="nav-link" href="/kubernetes-operator/docs"><span>Documentation</span></a>
</li>
</ul>
</div>
<div class="navbar-nav d-none d-lg-block">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
</div>
</nav>
</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
<div id="td-sidebar-menu" class="td-sidebar__inner">
<form class="td-sidebar__search d-flex align-items-center">
<input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off">
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation">
</button>
</form>
<nav class="collapse td-sidebar-nav pt-2 pl-4" id="td-section-nav">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Documentation</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/installation/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Installation</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-installation">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/how-it-works/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">How it works</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-how-it-works">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-architecture-and-design" href="/kubernetes-operator/docs/how-it-works/architecture-and-design/">Architecture and design</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-how-it-works-jenkins-docker-images" href="/kubernetes-operator/docs/how-it-works/jenkins-docker-images/">Jenkins Docker Images</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Getting Started</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started">
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/latest/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Latest (v0.2.x)</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-latest">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configuration" href="/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-customization" href="/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-aks" href="/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-custom-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-migration" href="/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-diagnostics" href="/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.1.x/" class="align-left pl-0 pr-2 active td-sidebar-link td-sidebar-link__section">v0.1.x</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started-v0-1-x">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-customization" href="/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-aks" href="/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page active" id="m-kubernetes-operator-docs-getting-started-v0-1-x-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/security/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Security</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-security">
</li>
</ul>
</ul>
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/developer-guide/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Developer Guide</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-developer-guide">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-developer-guide-tools" href="/kubernetes-operator/docs/developer-guide/tools/">Tools</a>
</li>
</ul>
</ul>
</li>
</ul>
</ul>
</nav>
</div>
</div>
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/docs/Getting%20Started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=Migration%20guide%20from%20v1alpha1%20to%20v1alpha2" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
<nav id="TableOfContents">
<ul>
<li>
<ul>
<li><a href="#stop-the-jenkins-operator-pod">Stop the jenkins-operator pod</a></li>
<li><a href="#stop-the-jenkins-master-pod">Stop the Jenkins master pod</a></li>
<li><a href="#save-jenkins-cr-to-jenkins-yaml-file">Save Jenkins CR to jenkins.yaml file</a></li>
<li><a href="#modify-jenkins-yaml-file">Modify jenkins.yaml file</a>
<ul>
<li><a href="#examples">Examples</a></li>
</ul></li>
<li><a href="#update-crd-to-a-new-version">Update CRD to a new version</a></li>
<li><a href="#update-rbac-to-a-new-version">Update RBAC to a new version</a></li>
<li><a href="#deploy-new-operator-manifests">Deploy new operator manifests</a></li>
</ul></li>
</ul>
</nav>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
<ol class="breadcrumb spb-1">
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/">Documentation</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/">Getting Started</a>
</li>
<li class="breadcrumb-item" >
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/">v0.1.x</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
</ol>
</nav >
<div class="td-content">
<h1>Migration guide from v1alpha1 to v1alpha2</h1>
<div class="lead">How to migrate to new CRD manifest</div>
<p>Please note that <strong>CRD manifests are global</strong>, not namespaced, so every <strong>Jenkins operator</strong> running on the cluster
will be impacted by the new CRD manifest. Multiple operator instances with different versions <em>should</em> continue to work.</p>
<h2 id="stop-the-jenkins-operator-pod">Stop the jenkins-operator pod</h2>
<p>Run command:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n &lt;namespace&gt; scale deployment.apps/jenkins-operator --replicas<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#0000cf;font-weight:bold">0</span>
deployment.apps/jenkins-operator scaled</code></pre></div>
<p>Verify the desired state, by running this command:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n &lt;namespace&gt; get po
No resources found.</code></pre></div>
<h2 id="stop-the-jenkins-master-pod">Stop the Jenkins master pod</h2>
<p>Run command:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n &lt;namespace&gt; get po
NAME READY STATUS RESTARTS AGE
jenkins-operator-&lt;cr_name&gt; <span style="color:#0000cf;font-weight:bold">2</span>/2 Running <span style="color:#0000cf;font-weight:bold">0</span> 3m35s
$ kubectl -n &lt;namespace&gt; get delete po jenkins-operator-&lt;cr_name&gt;
pod <span style="color:#4e9a06">&#34;jenkins-operator-&lt;cr_name&gt;&#34;</span> deleted</code></pre></div>
<p>Verify the desired state, by running this command:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n &lt;namespace&gt; get po
No resources found.</code></pre></div>
<h2 id="save-jenkins-cr-to-jenkins-yaml-file">Save Jenkins CR to jenkins.yaml file</h2>
<p>Run command:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n &lt;namespace&gt; get jenkins &lt;cr_name&gt; -o yaml &gt; jenkins.yaml</code></pre></div>
<h2 id="modify-jenkins-yaml-file">Modify jenkins.yaml file</h2>
<p>Change apiVersion to <code>apiVersion: jenkins.io/v1alpha2</code></p>
<p>New plugin format without dependent plugins:</p>
<ul>
<li><p><code>spec.master.basePlugins</code> example:</p>
<pre><code>spec:
master:
basePlugins:
- name: a-plugin-name
version: &quot;1.0.0&quot;
...
</code></pre></li>
<li><p><code>spec.master.plugins</code> example:</p>
<pre><code>
spec:
master:
plugins:
- name: a-plugin-name
version: &quot;1.0.0&quot;
...
</code></pre></li>
</ul>
<p>Move Jenkins <code>master</code> container properties to <code>spec.master.containers[jenkins-master]</code> (non exhaustive list):
- <code>spec.master.image</code> -&gt; <code>spec.master.containers[jenkins-master].image</code>
- <code>spec.master.imagePullPolicy</code> -&gt; <code>spec.master.containers[jenkins-master].imagePullPolicy</code>
- <code>spec.master.livenessProbe</code> -&gt; <code>spec.master.containers[jenkins-master].livenessProbe</code>
- <code>spec.master.readinessProbe</code> -&gt; <code>spec.master.containers[jenkins-master].readinessProbe</code>
- <code>spec.master.resources</code> -&gt; <code>spec.master.containers[jenkins-master].resources</code>
- <code>spec.master.env</code> -&gt; <code>spec.master.containers[jenkins-master].env</code></p>
<pre><code>spec:
master:
containers:
- name: jenkins-master
image: jenkins/jenkins:lts
...
</code></pre>
<p>See also the examples below for more details. For even more details please look at the source code.
Code that defines the data structures can be found <a href="v0.1.1/jenkins-v1alpha2-scheme.md" target="_blank">here</a></p>
<h3 id="examples">Examples</h3>
<p>Old format:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha1<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;cr_name<span style="color:#8f5902;font-style:italic">&gt;
</span><span style="color:#8f5902;font-style:italic"> namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>basePlugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configuration-as-code<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.17</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>configuration-as-code-support<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.17</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>git<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">3.10</span>.<span style="color:#0000cf;font-weight:bold">0</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apache-httpcomponents-client-<span style="color:#0000cf;font-weight:bold">4</span>-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">4.5</span>.<span style="color:#0000cf;font-weight:bold">5</span>-<span style="color:#0000cf;font-weight:bold">3.0</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>credentials<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.1</span>.<span style="color:#0000cf;font-weight:bold">19</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>display-url-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.3</span>.<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>git-client<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.7</span>.<span style="color:#0000cf;font-weight:bold">7</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jsch<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">0.1</span>.<span style="color:#0000cf;font-weight:bold">55</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>junit<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.28</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mailer<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.23</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>matrix-project<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.14</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>scm-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.4</span>.<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>script-security<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.59</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>ssh-credentials<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.16</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>structs<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.19</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.34</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-scm-step<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.7</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-step-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.19</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>job-dsl<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.74</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>script-security<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.59</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>structs<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.19</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes-credentials-provider<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">0.12</span>.<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>credentials<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.1</span>.<span style="color:#0000cf;font-weight:bold">19</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>structs<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.19</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>variant<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.2</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.15</span>.<span style="color:#0000cf;font-weight:bold">5</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apache-httpcomponents-client-<span style="color:#0000cf;font-weight:bold">4</span>-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">4.5</span>.<span style="color:#0000cf;font-weight:bold">5</span>-<span style="color:#0000cf;font-weight:bold">3.0</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>cloudbees-folder<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">6.8</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>credentials<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.1</span>.<span style="color:#0000cf;font-weight:bold">19</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>durable-task<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.29</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jackson2-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.9</span>.<span style="color:#0000cf;font-weight:bold">9</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes-credentials<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">0.4</span>.<span style="color:#0000cf;font-weight:bold">0</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>plain-credentials<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.5</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>structs<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.19</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>variant<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.2</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-step-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.19</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-aggregator<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.6</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>ace-editor<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.1</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>apache-httpcomponents-client-<span style="color:#0000cf;font-weight:bold">4</span>-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">4.5</span>.<span style="color:#0000cf;font-weight:bold">5</span>-<span style="color:#0000cf;font-weight:bold">3.0</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>authentication-tokens<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.3</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>branch-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.5</span>.<span style="color:#0000cf;font-weight:bold">2</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>cloudbees-folder<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">6.8</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>credentials-binding<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.18</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>credentials<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.1</span>.<span style="color:#0000cf;font-weight:bold">19</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>display-url-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.3</span>.<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>docker-commons<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.15</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>docker-workflow<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.18</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>durable-task<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.29</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>git-client<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.7</span>.<span style="color:#0000cf;font-weight:bold">7</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>git-server<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.7</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>handlebars<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.1</span>.<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jackson2-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.9</span>.<span style="color:#0000cf;font-weight:bold">9</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jquery-detached<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.2</span>.<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>jsch<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">0.1</span>.<span style="color:#0000cf;font-weight:bold">55</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>junit<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.28</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>lockable-resources<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.5</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>mailer<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.23</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>matrix-project<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.14</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>momentjs<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.1</span>.<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pipeline-build-step<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.9</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pipeline-graph-analysis<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.10</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pipeline-input-step<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.10</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pipeline-milestone-step<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.3</span>.<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pipeline-model-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.3</span>.<span style="color:#0000cf;font-weight:bold">8</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pipeline-model-declarative-agent<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.1</span>.<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pipeline-model-definition<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.3</span>.<span style="color:#0000cf;font-weight:bold">8</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pipeline-model-extensions<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.3</span>.<span style="color:#0000cf;font-weight:bold">8</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pipeline-rest-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.11</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pipeline-stage-step<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.3</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pipeline-stage-tags-metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.3</span>.<span style="color:#0000cf;font-weight:bold">8</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>pipeline-stage-view<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.11</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>plain-credentials<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.5</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>scm-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.4</span>.<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>script-security<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.59</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>ssh-credentials<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.16</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>structs<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.19</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.34</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-basic-steps<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.16</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-cps-global-lib<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.13</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-cps<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.69</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-durable-task-step<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.30</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-job<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.32</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-multibranch<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.21</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-scm-step<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.7</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-step-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.19</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-support<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">3.3</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-job<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.32</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>scm-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.4</span>.<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>script-security<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.59</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>structs<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.19</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.34</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-step-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.19</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-support<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">3.3</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/jenkins<span style="color:#000;font-weight:bold">:</span>lts<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Always<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>livenessProbe<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>failureThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">12</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>httpGet<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>path<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/login<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">8080</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>scheme<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>HTTP<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>initialDelaySeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">30</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>periodSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>successThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>timeoutSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">5</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>plugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>simple-theme-plugin<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">0.5</span>.<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">[]</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>slack<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.24</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-step-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.19</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>credentials<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.1</span>.<span style="color:#0000cf;font-weight:bold">19</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>display-url-api<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.3</span>.<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>junit<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.28</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>plain-credentials<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.5</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>script-security<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.59</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>structs<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">1.19</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>token-macro<span style="color:#000;font-weight:bold">:</span><span style="color:#0000cf;font-weight:bold">2.8</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readinessProbe<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>failureThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">12</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>httpGet<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>path<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/login<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">8080</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>scheme<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>HTTP<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>initialDelaySeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">30</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>periodSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>successThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>timeoutSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">5</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>limits<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>1500m<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>3Gi<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Mi</code></pre></div>
<p>New format:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml">apiVersion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins.io/v1alpha2<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>kind<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Jenkins<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>metadata<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;cr_name<span style="color:#8f5902;font-style:italic">&gt;
</span><span style="color:#8f5902;font-style:italic"> namespace: &lt;namespace&gt;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"></span>spec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>basePlugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1.15</span>.<span style="color:#0000cf;font-weight:bold">7</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-job<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2.32&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-aggregator<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2.6&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>git<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3.10</span>.<span style="color:#0000cf;font-weight:bold">0</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>job-dsl<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.74&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configuration-as-code<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.19&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configuration-as-code-support<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.19&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes-credentials-provider<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0.12</span>.<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>containers<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins-master<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>image<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>jenkins/jenkins<span style="color:#000;font-weight:bold">:</span>lts<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>imagePullPolicy<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>Always<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>livenessProbe<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>failureThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">12</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>httpGet<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>path<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/login<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>http<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>scheme<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>HTTP<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>initialDelaySeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">30</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>periodSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>successThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>timeoutSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">5</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>readinessProbe<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>failureThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">3</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>httpGet<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>path<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>/login<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>port<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>http<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>scheme<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>HTTP<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>initialDelaySeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">30</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>periodSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">10</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>successThreshold<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>timeoutSeconds<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>resources<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>limits<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>1500m<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>3Gi<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>requests<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>cpu<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>memory<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>500Mi<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>plugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>simple-theme-plugin<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">0.5</span>.<span style="color:#0000cf;font-weight:bold">1</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>slack<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">2.24</span></code></pre></div>
<h2 id="update-crd-to-a-new-version">Update CRD to a new version</h2>
<p>A new version of the Custom Resource Definition for the operator needs to be applied:
-<a href="https://github.com/jenkinsci/kubernetes-operator/blob/master/deploy/crds/jenkins_v1alpha2_jenkins_crd.yaml" target="_blank">Jenkins CRD v1alpha2</a></p>
<p>To use the default CRD file:</p>
<pre><code>kubectl -n &lt;namespace&gt; apply -f https://github.com/jenkinsci/kubernetes-operator/blob/master/deploy/crds/jenkins_v1alpha2_jenkins_crd.yaml
</code></pre>
<h2 id="update-rbac-to-a-new-version">Update RBAC to a new version</h2>
<p>A new operator version requires updated RBAC permissions:</p>
<p>To use the default Role file:</p>
<pre><code>$ kubectl -n &lt;namespace&gt; apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/role.yaml
</code></pre>
<h2 id="deploy-new-operator-manifests">Deploy new operator manifests</h2>
<p>Replace your modified operator configuration file:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">$ kubectl -n &lt;namespace&gt; replace -f jenkins.yaml</code></pre></div>
<p>Update operator version in the deployment file to <code>image: virtuslab/jenkins-operator:v0.1.0</code> and scale up,
or use the default deployment manifest:</p>
<pre><code>$ kubectl -n &lt;namespace&gt; apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/operator.yaml
</code></pre>
<div class="text-muted mt-5 pt-3 border-top">Last modified August 5, 2019
</div>
</div>
</main>
</div>
</div>
<footer class="bg-dark py-5 row d-print-none">
<div class="container-fluid mx-sm-5">
<div class="row">
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
</div>
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
<small class="text-white">&copy; 2019 VirtusLab All Rights Reserved</small>
<p class="mt-2"><a href="/kubernetes-operator/about/">What&#39;s the Jenkins Operator?</a></p>
</div>
</div>
</div>
</footer>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="/kubernetes-operator/js/main.min.15ba3b50c3bd013e1b26793d1a59390ea2e0f21481eafe4022de05a44eba88fc.js" integrity="sha256-Fbo7UMO9AT4bJnk9Glk5DqLg8hSB6v5AIt4FpE66iPw="></script>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -206,59 +206,65 @@
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.1.1/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.1.1</a>
<a href="/kubernetes-operator/docs/getting-started/latest/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Latest (v0.2.x)</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-1-1">
<li class="collapse " id="kubernetes-operator-docs-getting-started-latest">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.1/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.1/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configuration" href="/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-customization" href="/kubernetes-operator/docs/getting-started/v0.1.1/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-customization" href="/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-aks" href="/kubernetes-operator/docs/getting-started/v0.1.1/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-aks" href="/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.1/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.1/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-custom-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.1/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-migration" href="/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.1/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-diagnostics" href="/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</li>
@ -277,59 +283,59 @@
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.2.0/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.2.0</a>
<a href="/kubernetes-operator/docs/getting-started/v0.1.x/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.1.x</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-2-0">
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-1-x">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.2.0/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-configuration" href="/kubernetes-operator/docs/getting-started/v0.2.0/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-customization" href="/kubernetes-operator/docs/getting-started/v0.2.0/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-customization" href="/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-aks" href="/kubernetes-operator/docs/getting-started/v0.2.0/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-aks" href="/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.2.0/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-migration" href="/kubernetes-operator/docs/getting-started/v0.2.0/migration/">Migration from v0.1.1</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.2.0/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-scheme" href="/kubernetes-operator/docs/getting-started/v0.2.0/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
@ -407,7 +413,32 @@
</div>
<main class="col-12 col-md-9 col-xl-10 pl-md-5" role="main">
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/docs/How%20it%20works/architecture-and-design.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=Architecture%20and%20design" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
<ol class="breadcrumb spb-1">

View File

@ -199,59 +199,65 @@
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.1.1/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.1.1</a>
<a href="/kubernetes-operator/docs/getting-started/latest/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Latest (v0.2.x)</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-1-1">
<li class="collapse " id="kubernetes-operator-docs-getting-started-latest">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.1/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.1/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configuration" href="/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-customization" href="/kubernetes-operator/docs/getting-started/v0.1.1/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-customization" href="/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-aks" href="/kubernetes-operator/docs/getting-started/v0.1.1/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-aks" href="/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.1/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.1/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-custom-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.1/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-migration" href="/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.1/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-diagnostics" href="/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</li>
@ -270,59 +276,59 @@
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.2.0/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.2.0</a>
<a href="/kubernetes-operator/docs/getting-started/v0.1.x/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.1.x</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-2-0">
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-1-x">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.2.0/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-configuration" href="/kubernetes-operator/docs/getting-started/v0.2.0/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-customization" href="/kubernetes-operator/docs/getting-started/v0.2.0/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-customization" href="/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-aks" href="/kubernetes-operator/docs/getting-started/v0.2.0/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-aks" href="/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.2.0/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-migration" href="/kubernetes-operator/docs/getting-started/v0.2.0/migration/">Migration from v0.1.1</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.2.0/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-scheme" href="/kubernetes-operator/docs/getting-started/v0.2.0/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
@ -400,7 +406,30 @@
</div>
<main class="col-12 col-md-9 col-xl-10 pl-md-5" role="main">
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/docs/How%20it%20works/_index.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=How%20it%20works" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
<ol class="breadcrumb spb-1">
@ -478,6 +507,8 @@

View File

@ -206,59 +206,65 @@
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.1.1/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.1.1</a>
<a href="/kubernetes-operator/docs/getting-started/latest/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Latest (v0.2.x)</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-1-1">
<li class="collapse " id="kubernetes-operator-docs-getting-started-latest">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.1/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.1/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configuration" href="/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-customization" href="/kubernetes-operator/docs/getting-started/v0.1.1/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-customization" href="/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-aks" href="/kubernetes-operator/docs/getting-started/v0.1.1/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-aks" href="/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.1/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.1/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-custom-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.1/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-migration" href="/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.1/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-diagnostics" href="/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</li>
@ -277,59 +283,59 @@
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.2.0/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.2.0</a>
<a href="/kubernetes-operator/docs/getting-started/v0.1.x/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.1.x</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-2-0">
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-1-x">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.2.0/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-configuration" href="/kubernetes-operator/docs/getting-started/v0.2.0/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-customization" href="/kubernetes-operator/docs/getting-started/v0.2.0/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-customization" href="/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-aks" href="/kubernetes-operator/docs/getting-started/v0.2.0/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-aks" href="/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.2.0/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-migration" href="/kubernetes-operator/docs/getting-started/v0.2.0/migration/">Migration from v0.1.1</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.2.0/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-scheme" href="/kubernetes-operator/docs/getting-started/v0.2.0/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
@ -407,7 +413,30 @@
</div>
<main class="col-12 col-md-9 col-xl-10 pl-md-5" role="main">
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/docs/How%20it%20works/jenkins-docker-images.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=Jenkins%20Docker%20Images" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
<ol class="breadcrumb spb-1">

View File

@ -196,59 +196,65 @@
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.1.1/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">v0.1.1</a>
<a href="/kubernetes-operator/docs/getting-started/latest/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">Latest (v0.2.x)</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started-v0-1-1">
<li class="collapse show" id="kubernetes-operator-docs-getting-started-latest">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.1/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.1/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configuration" href="/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-customization" href="/kubernetes-operator/docs/getting-started/v0.1.1/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-customization" href="/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-aks" href="/kubernetes-operator/docs/getting-started/v0.1.1/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-aks" href="/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.1/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.1/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-custom-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.1/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-migration" href="/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.1/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-diagnostics" href="/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</li>
@ -267,59 +273,59 @@
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.2.0/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">v0.2.0</a>
<a href="/kubernetes-operator/docs/getting-started/v0.1.x/" class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section">v0.1.x</a>
</li>
<ul>
<li class="collapse show" id="kubernetes-operator-docs-getting-started-v0-2-0">
<li class="collapse show" id="kubernetes-operator-docs-getting-started-v0-1-x">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.2.0/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-configuration" href="/kubernetes-operator/docs/getting-started/v0.2.0/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-customization" href="/kubernetes-operator/docs/getting-started/v0.2.0/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-customization" href="/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-aks" href="/kubernetes-operator/docs/getting-started/v0.2.0/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-aks" href="/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.2.0/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-migration" href="/kubernetes-operator/docs/getting-started/v0.2.0/migration/">Migration from v0.1.1</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.2.0/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-scheme" href="/kubernetes-operator/docs/getting-started/v0.2.0/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
@ -397,7 +403,30 @@
</div>
<main class="col-12 col-md-9 col-xl-10 pl-md-5" role="main">
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/docs/_index.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=Documentation" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
<ol class="breadcrumb spb-1">
@ -474,6 +503,8 @@
<div class="entry">
<h5>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/">Getting Started</a>

File diff suppressed because it is too large Load Diff

View File

@ -199,59 +199,65 @@
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.1.1/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.1.1</a>
<a href="/kubernetes-operator/docs/getting-started/latest/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Latest (v0.2.x)</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-1-1">
<li class="collapse " id="kubernetes-operator-docs-getting-started-latest">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.1/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.1/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configuration" href="/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-customization" href="/kubernetes-operator/docs/getting-started/v0.1.1/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-customization" href="/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-aks" href="/kubernetes-operator/docs/getting-started/v0.1.1/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-aks" href="/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.1/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.1/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-custom-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.1/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-migration" href="/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.1/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-diagnostics" href="/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</li>
@ -270,59 +276,59 @@
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.2.0/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.2.0</a>
<a href="/kubernetes-operator/docs/getting-started/v0.1.x/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.1.x</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-2-0">
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-1-x">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.2.0/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-configuration" href="/kubernetes-operator/docs/getting-started/v0.2.0/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-customization" href="/kubernetes-operator/docs/getting-started/v0.2.0/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-customization" href="/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-aks" href="/kubernetes-operator/docs/getting-started/v0.2.0/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-aks" href="/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.2.0/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-migration" href="/kubernetes-operator/docs/getting-started/v0.2.0/migration/">Migration from v0.1.1</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.2.0/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-scheme" href="/kubernetes-operator/docs/getting-started/v0.2.0/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
@ -400,7 +406,43 @@
</div>
<main class="col-12 col-md-9 col-xl-10 pl-md-5" role="main">
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/docs/Installation/_index.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=Installation" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
<nav id="TableOfContents">
<ul>
<li>
<ul>
<li><a href="#requirements">Requirements</a></li>
<li><a href="#configure-custom-resource-definition">Configure Custom Resource Definition</a></li>
<li><a href="#deploy-jenkins-operator">Deploy Jenkins Operator</a></li>
</ul></li>
</ul>
</nav>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
<ol class="breadcrumb spb-1">
@ -519,6 +561,8 @@

View File

@ -199,59 +199,65 @@
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.1.1/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.1.1</a>
<a href="/kubernetes-operator/docs/getting-started/latest/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">Latest (v0.2.x)</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-1-1">
<li class="collapse " id="kubernetes-operator-docs-getting-started-latest">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.1/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.1/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configuration" href="/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-customization" href="/kubernetes-operator/docs/getting-started/v0.1.1/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-customization" href="/kubernetes-operator/docs/getting-started/latest/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-aks" href="/kubernetes-operator/docs/getting-started/v0.1.1/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-aks" href="/kubernetes-operator/docs/getting-started/latest/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.1/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.1/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-custom-backup-and-restore" href="/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/">Custom Backup and Restore Providers</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.1/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-migration" href="/kubernetes-operator/docs/getting-started/latest/migration/">Migration from v0.1.x</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-1-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.1/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-diagnostics" href="/kubernetes-operator/docs/getting-started/latest/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
</li>
@ -270,59 +276,59 @@
<ul class="td-sidebar-nav__section pr-md-3">
<li class="td-sidebar-nav__section-title">
<a href="/kubernetes-operator/docs/getting-started/v0.2.0/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.2.0</a>
<a href="/kubernetes-operator/docs/getting-started/v0.1.x/" class="align-left pl-0 pr-2 collapsed td-sidebar-link td-sidebar-link__section">v0.1.x</a>
</li>
<ul>
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-2-0">
<li class="collapse " id="kubernetes-operator-docs-getting-started-v0-1-x">
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.2.0/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-deploy-jenkins" href="/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/">Deploy Jenkins</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-configuration" href="/kubernetes-operator/docs/getting-started/v0.2.0/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configuration" href="/kubernetes-operator/docs/getting-started/v0.1.x/configuration/">Configuration</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-customization" href="/kubernetes-operator/docs/getting-started/v0.2.0/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-customization" href="/kubernetes-operator/docs/getting-started/v0.1.x/customization/">Customization</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-aks" href="/kubernetes-operator/docs/getting-started/v0.2.0/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-aks" href="/kubernetes-operator/docs/getting-started/v0.1.x/aks/">AKS</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.2.0/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-configure-backup-and-restore" href="/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/">Configure backup and restore</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-migration" href="/kubernetes-operator/docs/getting-started/v0.2.0/migration/">Migration from v0.1.1</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-diagnostics" href="/kubernetes-operator/docs/getting-started/v0.2.0/diagnostics/">Diagnostics</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-scheme" href="/kubernetes-operator/docs/getting-started/v0.1.x/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-2-0-scheme" href="/kubernetes-operator/docs/getting-started/v0.2.0/scheme/">Scheme</a>
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-v0-1-x-migration-guide-v1alpha1-to-v1alpha2" href="/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/">Migration guide from v1alpha1 to v1alpha2</a>
</li>
@ -400,7 +406,46 @@
</div>
<main class="col-12 col-md-9 col-xl-10 pl-md-5" role="main">
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">
<div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/content/docs/Security/_index.md" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new?title=Security" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="https://github.com/jenkinsci/kubernetes-operator/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
</div>
<nav id="TableOfContents">
<ul>
<li>
<ul>
<li><a href="#jenkins-access-control">Jenkins Access Control</a></li>
<li><a href="#jenkins-hardening">Jenkins Hardening</a></li>
<li><a href="#jenkins-api">Jenkins API</a></li>
<li><a href="#kubernetes">Kubernetes</a></li>
<li><a href="#setup-jenkins-operator-and-jenkins-in-separated-namespaces">Setup Jenkins Operator and Jenkins in separated namespaces</a></li>
<li><a href="#report-a-security-vulnerability">Report a Security Vulnerability</a></li>
</ul></li>
</ul>
</nav>
</div>
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
<nav aria-label="breadcrumb" class="d-none d-md-block d-print-none">
<ol class="breadcrumb spb-1">
@ -564,6 +609,8 @@ $ kubectl -n jenkins apply -f role_binding_jenkins.yaml</code></pre></div>

View File

@ -144,7 +144,7 @@
<i class="fas fa-cogs"></i>
</div>
<h4 class="h3">Better configuration as code</h4>
<p class="mb-0"><p>Use groovy scripts or casc to configure your Jenkins instance</p>
<p class="mb-0"><p>Use groovy scripts or JCasC to configure your Jenkins instance</p>
</p>
</div>
@ -220,7 +220,7 @@
<h4 class="h3">Documentation</h4>
<p class="mb-0"><p>Learning the usage of Jenkins Operator will make your life easier. After that, you can easily contribute to the project.</p>
</p>
<p><a href="/docs/">Read more …</a></p>
<p><a href="/kubernetes-operator/docs">Read more …</a></p>
</div>
<div class="col-lg-4 mb-5 mb-lg-0 text-center ">

View File

@ -8,12 +8,12 @@
</url>
<url>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.1/deploy-jenkins/</loc>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/</loc>
<lastmod>2019-08-05T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.0/deploy-jenkins/</loc>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/deploy-jenkins/</loc>
<lastmod>2019-08-05T00:00:00+00:00</lastmod>
</url>
@ -23,22 +23,22 @@
</url>
<url>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.1/configuration/</loc>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration/</loc>
<lastmod>2019-08-05T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.0/configuration/</loc>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/configuration/</loc>
<lastmod>2019-08-05T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.1/customization/</loc>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/customization/</loc>
<lastmod>2019-08-05T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.0/customization/</loc>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/customization/</loc>
<lastmod>2019-08-05T00:00:00+00:00</lastmod>
</url>
@ -48,22 +48,27 @@
</url>
<url>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.1/aks/</loc>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/aks/</loc>
<lastmod>2019-08-05T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.0/aks/</loc>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/aks/</loc>
<lastmod>2019-08-05T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.1/configure-backup-and-restore/</loc>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configure-backup-and-restore/</loc>
<lastmod>2019-08-05T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.0/configure-backup-and-restore/</loc>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/configure-backup-and-restore/</loc>
<lastmod>2019-08-05T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/custom-backup-and-restore/</loc>
<lastmod>2019-08-05T00:00:00+00:00</lastmod>
</url>
@ -78,17 +83,17 @@
</url>
<url>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.0/migration/</loc>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/</loc>
<lastmod>2019-08-05T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.1/</loc>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/migration/</loc>
<lastmod>2019-08-05T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.0/</loc>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/</loc>
<lastmod>2019-08-05T00:00:00+00:00</lastmod>
</url>
@ -113,27 +118,27 @@
</url>
<url>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.1/diagnostics/</loc>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/diagnostics/</loc>
<lastmod>2019-08-05T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.0/diagnostics/</loc>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/diagnostics/</loc>
<lastmod>2019-08-05T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.1/scheme/</loc>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/scheme/</loc>
<lastmod>2019-08-05T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.2.0/scheme/</loc>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/scheme/</loc>
<lastmod>2019-08-05T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.1/migration-guide-v1alpha1-to-v1alpha2/</loc>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/migration-guide-v1alpha1-to-v1alpha2/</loc>
<lastmod>2019-08-05T00:00:00+00:00</lastmod>
</url>

View File

@ -1,142 +0,0 @@
# Developer guide
This document explains how to setup your development environment.
## Prerequisites
- [operator_sdk][operator_sdk] version v0.8.1
- [git][git_tool]
- [go][go_tool] version v1.12+
- [goimports, golint, checkmake and staticcheck][install_dev_tools]
- [minikube][minikube] version v1.1.0+ (preferred Hypervisor - [virtualbox][virtualbox])
- [docker][docker_tool] version 17.03+
## Clone repository and download dependencies
```bash
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 go-dependencies
```
## Build and run with a minikube
Build and run **Jenkins Operator** locally:
```bash
make build 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_v1alpha2_jenkins_cr.yaml
kubectl get jenkins -o yaml
kubectl get po
```
## Build and run with a remote Kubernetes cluster
You can also run the controller locally and make it listen to a remote Kubernetes server.
```bash
make run NAMESPACE=default KUBECTL_CONTEXT=remote-k8s EXTRA_ARGS='--kubeconfig ~/.kube/config'
```
Once minikube and **Jenkins Operator** are up and running, apply Jenkins custom resource:
```bash
kubectl --context remote-k8s --namespace default apply -f deploy/crds/jenkins_v1alpha2_jenkins_cr.yaml
kubectl --context remote-k8s --namespace default get jenkins -o yaml
kubectl --context remote-k8s --namespace default get po
```
## Testing
Run unit tests:
```bash
make test
```
### Running E2E tests on Linux
Run e2e tests with minikube:
```bash
make minikube-start
eval $(minikube docker-env)
make build e2e
```
Run the specific e2e test:
```bash
make build e2e E2E_TEST_SELECTOR='^TestConfiguration$'
```
### Running E2E tests on macOS
At first, you need to start minikube:
```bash
$ make minikube-start
$ eval $(minikube docker-env)
```
Build Docker image inside provided Linux container by:
```bash
$ make indocker
```
Build **Jenkins Operator** inside container using:
```bash
$ make build
```
Then exit the container and run:
```
make e2e
```
## Tips & Tricks
### Building docker image on minikube (for e2e tests)
To be able to work with the docker daemon on `minikube` machine run the following command before building an image:
```bash
eval $(minikube docker-env)
```
### When `pkg/apis/jenkinsio/*/jenkins_types.go` has changed
Run:
```bash
make deepcopy-gen
```
### Getting Jenkins URL and basic credentials
```bash
minikube service jenkins-operator-http-<cr_name> --url
kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.user}' | base64 -d
kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.password}' | base64 -d
```
[dep_tool]:https://golang.github.io/dep/docs/installation.html
[git_tool]:https://git-scm.com/downloads
[go_tool]:https://golang.org/dl/
[operator_sdk]:https://github.com/operator-framework/operator-sdk
[fork_guide]:https://help.github.com/articles/fork-a-repo/
[docker_tool]:https://docs.docker.com/install/
[kubectl_tool]:https://kubernetes.io/docs/tasks/tools/install-kubectl/
[minikube]:https://kubernetes.io/docs/tasks/tools/install-minikube/
[virtualbox]:https://www.virtualbox.org/wiki/Downloads
[jenkins-operator]:../README.md
[install_dev_tools]:install_dev_tools.md

View File

@ -1,52 +0,0 @@
# How it works
This document describes a high level overview how **Jenkins Operator** works.
1. [Architecture and design](#architecture-and-design)
2. [Operator State](#operator-state)
3. [System Jenkins Jobs](#system-jenkins-jobs)
3. [Jenkins Docker Images](#jenkins-docker-images)
## Architecture and design
The **Jenkins Operator** design incorporates the following concepts:
- watches any changes of manifests and maintain the desired state according to deployed custom resource manifest
- implements the main reconciliation loop which consists of two smaller reconciliation loops - base and user
![reconcile](../assets/reconcile.png)
**Base** reconciliation loop takes care of reconciling base Jenkins configuration, which consists of:
- Ensure Manifests - monitors any changes in manifests
- Ensure Jenkins Pod - creates and verifies status of Jenkins master Pod
- Ensure Jenkins Configuration - configures Jenkins instance including hardening, initial configuration for plugins, etc.
- Ensure Jenkins API token - generates Jenkins API token and initialized Jenkins client
**User** reconciliation loop takes care of reconciling user provided configuration, which consists of:
- Ensure Restore Job - creates Restore job and ensures that restore has been successfully performed
- Ensure Seed Jobs - creates Seed Jobs and ensures that all of them have been successfully executed
- Ensure User Configuration - executed user provided configuration, like groovy scripts, configuration as code or plugins
- Ensure Backup Job - creates Backup job and ensures that backup has been successfully performed
![reconcile](../assets/phases.png)
## Operator State
Operator state is kept in custom resource status section, which is used for storing any configuration events or job statuses managed by the operator.
It helps to maintain or recover desired state even after operator or Jenkins restarts.
## System Jenkins Jobs
The operator or Jenkins instance can be restarted at any time and any operation should not block the reconciliation loop.
Taking this into account we implemented custom jobs API for executing system jobs (seed jobs, groovy scripts, etc.) according to the operator lifecycle.
Main assumptions are:
- do not block reconciliation loop
- fire job, requeue reconciliation loop and verify job status next time
- handle retries if case of failure
- handle build expiration (deadline)
- keep state in the custom resource status section
## Jenkins Docker Images
**Jenkins Operator** is fully compatible with **jenkins:lts** docker image and does not introduce any hidden changes there.
If needed, the docker image can easily be changed in custom resource manifest as long as it supports standard Jenkins file system structure.

View File

@ -1,50 +0,0 @@
# Installation of the required development tools
This document explains how to install the Go tools used by the development process.
## Configure environment variables
```bash
export GOPATH=/home/go # example value
export GOROOT=/usr/lib/go-1.12 # example value
export PATH=$GOPATH/bin:$PATH
```
## goimports
```
go get golang.org/x/tools/cmd/goimports
cd $GOPATH/src/golang.org/x/tools/cmd/goimports
go build
go install
```
## golint
```
go get -u golang.org/x/lint/golint
cd $GOPATH/src/golang.org/x/lint/golint
go build
go install
```
## checkmake
```
go get github.com/mrtazz/checkmake
cd $GOPATH/src/github.com/mrtazz/checkmake
go build
go install
```
## staticcheck
```
mkdir -p $GOPATH/src/github.com/dominikh/
cd $GOPATH/src/github.com/dominikh/
git clone https://github.com/dominikh/go-tools.git
cd $GOPATH/src/github.com/dominikh/go-tools/staticcheck
go build
go install
```

View File

@ -1,37 +0,0 @@
# Installation
This document describes installation procedure for **Jenkins Operator**.
All container images can be found at [virtuslab/jenkins-operator](https://hub.docker.com/r/virtuslab/jenkins-operator)
## Requirements
To run **Jenkins Operator**, you will need:
- 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_v1alpha2_jenkins_crd.yaml
```
## Deploy Jenkins Operator
Apply Service Account and RBAC roles:
```bash
kubectl apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/all-in-one-v1alpha2.yaml
```
Watch **Jenkins Operator** instance being created:
```bash
kubectl get pods -w
```
Now **Jenkins Operator** should be up and running in `default` namespace.

View File

@ -1,36 +0,0 @@
# Migration guide from v0.1.1 to v0.2.0
### Added seed job agent
Now seed jobs are not built by master executors, but by dedicated agent deployed into Kubernetes. We disabled master executors for security reasons.
### Apply Jenkins configuration via Groovy scripts instead of Jenkins jobs
We have removed hardcoded configuration by Jenkins jobs.
In v0.1.1 jenkins-operator configuration was stored in `jenkins-operator-user-configuration-<cr_name>`
If you want to use v0.2.0 or newer you must simply write refer to old ConfigMap by modifying CR, for example:
```yaml
apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: example
spec:
configurationAsCode:
configurations:
- name: jenkins-operator-user-configuration-<cr_name>
secret:
name: jenkins-operator-user-configuration-<cr_name>
groovyScripts:
configurations:
- name: jenkins-operator-user-configuration-<cr_name>
secret:
name: jenkins-operator-user-configuration-<cr_name>
```
Jenkins configuration jobs (Configure Seed Jobs, jenkins-operator-base-configuration, jenkins-operator-user-configuration) have been removed from Jenkins.
In v0.1.1 you can see if configuration failed or successfully updated in Jenkins UI(job build logs).
Now, when Jenkins configuration jobs are removed, you must use this command to see if configuration was failed.
```bash
$ kubectl -n logs deployment/jenkins-operator
```

View File

@ -1,331 +0,0 @@
# Migration guide from v1alpha1 to v1alpha2
Please not that **CRD manifests are global**, not namespaced, so every jenkins operator running on the cluster
will be impacted by the new CRD manifest. Multiple operator instances with different versions *should* continue to work.
## Stop jenkins-operator pod
Run command:
```bash
$ kubectl -n <namespace> scale deployment.apps/jenkins-operator --replicas=0
deployment.apps/jenkins-operator scaled
```
Desired state:
```bash
$ kubectl -n <namespace> get po
No resources found.
```
## Stop Jenkins master pod
Run command:
```bash
$ kubectl -n <namespace> get po
NAME READY STATUS RESTARTS AGE
jenkins-operator-<cr_name> 2/2 Running 0 3m35s
$ kubectl -n <namespace> get delete po jenkins-operator-<cr_name>
pod "jenkins-operator-<cr_name>" deleted
```
Desired state:
```bash
$ kubectl -n <namespace> get po
No resources found.
```
## Save Jenkins CR to jenkins.yaml file
Run command:
```bash
$ kubectl -n <namespace> get jenkins <cr_name> -o yaml > jenkins.yaml
```
## Modify jenkins.yaml file
Change apiVersion to `apiVersion: jenkins.io/v1alpha2`
New plugin format without dependent plugins:
- `spec.master.basePlugins` example:
```
spec:
master:
basePlugins:
- name: a-plugin-name
version: "1.0.0"
...
```
- `spec.master.plugins` example:
```
spec:
master:
plugins:
- name: a-plugin-name
version: "1.0.0"
...
```
Move Jenkins `master` container properties to `spec.master.containers[jenkins-master]` (non exhaustive list):
- `spec.master.image` -> `spec.master.containers[jenkins-master].image`
- `spec.master.imagePullPolicy` -> `spec.master.containers[jenkins-master].imagePullPolicy`
- `spec.master.livenessProbe` -> `spec.master.containers[jenkins-master].livenessProbe`
- `spec.master.readinessProbe` -> `spec.master.containers[jenkins-master].readinessProbe`
- `spec.master.resources` -> `spec.master.containers[jenkins-master].resources`
- `spec.master.env` -> `spec.master.containers[jenkins-master].env`
```
spec:
master:
containers:
- name: jenkins-master
image: jenkins/jenkins:lts
...
```
See also the examples bellow for more details. For even more details please look at the source code.
Code that defines the data structures can be found [here](v0.1.1/jenkins-v1alpha2-scheme.md)
### Examples
Old format:
```yaml
apiVersion: jenkins.io/v1alpha1
kind: Jenkins
metadata:
name: <cr_name>
namespace: <namespace>
spec:
master:
basePlugins:
configuration-as-code:1.17:
- configuration-as-code-support:1.17
git:3.10.0:
- apache-httpcomponents-client-4-api:4.5.5-3.0
- credentials:2.1.19
- display-url-api:2.3.1
- git-client:2.7.7
- jsch:0.1.55
- junit:1.28
- mailer:1.23
- matrix-project:1.14
- scm-api:2.4.1
- script-security:1.59
- ssh-credentials:1.16
- structs:1.19
- workflow-api:2.34
- workflow-scm-step:2.7
- workflow-step-api:2.19
job-dsl:1.74:
- script-security:1.59
- structs:1.19
kubernetes-credentials-provider:0.12.1:
- credentials:2.1.19
- structs:1.19
- variant:1.2
kubernetes:1.15.5:
- apache-httpcomponents-client-4-api:4.5.5-3.0
- cloudbees-folder:6.8
- credentials:2.1.19
- durable-task:1.29
- jackson2-api:2.9.9
- kubernetes-credentials:0.4.0
- plain-credentials:1.5
- structs:1.19
- variant:1.2
- workflow-step-api:2.19
workflow-aggregator:2.6:
- ace-editor:1.1
- apache-httpcomponents-client-4-api:4.5.5-3.0
- authentication-tokens:1.3
- branch-api:2.5.2
- cloudbees-folder:6.8
- credentials-binding:1.18
- credentials:2.1.19
- display-url-api:2.3.1
- docker-commons:1.15
- docker-workflow:1.18
- durable-task:1.29
- git-client:2.7.7
- git-server:1.7
- handlebars:1.1.1
- jackson2-api:2.9.9
- jquery-detached:1.2.1
- jsch:0.1.55
- junit:1.28
- lockable-resources:2.5
- mailer:1.23
- matrix-project:1.14
- momentjs:1.1.1
- pipeline-build-step:2.9
- pipeline-graph-analysis:1.10
- pipeline-input-step:2.10
- pipeline-milestone-step:1.3.1
- pipeline-model-api:1.3.8
- pipeline-model-declarative-agent:1.1.1
- pipeline-model-definition:1.3.8
- pipeline-model-extensions:1.3.8
- pipeline-rest-api:2.11
- pipeline-stage-step:2.3
- pipeline-stage-tags-metadata:1.3.8
- pipeline-stage-view:2.11
- plain-credentials:1.5
- scm-api:2.4.1
- script-security:1.59
- ssh-credentials:1.16
- structs:1.19
- workflow-api:2.34
- workflow-basic-steps:2.16
- workflow-cps-global-lib:2.13
- workflow-cps:2.69
- workflow-durable-task-step:2.30
- workflow-job:2.32
- workflow-multibranch:2.21
- workflow-scm-step:2.7
- workflow-step-api:2.19
- workflow-support:3.3
workflow-job:2.32:
- scm-api:2.4.1
- script-security:1.59
- structs:1.19
- workflow-api:2.34
- workflow-step-api:2.19
- workflow-support:3.3
image: jenkins/jenkins:lts
imagePullPolicy: Always
livenessProbe:
failureThreshold: 12
httpGet:
path: /login
port: 8080
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
plugins:
simple-theme-plugin:0.5.1: []
slack:2.24:
- workflow-step-api:2.19
- credentials:2.1.19
- display-url-api:2.3.1
- junit:1.28
- plain-credentials:1.5
- script-security:1.59
- structs:1.19
- token-macro:2.8
readinessProbe:
failureThreshold: 12
httpGet:
path: /login
port: 8080
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
resources:
limits:
cpu: 1500m
memory: 3Gi
requests:
cpu: "1"
memory: 500Mi
```
New format:
```yaml
apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: <cr_name>
namespace: <namespace>
spec:
master:
basePlugins:
- name: kubernetes
version: 1.15.7
- name: workflow-job
version: "2.32"
- name: workflow-aggregator
version: "2.6"
- name: git
version: 3.10.0
- name: job-dsl
version: "1.74"
- name: configuration-as-code
version: "1.19"
- name: configuration-as-code-support
version: "1.19"
- name: kubernetes-credentials-provider
version: 0.12.1
containers:
- name: jenkins-master
image: jenkins/jenkins:lts
imagePullPolicy: Always
livenessProbe:
failureThreshold: 12
httpGet:
path: /login
port: http
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
readinessProbe:
failureThreshold: 3
httpGet:
path: /login
port: http
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources:
limits:
cpu: 1500m
memory: 3Gi
requests:
cpu: "1"
memory: 500Mi
plugins:
- name: simple-theme-plugin
version: 0.5.1
- name: slack
version: 2.24
```
## Update CRD to new version
New version of the Custom Resource definition for the operator needs to be applied:
-[Jenkins CRD v1alpha2](https://github.com/jenkinsci/kubernetes-operator/blob/master/deploy/crds/jenkins_v1alpha2_jenkins_crd.yaml)
To use default CRD file:
```
kubectl -n <namespace> apply -f https://github.com/jenkinsci/kubernetes-operator/blob/master/deploy/crds/jenkins_v1alpha2_jenkins_crd.yaml
```
## Update RBAC to new version
New operator version requires updated RBAC permissions:
To use default Role file:
```
$ kubectl -n <namespace> apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/role.yaml
```
## Deploy new operator manifests
Replace your modified operator configuration file:
```bash
$ kubectl -n <namespace> replace -f jenkins.yaml
```
Update operator version in the deployment file to `image: virtuslab/jenkins-operator:v0.1.0` and scale up,
or use the default deployment manifest:
```
$ kubectl -n <namespace> apply -f https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/operator.yaml
```

View File

@ -1,94 +0,0 @@
# Jenkins Security
By default **Jenkins Operator** performs an initial security hardening of Jenkins instance via groovy scripts to prevent any security gaps.
## Jenkins Access Control
Currently **Jenkins Operator** generates a username and random password and stores them in a Kubernetes Secret.
However any other authorization mechanisms are possible and can be done via groovy scripts or configuration as code plugin.
For more information take a look at [getting-started#jenkins-customization](v0.1.1/getting-started.md#jenkins-customisation).
Any change to Security Realm or Authorization requires that user called `jenkins-operator` must have admin rights
because **Jenkins Operator** calls Jenkins API.
## Jenkins Hardening
The list below describes all the default security setting configured by the **Jenkins Operator**:
- basic settings - use `Mode.EXCLUSIVE` - Jobs must specify that they want to run on master node
- enable CSRF - Cross Site Request Forgery Protection is enabled
- disable usage stats - Jenkins usage stats submitting is disabled
- enable master access control - Slave To Master Access Control is enabled
- disable old JNLP protocols - `JNLP3-connect`, `JNLP2-connect` and `JNLP-connect` are disabled
- disable CLI - CLI access of `/cli` URL is disabled
- configure kubernetes-plugin - secure configuration for Kubernetes plugin
If you would like to dig a little bit into the code, take a look [here](../pkg/controller/jenkins/configuration/base/resources/base_configuration_configmap.go).
## Jenkins API
The **Jenkins Operator** generates and configures Basic Authentication token for Jenkins go client and stores it in a Kubernetes Secret.
## Kubernetes
Kubernetes API permissions are limited by the following roles:
- [jenkins-operator role](../deploy/role.yaml)
- [Jenkins Master role](../pkg/controller/jenkins/configuration/base/resources/rbac.go)
Since **Jenkins Operator** must be able to grant permission for its' deployed Jenkins masters to spawn pods (the `Jenkins Master role` above),
the operator itself requires permission to create RBAC resources (the `jenkins-operator role` above).
Deployed this way, any subject which may create a Pod (including a Jenkins job) may
assume the `jenkins-operator` role by using its' ServiceAccount, create RBAC rules, and thus escape its granted permissions.
Any namespace to which the `jenkins-operator` is deployed must be considered to implicitly grant all
possible permissions to any subject which can create a Pod in that namespace.
To mitigate this issue **Jenkins Operator** should be deployed in one namespace and the Jenkins CR should be created in separate namespace.
To achieve it change watch namespace in https://github.com/jenkinsci/kubernetes-operator/blob/master/deploy/operator.yaml#L25
## Setup Jenkins Operator and Jenkins in separated namespaces
You need to create two namespaces, for example we'll call them **jenkins** for Jenkins and **Jenkins Operator** for Jenkins Operator.
```bash
$ kubectl create ns jenkins-operator
$ kubectl create ns jenkins
```
Next, apply the RBAC manifests for **Jenkins Operator** namespace
```bash
$ kubectl -n jenkins-operator apply -f deploy/service_account.yaml
$ kubectl -n jenkins-operator apply -f deploy/role_binding.yaml
```
Create file role_binding_jenkins.yaml in `deploy` folder:
```yaml
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: jenkins-operator
namespace: jenkins
subjects:
- kind: ServiceAccount
name: jenkins-operator
namespace: jenkins-operator
roleRef:
kind: Role
name: jenkins-operator
apiGroup: rbac.authorization.k8s.io
```
Then, apply RBAC rules for **jenkins** namespace
```bash
$ kubectl -n jenkins apply -f deploy/role.yaml
$ kubectl -n jenkins apply -f role_binding_jenkins.yaml
```
Finally, you must create operator pod by:
```bash
$ kubectl -n jenkins -n jenkins-operator apply -f deploy/operator.yaml
```
## Report a Security Vulnerability
If you find a vulnerability or any misconfiguration in Jenkins, please report it in the [issues](https://github.com/jenkinsci/kubernetes-operator/issues).

View File

@ -1,586 +0,0 @@
# Getting Started
This document describes a getting started guide for **Jenkins Operator** and an additional configuration.
1. [First Steps](#first-steps)
2. [Deploy Jenkins](#deploy-jenkins)
3. [Configure Seed Jobs and Pipelines](#configure-seed-jobs-and-pipelines)
4. [Install Plugins](#install-plugins)
5. [Configure Backup & Restore](#configure-backup-and-restore)
6. [AKS](#aks)
7. [Jenkins login credentials](#jenkins-login-credentials)
8. [Override default Jenkins container command](#override-default-Jenkins-container-command)
9. [Debugging](#debugging)
## First Steps
Prepare your Kubernetes cluster and set up access.
Once you have running Kubernetes cluster you can focus on installing **Jenkins Operator** according to the [Installation](../installation.md) guide.
## Deploy Jenkins
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/v1alpha2
kind: Jenkins
metadata:
name: example
spec:
master:
containers:
- name: jenkins-master
image: jenkins/jenkins:lts
imagePullPolicy: Always
livenessProbe:
failureThreshold: 12
httpGet:
path: /login
port: http
scheme: HTTP
initialDelaySeconds: 80
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
readinessProbe:
failureThreshold: 3
httpGet:
path: /login
port: http
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources:
limits:
cpu: 1500m
memory: 3Gi
requests:
cpu: "1"
memory: 500Mi
seedJobs:
- id: jenkins-operator
targets: "cicd/jobs/*.jenkins"
description: "Jenkins Operator repository"
repositoryBranch: master
repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
```
Deploy Jenkins to K8s:
```bash
kubectl create -f jenkins_instance.yaml
```
Watch Jenkins instance being created:
```bash
kubectl get pods -w
```
Get Jenkins credentials:
```bash
kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.user}' | base64 -d
kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.password}' | base64 -d
```
Connect to Jenkins (minikube):
```bash
minikube service jenkins-operator-http-<cr_name> --url
```
Connect to Jenkins (actual Kubernetes cluster):
```bash
kubectl port-forward jenkins-<cr_name> 8080:8080
```
Then open browser with address `http://localhost:8080`.
![jenkins](../../assets/jenkins.png)
## Configure Seed Jobs and Pipelines
Jenkins operator uses [job-dsl][job-dsl] and [kubernetes-credentials-provider][kubernetes-credentials-provider] plugins for configuring jobs
and deploy keys.
## Prepare job definitions and pipelines
First you have to prepare pipelines and job definition in your GitHub repository using the following structure:
```
cicd/
├── jobs
│   └── build.jenkins
└── pipelines
└── build.jenkins
```
**cicd/jobs/build.jenkins** it's a job definition:
```
#!/usr/bin/env groovy
pipelineJob('build-jenkins-operator') {
displayName('Build jenkins-operator')
definition {
cpsScm {
scm {
git {
remote {
url('https://github.com/jenkinsci/kubernetes-operator.git')
credentials('jenkins-operator')
}
branches('*/master')
}
}
scriptPath('cicd/pipelines/build.jenkins')
}
}
}
```
**cicd/pipelines/build.jenkins** it's an actual Jenkins pipeline:
```
#!/usr/bin/env groovy
def label = "build-jenkins-operator-${UUID.randomUUID().toString()}"
def home = "/home/jenkins"
def workspace = "${home}/workspace/build-jenkins-operator"
def workdir = "${workspace}/src/github.com/jenkinsci/kubernetes-operator/"
podTemplate(label: label,
containers: [
containerTemplate(name: 'jnlp', image: 'jenkins/jnlp-slave:alpine'),
containerTemplate(name: 'go', image: 'golang:1-alpine', command: 'cat', ttyEnabled: true),
],
envVars: [
envVar(key: 'GOPATH', value: workspace),
],
) {
node(label) {
dir(workdir) {
stage('Init') {
timeout(time: 3, unit: 'MINUTES') {
checkout scm
}
container('go') {
sh 'apk --no-cache --update add make git gcc libc-dev'
}
}
stage('Dep') {
container('go') {
sh 'make dep'
}
}
stage('Test') {
container('go') {
sh 'make test'
}
}
stage('Build') {
container('go') {
sh 'make build'
}
}
}
}
}
```
## Configure Seed Jobs
Jenkins Seed Jobs are configured using `Jenkins.spec.seedJobs` section from your custom resource manifest:
```
apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: example
spec:
seedJobs:
- id: jenkins-operator
targets: "cicd/jobs/*.jenkins"
description: "Jenkins Operator repository"
repositoryBranch: master
repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
```
**Jenkins Operator** will automatically discover and configure all seed jobs.
You can verify if deploy keys were successfully configured in Jenkins **Credentials** tab.
![jenkins](../../assets/jenkins-credentials.png)
You can verify if your pipelines were successfully configured in Jenkins Seed Job console output.
![jenkins](../../assets/jenkins-seed.png)
If your GitHub repository is **private** you have to configure SSH or username/password authentication.
### SSH authentication
#### Generate SSH Keys
There are two methods of SSH private key generation:
```bash
$ openssl genrsa -out <filename> 2048
```
or
```bash
$ ssh-keygen -t rsa -b 2048
$ ssh-keygen -p -f <filename> -m pem
```
Then copy content from generated file.
#### Public key
If you want to upload your public key to your Git server you need to extract it.
If key was generated by `openssl` then you need to type this to extract public key:
```bash
$ openssl rsa -in <filename> -pubout > <filename>.pub
```
If key was generated by `ssh-keygen` the public key content is located in <filename>.pub and there is no need to extract public key
#### Configure SSH authentication
Configure seed job like:
```
apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: example
spec:
seedJobs:
- id: jenkins-operator-ssh
credentialType: basicSSHUserPrivateKey
credentialID: k8s-ssh
targets: "cicd/jobs/*.jenkins"
description: "Jenkins Operator repository"
repositoryBranch: master
repositoryUrl: git@github.com:jenkinsci/kubernetes-operator.git
```
and create Kubernetes Secret(name of secret should be the same from `credentialID` field):
```
apiVersion: v1
kind: Secret
metadata:
name: k8s-ssh
stringData:
privateKey: |
-----BEGIN RSA PRIVATE KEY-----
MIIJKAIBAAKCAgEAxxDpleJjMCN5nusfW/AtBAZhx8UVVlhhhIKXvQ+dFODQIdzO
oDXybs1zVHWOj31zqbbJnsfsVZ9Uf3p9k6xpJ3WFY9b85WasqTDN1xmSd6swD4N8
...
username: github_user_name
```
### Username & password authentication
Configure seed job like:
```
apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: example
spec:
seedJobs:
- id: jenkins-operator-user-pass
credentialType: usernamePassword
credentialID: k8s-user-pass
targets: "cicd/jobs/*.jenkins"
description: "Jenkins Operator repository"
repositoryBranch: master
repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
```
and create Kubernetes Secret(name of secret should be the same from `credentialID` field):
```
apiVersion: v1
kind: Secret
metadata:
name: k8s-user-pass
stringData:
username: github_user_name
password: password_or_token
```
## Jenkins Customisation
Jenkins can be customized using groovy scripts or configuration as code plugin. All custom configuration is stored in
the **jenkins-operator-user-configuration-<cr_name>** ConfigMap which is automatically created by **Jenkins Operator**.
**Jenkins Operator** creates **jenkins-operator-user-configuration-<cr_name>** secret where user can store sensitive
information used for custom configuration. If you have entry in secret named `PASSWORD` then you can use it in
Configuration as Plugin as `adminAddress: "${PASSWORD}"`.
```
kubectl get secret jenkins-operator-user-configuration-<cr_name> -o yaml
kind: Secret
apiVersion: v1
type: Opaque
metadata:
name: jenkins-operator-user-configuration-<cr_name>
namespace: default
data:
SECRET_JENKINS_ADMIN_ADDRESS: YXNkZgo=
```
```
kubectl get configmap jenkins-operator-user-configuration-<cr_name> -o yaml
apiVersion: v1
data:
1-configure-theme.groovy: |2
import jenkins.*
import jenkins.model.*
import hudson.*
import hudson.model.*
import org.jenkinsci.plugins.simpletheme.ThemeElement
import org.jenkinsci.plugins.simpletheme.CssTextThemeElement
import org.jenkinsci.plugins.simpletheme.CssUrlThemeElement
Jenkins jenkins = Jenkins.getInstance()
def decorator = Jenkins.instance.getDescriptorByType(org.codefirst.SimpleThemeDecorator.class)
List<ThemeElement> configElements = new ArrayList<>();
configElements.add(new CssTextThemeElement("DEFAULT"));
configElements.add(new CssUrlThemeElement("https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-light-green.css"));
decorator.setElements(configElements);
decorator.save();
jenkins.save()
1-system-message.yaml: |2
jenkins:
systemMessage: "Configuration as Code integration works!!!"
adminAddress: "${SECRET_JENKINS_ADMIN_ADDRESS}"
kind: ConfigMap
metadata:
name: jenkins-operator-user-configuration-<cr_name>
namespace: default
```
When **jenkins-operator-user-configuration-<cr_name>** ConfigMap is updated Jenkins automatically
runs the **jenkins-operator-user-configuration** Jenkins Job which executes all scripts then
runs the **jenkins-operator-user-configuration-casc** Jenkins Job which applies Configuration as Code configuration.
## Install Plugins
Edit CR under `spec.master.plugins`:
```
apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: example
spec:
master:
plugins:
- name: simple-theme-plugin
version: 0.5.1
```
Then **Jenkins Operator** will automatically install plugins after Jenkins master pod restart.
## Configure backup and restore
Backup and restore is done by container sidecar.
### PVC
#### Create PVC
Save to file pvc.yaml:
```yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: <pvc_name>
namespace: <namespace>
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 500Gi
```
Run command:
```bash
$ kubectl -n <namespace> create -f pvc.yaml
```
#### Configure Jenkins CR
```yaml
apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: <cr_name>
namespace: <namespace>
spec:
master:
securityContext:
runAsUser: 1000
fsGroup: 1000
containers:
- name: jenkins-master
image: jenkins/jenkins:lts
- name: backup # container responsible for backup and restore
env:
- name: BACKUP_DIR
value: /backup
- name: JENKINS_HOME
value: /jenkins-home
- name: BACKUP_COUNT
value: "3" # keep only the 2 most recent backups
image: virtuslab/jenkins-operator-backup-pvc:v0.0.7 # look at backup/pvc directory
imagePullPolicy: IfNotPresent
volumeMounts:
- mountPath: /jenkins-home # Jenkins home volume
name: jenkins-home
- mountPath: /backup # backup volume
name: backup
volumes:
- name: backup # PVC volume where backups will be stored
persistentVolumeClaim:
claimName: <pvc_name>
backup:
containerName: backup # container name is responsible for backup
action:
exec:
command:
- /home/user/bin/backup.sh # this command is invoked on "backup" container to make backup, for example /home/user/bin/backup.sh <backup_number>, <backup_number> is passed by operator
interval: 30 # how often make backup in seconds
makeBackupBeforePodDeletion: true # make backup before pod deletion
restore:
containerName: backup # container name is responsible for restore backup
action:
exec:
command:
- /home/user/bin/restore.sh # this command is invoked on "backup" container to make restore backup, for example /home/user/bin/restore.sh <backup_number>, <backup_number> is passed by operator
#recoveryOnce: <backup_number> # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored
```
## AKS
Azure AKS managed Kubernetes service adds to every pod the following envs:
```yaml
- name: KUBERNETES_PORT_443_TCP_ADDR
value:
- name: KUBERNETES_PORT
value: tcp://
- name: KUBERNETES_PORT_443_TCP
value: tcp://
- name: KUBERNETES_SERVICE_HOST
value:
```
The operator is aware of it and omits these envs when checking if Jenkins pod envs have been changed. It prevents
restart Jenkins pod over and over again.
## Jenkins login credentials
The operator automatically generate Jenkins user name and password and stores it in Kubernetes secret named
`jenkins-operator-credentials-<cr_name>` in namespace where Jenkins CR has been deployed.
If you want change it you can override the secret:
```yaml
apiVersion: v1
kind: Secret
metadata:
name: jenkins-operator-credentials-<cr-name>
namespace: <namespace>
data:
user: <base64-encoded-new-username>
password: <base64-encoded-new-password>
```
If needed **Jenkins Operator** will restart Jenkins master pod and then you can login with the new user and password
credentials.
## Override default Jenkins container command
The default command for the Jenkins master container `jenkins/jenkins:lts` looks like:
```yaml
command:
- bash
- -c
- /var/jenkins/scripts/init.sh && /sbin/tini -s -- /usr/local/bin/jenkins.sh
```
The script`/var/jenkins/scripts/init.sh` is provided be the operator and configures init.groovy.d(creates Jenkins user)
and installs plugins.
The `/sbin/tini -s -- /usr/local/bin/jenkins.sh` command runs the Jenkins master main process.
You can overwrite it in the following pattern:
```yaml
command:
- bash
- -c
- /var/jenkins/scripts/init.sh && <custom-code-here> && /sbin/tini -s -- /usr/local/bin/jenkins.sh
```
## Debugging
Turn on debug in **Jenkins Operator** deployment:
```bash
sed -i 's|\(args:\).*|\1\ ["--debug"\]|' deploy/operator.yaml
kubectl apply -f deploy/operator.yaml
```
Watch Kubernetes events:
```bash
kubectl get events --sort-by='{.lastTimestamp}'
```
Verify Jenkins master logs:
```bash
kubectl logs -f jenkins-<cr_name>
```
Verify jenkins-operator logs:
```bash
kubectl logs deployment/jenkins-operator
```
## Troubleshooting
Delete Jenkins master pod and wait for the new one to come up:
```bash
kubectl delete pod jenkins-<cr_name>
```
[job-dsl]:https://github.com/jenkinsci/job-dsl-plugin
[kubernetes-credentials-provider]:https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/

View File

@ -1,731 +0,0 @@
# Getting Started
This document describes a getting started guide for **Jenkins Operator** and an additional configuration.
1. [First Steps](#first-steps)
2. [Deploy Jenkins](#deploy-jenkins)
3. [Configure Seed Jobs and Pipelines](#configure-seed-jobs-and-pipelines)
4. [Pulling Docker images from private repositories](#pulling-docker-images-from-private-repositories)
5. [Jenkins Customisation](#jenkins-customisation)
6. [Install Plugins](#install-plugins)
7. [Configure Backup & Restore](#configure-backup-and-restore)
8. [AKS](#aks)
9. [Jenkins login credentials](#jenkins-login-credentials)
10. [Override default Jenkins container command](#override-default-Jenkins-container-command)
11. [Debugging](#debugging)
## First Steps
Prepare your Kubernetes cluster and set up access.
Once you have running Kubernetes cluster you can focus on installing **Jenkins Operator** according to the [Installation](../installation.md) guide.
## Deploy Jenkins
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/v1alpha2
kind: Jenkins
metadata:
name: example
spec:
master:
containers:
- name: jenkins-master
image: jenkins/jenkins:lts
imagePullPolicy: Always
livenessProbe:
failureThreshold: 12
httpGet:
path: /login
port: http
scheme: HTTP
initialDelaySeconds: 80
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
readinessProbe:
failureThreshold: 3
httpGet:
path: /login
port: http
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources:
limits:
cpu: 1500m
memory: 3Gi
requests:
cpu: "1"
memory: 500Mi
seedJobs:
- id: jenkins-operator
targets: "cicd/jobs/*.jenkins"
description: "Jenkins Operator repository"
repositoryBranch: master
repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
```
Deploy Jenkins to K8s:
```bash
kubectl create -f jenkins_instance.yaml
```
Watch Jenkins instance being created:
```bash
kubectl get pods -w
```
Get Jenkins credentials:
```bash
kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.user}' | base64 -d
kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.password}' | base64 -d
```
Connect to Jenkins (minikube):
```bash
minikube service jenkins-operator-http-<cr_name> --url
```
Connect to Jenkins (actual Kubernetes cluster):
```bash
kubectl port-forward jenkins-<cr_name> 8080:8080
```
Then open browser with address `http://localhost:8080`.
![jenkins](../../assets/jenkins.png)
## Configure Seed Jobs and Pipelines
Jenkins operator uses [job-dsl][job-dsl] and [kubernetes-credentials-provider][kubernetes-credentials-provider] plugins for configuring jobs
and deploy keys.
## Prepare job definitions and pipelines
First you have to prepare pipelines and job definition in your GitHub repository using the following structure:
```
cicd/
├── jobs
│   └── build.jenkins
└── pipelines
└── build.jenkins
```
**cicd/jobs/build.jenkins** it's a job definition:
```
#!/usr/bin/env groovy
pipelineJob('build-jenkins-operator') {
displayName('Build jenkins-operator')
definition {
cpsScm {
scm {
git {
remote {
url('https://github.com/jenkinsci/kubernetes-operator.git')
credentials('jenkins-operator')
}
branches('*/master')
}
}
scriptPath('cicd/pipelines/build.jenkins')
}
}
}
```
**cicd/pipelines/build.jenkins** it's an actual Jenkins pipeline:
```
#!/usr/bin/env groovy
def label = "build-jenkins-operator-${UUID.randomUUID().toString()}"
def home = "/home/jenkins"
def workspace = "${home}/workspace/build-jenkins-operator"
def workdir = "${workspace}/src/github.com/jenkinsci/kubernetes-operator/"
podTemplate(label: label,
containers: [
containerTemplate(name: 'jnlp', image: 'jenkins/jnlp-slave:alpine'),
containerTemplate(name: 'go', image: 'golang:1-alpine', command: 'cat', ttyEnabled: true),
],
envVars: [
envVar(key: 'GOPATH', value: workspace),
],
) {
node(label) {
dir(workdir) {
stage('Init') {
timeout(time: 3, unit: 'MINUTES') {
checkout scm
}
container('go') {
sh 'apk --no-cache --update add make git gcc libc-dev'
}
}
stage('Dep') {
container('go') {
sh 'make dep'
}
}
stage('Test') {
container('go') {
sh 'make test'
}
}
stage('Build') {
container('go') {
sh 'make build'
}
}
}
}
}
```
## Configure Seed Jobs
Jenkins Seed Jobs are configured using `Jenkins.spec.seedJobs` section from your custom resource manifest:
```
apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: example
spec:
seedJobs:
- id: jenkins-operator
targets: "cicd/jobs/*.jenkins"
description: "Jenkins Operator repository"
repositoryBranch: master
repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
```
**Jenkins Operator** will automatically discover and configure all seed jobs.
You can verify if deploy keys were successfully configured in Jenkins **Credentials** tab.
![jenkins](../../assets/jenkins-credentials.png)
You can verify if your pipelines were successfully configured in Jenkins Seed Job console output.
![jenkins](../../assets/jenkins-seed.png)
If your GitHub repository is **private** you have to configure SSH or username/password authentication.
### SSH authentication
#### Generate SSH Keys
There are two methods of SSH private key generation:
```bash
$ openssl genrsa -out <filename> 2048
```
or
```bash
$ ssh-keygen -t rsa -b 2048
$ ssh-keygen -p -f <filename> -m pem
```
Then copy content from generated file.
#### Public key
If you want to upload your public key to your Git server you need to extract it.
If key was generated by `openssl` then you need to type this to extract public key:
```bash
$ openssl rsa -in <filename> -pubout > <filename>.pub
```
If key was generated by `ssh-keygen` the public key content is located in <filename>.pub and there is no need to extract public key
#### Configure SSH authentication
Configure seed job like:
```
apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: example
spec:
seedJobs:
- id: jenkins-operator-ssh
credentialType: basicSSHUserPrivateKey
credentialID: k8s-ssh
targets: "cicd/jobs/*.jenkins"
description: "Jenkins Operator repository"
repositoryBranch: master
repositoryUrl: git@github.com:jenkinsci/kubernetes-operator.git
```
and create Kubernetes Secret(name of secret should be the same from `credentialID` field):
```
apiVersion: v1
kind: Secret
metadata:
name: k8s-ssh
stringData:
privateKey: |
-----BEGIN RSA PRIVATE KEY-----
MIIJKAIBAAKCAgEAxxDpleJjMCN5nusfW/AtBAZhx8UVVlhhhIKXvQ+dFODQIdzO
oDXybs1zVHWOj31zqbbJnsfsVZ9Uf3p9k6xpJ3WFY9b85WasqTDN1xmSd6swD4N8
...
username: github_user_name
```
### Username & password authentication
Configure seed job like:
```
apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: example
spec:
seedJobs:
- id: jenkins-operator-user-pass
credentialType: usernamePassword
credentialID: k8s-user-pass
targets: "cicd/jobs/*.jenkins"
description: "Jenkins Operator repository"
repositoryBranch: master
repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git
```
and create Kubernetes Secret(name of secret should be the same from `credentialID` field):
```
apiVersion: v1
kind: Secret
metadata:
name: k8s-user-pass
stringData:
username: github_user_name
password: password_or_token
```
## Pulling Docker images from private repositories
To pull Docker Image from private repository you can use `imagePullSecrets`.
Please follow the instructions on [creating a secret with a docker config](https://kubernetes.io/docs/concepts/containers/images/?origin_team=T42NTAGHM#creating-a-secret-with-a-docker-config).
### Docker Hub Configuration
To use Docker Hub additional steps are required.
Edit the previously created secret:
```bash
kubectl -n <namespace> edit secret <name>
```
The `.dockerconfigjson` key's value needs to be replaced with a modified version.
After modifications it needs to be encoded as Base64 value before setting the `.dockerconfigjson` key:q.
Example config file to modify and use:
```
{
"auths":{
"https://index.docker.io/v1/":{
"username":"user",
"password":"password",
"email":"yourdockeremail@gmail.com",
"auth":"base64 of string user:password"
},
"auth.docker.io":{
"username":"user",
"password":"password",
"email":"yourdockeremail@gmail.com",
"auth":"base64 of string user:password"
},
"registry.docker.io":{
"username":"user",
"password":"password",
"email":"yourdockeremail@gmail.com",
"auth":"base64 of string user:password"
},
"docker.io":{
"username":"user",
"password":"password",
"email":"yourdockeremail@gmail.com",
"auth":"base64 of string user:password"
},
"https://registry-1.docker.io/v2/": {
"username":"user",
"password":"password",
"email":"yourdockeremail@gmail.com",
"auth":"base64 of string user:password"
},
"registry-1.docker.io/v2/": {
"username":"user",
"password":"password",
"email":"yourdockeremail@gmail.com",
"auth":"base64 of string user:password"
},
"registry-1.docker.io": {
"username":"user",
"password":"password",
"email":"yourdockeremail@gmail.com",
"auth":"base64 of string user:password"
},
"https://registry-1.docker.io": {
"username":"user",
"password":"password",
"email":"yourdockeremail@gmail.com",
"auth":"base64 of string user:password"
}
}
}
```
## Jenkins Customisation
Jenkins can be customized using groovy scripts or [configuration as code plugin](https://github.com/jenkinsci/configuration-as-code-plugin).
By using [ConfigMap](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/) you can create own **Jenkins** customized configuration.
Then you must reference the *ConfigMap* in **Jenkins** pod customization file in `spec.groovyScripts` or `spec.configurationAsCode`
For example create *ConfigMap* with name `jenkins-operator-user-configuration`. Then, modify the **Jenkins** manifest to look like this:
```yaml
apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: example
spec:
configurationAsCode:
configurations:
- name: jenkins-operator-user-configuration
groovyScripts:
configurations:
- name: jenkins-operator-user-configuration
```
Here is example of `jenkins-operator-user-configuration`:
```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: jenkins-operator-user-configuration
data:
1-configure-theme.groovy: |
import jenkins.*
import jenkins.model.*
import hudson.*
import hudson.model.*
import org.jenkinsci.plugins.simpletheme.ThemeElement
import org.jenkinsci.plugins.simpletheme.CssTextThemeElement
import org.jenkinsci.plugins.simpletheme.CssUrlThemeElement
Jenkins jenkins = Jenkins.getInstance()
def decorator = Jenkins.instance.getDescriptorByType(org.codefirst.SimpleThemeDecorator.class)
List<ThemeElement> configElements = new ArrayList<>();
configElements.add(new CssTextThemeElement("DEFAULT"));
configElements.add(new CssUrlThemeElement("https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-light-green.css"));
decorator.setElements(configElements);
decorator.save();
jenkins.save()
1-system-message.yaml: |
jenkins:
systemMessage: "Configuration as Code integration works!!!"
```
* *.groovy is Groovy script configuration
* *.yaml is configuration as code
If you want to correct your configuration you can edit it while **Jenkins Operator** is running.
Jenkins will reconcile and apply new configuration.
### Using secrets inside Groovy script
If you configured `spec.groovyScripts.secret.name`, then this secret is available to use inside map Groovy scripts.
The secrets are loaded to `secrets` map.
Create a [secret](https://kubernetes.io/docs/concepts/configuration/secret/) with for eg. `jenkins-conf-secrets` name.
```yaml
kind: Secret
apiVersion: v1
type: Opaque
metadata:
name: jenkins-conf-secrets
namespace: default
data:
SYSTEM_MESSAGE: SGVsbG8gd29ybGQ=
```
Then modify the **Jenkins** pod manifest by changing `spec.groovyScripts.secret.name` to `jenkins-conf-secrets`.
```yaml
apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: example
spec:
configurationAsCode:
configurations:
- name: jenkins-operator-user-configuration
secret:
name: jenkins-conf-secrets
groovyScripts:
configurations:
- name: jenkins-operator-user-configuration
secret:
name: jenkins-conf-secrets
```
Now you can test that the secret is mounted by applying this ConfigMap for Groovy script:
```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: jenkins-operator-user-configuration
data:
1-system-message.groovy: |
import jenkins.*
import jenkins.model.*
import hudson.*
import hudson.model.*
Jenkins jenkins = Jenkins.getInstance()
jenkins.setSystemMessage(secrets["SYSTEM_MESSAGE"])
jenkins.save()
```
Or by applying configuration as code:
```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: jenkins-operator-user-configuration
data:
1-system-message.yaml: |
jenkins:
systemMessage: ${SYSTEM_MESSAGE}
```
After this, you should see the `Hello world` system message at **Jenkins** homepage.
## Install Plugins
Edit CR under `spec.master.plugins`:
```
apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: example
spec:
master:
plugins:
- name: simple-theme-plugin
version: 0.5.1
```
Then **Jenkins Operator** will automatically install plugins after Jenkins master pod restart.
## Configure backup and restore
Backup and restore is done by container sidecar.
### PVC
#### Create PVC
Save to file pvc.yaml:
```yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: <pvc_name>
namespace: <namespace>
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 500Gi
```
Run command:
```bash
$ kubectl -n <namespace> create -f pvc.yaml
```
#### Configure Jenkins CR
```yaml
apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
name: <cr_name>
namespace: <namespace>
spec:
master:
securityContext:
runAsUser: 1000
fsGroup: 1000
containers:
- name: jenkins-master
image: jenkins/jenkins:lts
- name: backup # container responsible for backup and restore
env:
- name: BACKUP_DIR
value: /backup
- name: JENKINS_HOME
value: /jenkins-home
- name: BACKUP_COUNT
value: "3" # keep only the 2 most recent backups
image: virtuslab/jenkins-operator-backup-pvc:v0.0.7 # look at backup/pvc directory
imagePullPolicy: IfNotPresent
volumeMounts:
- mountPath: /jenkins-home # Jenkins home volume
name: jenkins-home
- mountPath: /backup # backup volume
name: backup
volumes:
- name: backup # PVC volume where backups will be stored
persistentVolumeClaim:
claimName: <pvc_name>
backup:
containerName: backup # container name is responsible for backup
action:
exec:
command:
- /home/user/bin/backup.sh # this command is invoked on "backup" container to make backup, for example /home/user/bin/backup.sh <backup_number>, <backup_number> is passed by operator
interval: 30 # how often make backup in seconds
makeBackupBeforePodDeletion: true # make backup before pod deletion
restore:
containerName: backup # container name is responsible for restore backup
action:
exec:
command:
- /home/user/bin/restore.sh # this command is invoked on "backup" container to make restore backup, for example /home/user/bin/restore.sh <backup_number>, <backup_number> is passed by operator
#recoveryOnce: <backup_number> # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored
```
## AKS
Azure AKS managed Kubernetes service adds to every pod the following envs:
```yaml
- name: KUBERNETES_PORT_443_TCP_ADDR
value:
- name: KUBERNETES_PORT
value: tcp://
- name: KUBERNETES_PORT_443_TCP
value: tcp://
- name: KUBERNETES_SERVICE_HOST
value:
```
The operator is aware of it and omits these envs when checking if Jenkins pod envs have been changed. It prevents
restart Jenkins pod over and over again.
## Jenkins login credentials
The operator automatically generate Jenkins user name and password and stores it in Kubernetes secret named
`jenkins-operator-credentials-<cr_name>` in namespace where Jenkins CR has been deployed.
If you want change it you can override the secret:
```yaml
apiVersion: v1
kind: Secret
metadata:
name: jenkins-operator-credentials-<cr-name>
namespace: <namespace>
data:
user: <base64-encoded-new-username>
password: <base64-encoded-new-password>
```
If needed **Jenkins Operator** will restart Jenkins master pod and then you can login with the new user and password
credentials.
## Override default Jenkins container command
The default command for the Jenkins master container `jenkins/jenkins:lts` looks like:
```yaml
command:
- bash
- -c
- /var/jenkins/scripts/init.sh && /sbin/tini -s -- /usr/local/bin/jenkins.sh
```
The script`/var/jenkins/scripts/init.sh` is provided be the operator and configures init.groovy.d(creates Jenkins user)
and installs plugins.
The `/sbin/tini -s -- /usr/local/bin/jenkins.sh` command runs the Jenkins master main process.
You can overwrite it in the following pattern:
```yaml
command:
- bash
- -c
- /var/jenkins/scripts/init.sh && <custom-code-here> && /sbin/tini -s -- /usr/local/bin/jenkins.sh
```
## Debugging
Turn on debug in **Jenkins Operator** deployment:
```bash
sed -i 's|\(args:\).*|\1\ ["--debug"\]|' deploy/operator.yaml
kubectl apply -f deploy/operator.yaml
```
Watch Kubernetes events:
```bash
kubectl get events --sort-by='{.lastTimestamp}'
```
Verify Jenkins master logs:
```bash
kubectl logs -f jenkins-<cr_name>
```
Verify jenkins-operator logs:
```bash
kubectl logs deployment/jenkins-operator
```
## Troubleshooting
Delete Jenkins master pod and wait for the new one to come up:
```bash
kubectl delete pod jenkins-<cr_name>
```
[job-dsl]:https://github.com/jenkinsci/job-dsl-plugin
[kubernetes-credentials-provider]:https://jenkinsci.github.io/kubernetes-credentials-provider-plugin/

View File

@ -1,56 +0,0 @@
[Docsy](https://github.com/google/docsy) is a Hugo theme for technical documentation sites, providing easy site navigation, structure, and more. This **Docsy Example Project** uses the Docsy theme, as well as providing a skeleton documentation structure for you to use. You can either copy this project and edit it with your own content, or use the theme in your projects like any other [Hugo theme](https://gohugo.io/themes/installing-and-using-themes/).
This Docsy Example Project is hosted at [https://goldydocs.netlify.com/](https://goldydocs.netlify.com/).
You can find detailed theme instructions in the Docsy user guide: https://docsydocs.netlify.com/docs/
This is not an officially supported Google product. This project is currently maintained.
## Cloning the Docsy Example Project
The following will give you a project that is set up and ready to use (don't forget to use `--recurse-submodules` or you won't pull down some of the code you need to generate a working site). The `hugo server` command builds and serves the site. If you just want to build the site, run `hugo` instead.
```bash
git clone --recurse-submodules --depth 1 https://github.com/google/docsy-example.git
cd docsy-example
hugo server
```
The theme is included as a Git submodule:
```bash
▶ git submodule
a053131a4ebf6a59e4e8834a42368e248d98c01d themes/docsy (heads/master)
```
If you want to do SCSS edits and want to publish these, you need to install `PostCSS` (not needed for `hugo server`):
```bash
npm install
```
<!--### Cloning the Example from the Theme Project
```bash
git clone --recurse-submodules --depth 1 https://github.com/docsy.git
cd tech-doc-hugo-theme/exampleSite
HUGO_THEMESDIR="../.." hugo server
```
Note that the Hugo Theme Site requires the `exampleSite` to live in a subfolder of the theme itself. To avoid recursive duplication, the example site is added as a Git subtree:
```bash
git subtree add --prefix exampleSite https://github.com/google/docsy.git master --squash
```
To pull in changes, see `pull-deps.sh` script in the theme.-->
## Running the website locally
Once you've cloned the site repo, from the repo root folder, run:
```
hugo server
```

View File

@ -65,7 +65,7 @@ Prevent loss of job history
We do a [Pull Request](https://github.com/jenkinsci/kubernetes-operator/pulls) contributions workflow on **GitHub**. New users are always welcome!
{{% /blocks/feature %}}
{{% blocks/feature icon="fas fa-folder-open" title="Documentation" url="/docs/" %}}
{{% blocks/feature icon="fas fa-folder-open" title="Documentation" url="/kubernetes-operator/docs" %}}
Learning the usage of Jenkins Operator will make your life easier. After that, you can easily contribute to the project.
{{% /blocks/feature %}}

View File

@ -35,7 +35,7 @@ make go-dependencies
Build and run **Jenkins Operator** locally:
```bash
make minikube-run EXTRA_ARGS='--minikube --local'
make build minikube-run EXTRA_ARGS='--minikube --local'
```
Once minikube and **Jenkins Operator** are up and running, apply Jenkins custom resource:

View File

@ -1,6 +1,6 @@
---
title: "v0.2.0"
linkTitle: "v0.2.0"
title: "Latest (v0.2.x)"
linkTitle: "Latest (v0.2.x)"
weight: 10
date: 2019-08-05
description: >
@ -8,7 +8,7 @@ description: >
---
{{% pageinfo %}}
This document describes a getting started guide for **Jenkins Operator** `v0.2.0` and an additional configuration.
This document describes a getting started guide for **Jenkins Operator** `v0.2.x` and an additional configuration.
{{% /pageinfo %}}
## First Steps

View File

@ -49,7 +49,7 @@ pipelineJob('build-jenkins-operator') {
}
```
**cicd/jobs/build.jenkins** is an actual Jenkins pipeline:
**cicd/pipelines/build.jenkins** is an actual Jenkins pipeline:
```
#!/usr/bin/env groovy

View File

@ -1,4 +1,11 @@
# Custom Backup and Restore Providers
---
title: "Custom Backup and Restore Providers"
linkTitle: "Custom Backup and Restore Providers"
weight: 10
date: 2019-08-05
description: >
Custom backup and restore provider
---
With enough effort one can create a custom backup and restore provider
for the Jenkins Operator.

View File

@ -1,10 +1,10 @@
---
title: "Migration from v0.1.1"
linkTitle: "Migration from v0.1.1"
title: "Migration from v0.1.x"
linkTitle: "Migration from v0.1.x"
weight: 10
date: 2019-08-05
description: >
How to migrate from v0.1.1 to v0.2.0
How to migrate from v0.1.x to v0.2.x
---
### Added seed job agent
@ -25,9 +25,13 @@ spec:
configurationAsCode:
configurations:
- name: jenkins-operator-user-configuration-<cr_name>
secret:
name: jenkins-operator-user-configuration-<cr_name>
groovyScripts:
configurations:
- name: jenkins-operator-user-configuration-<cr_name>
secret:
name: jenkins-operator-user-configuration-<cr_name>
```
**Jenkins** configuration jobs (*Configure Seed Jobs*, *jenkins-operator-base-configuration*, *jenkins-operator-user-configuration*) have been removed from **Jenkins**.

View File

@ -1,6 +1,6 @@
---
title: "v0.1.1"
linkTitle: "v0.1.1"
title: "v0.1.x"
linkTitle: "v0.1.x"
weight: 10
date: 2019-08-05
description: >
@ -8,7 +8,7 @@ description: >
---
{{% pageinfo %}}
This document describes a getting started guide for **Jenkins Operator** `v0.1.1` and an additional configuration.
This document describes a getting started guide for **Jenkins Operator** `v0.1.x` and an additional configuration.
{{% /pageinfo %}}
## First Steps

View File

@ -47,7 +47,7 @@ pipelineJob('build-jenkins-operator') {
}
```
**cicd/jobs/build.jenkins** is an actual Jenkins pipeline:
**cicd/pipelines/build.jenkins** is an actual Jenkins pipeline:
```
#!/usr/bin/env groovy

View File

@ -1,27 +0,0 @@
<!doctype html>
<html lang="{{ .Site.Language.Lang }}" class="no-js">
<head>
{{ partial "head.html" . }}
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
</head>
<body class="td-{{ .Kind }}">
<header>
{{ partial "navbar.html" . }}
</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<div class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
{{ partial "sidebar.html" . }}
</div>
<main class="col-12 col-md-9 col-xl-10 pl-md-5" role="main">
{{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }}
{{ block "main" . }}{{ end }}
</main>
</div>
</div>
{{ partial "footer.html" . }}
</div>
{{ partial "scripts.html" . }}
</body>
</html>