#157 Regenerate docs
This commit is contained in:
parent
327a688674
commit
d8bc1ffa4d
|
|
@ -257,7 +257,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
@ -472,8 +472,9 @@
|
|||
|
||||
<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>
|
||||
<p>Prepare your Kubernetes cluster and set up your <code>kubectl</code> access.</p>
|
||||
|
||||
<p>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">
|
||||
|
||||
|
|
@ -531,7 +532,7 @@ Once you have running Kubernetes cluster you can focus on installing <strong>Jen
|
|||
<h5>
|
||||
<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 legacy version. We recommend migration to v0.2.0 version
|
||||
<p>How to work with jenkins-operator legacy version. We recommend migration to a latest version
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
<meta itemprop="datePublished" content="2019-08-05T00:00:00+00:00" />
|
||||
<meta itemprop="dateModified" content="2019-08-05T00:00:00+00:00" />
|
||||
<meta itemprop="wordCount" content="725">
|
||||
<meta itemprop="wordCount" content="726">
|
||||
|
||||
|
||||
|
||||
|
|
@ -264,7 +264,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
@ -530,7 +530,7 @@ and deploy keys.</p>
|
|||
└── build.jenkins
|
||||
</code></pre>
|
||||
|
||||
<p><strong>cicd/jobs/build.jenkins</strong> is a job definition:</p>
|
||||
<p><strong><code>cicd/jobs/build.jenkins</code></strong> is a job definition:</p>
|
||||
|
||||
<pre><code>#!/usr/bin/env groovy
|
||||
|
||||
|
|
@ -554,7 +554,7 @@ pipelineJob('build-jenkins-operator') {
|
|||
}
|
||||
</code></pre>
|
||||
|
||||
<p><strong>cicd/pipelines/build.jenkins</strong> is an actual Jenkins pipeline:</p>
|
||||
<p><strong><code>cicd/pipelines/build.jenkins</code></strong> is an actual Jenkins pipeline:</p>
|
||||
|
||||
<pre><code>#!/usr/bin/env groovy
|
||||
|
||||
|
|
@ -720,7 +720,7 @@ stringData:
|
|||
|
||||
<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>
|
||||
<p>To use forwarding proxy with an operator to download plugins you need to add the following environment variable to Jenkins Custom Resource (CR), 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">
|
||||
|
|
@ -728,7 +728,7 @@ stringData:
|
|||
</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><proxy_url></code></pre></div>
|
||||
<p>In <code>CURL_OPTIONS</code> var you can set additional arguments to curl command.</p>
|
||||
<p>In <code>CURL_OPTIONS</code> var you can set additional arguments to <code>curl</code> command.</p>
|
||||
|
||||
<h2 id="pulling-docker-images-from-private-repositories">Pulling Docker images from private repositories</h2>
|
||||
|
||||
|
|
@ -744,7 +744,7 @@ stringData:
|
|||
<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 <namespace> edit secret <name></code></pre></div>
|
||||
<p>The <code>.dockerconfigjson</code> key’s value needs to be replaced with a modified version.</p>
|
||||
|
||||
<p>After modifications, it needs to be encoded as a Base64 value before setting the <code>.dockerconfigjson</code> key:q.</p>
|
||||
<p>After modifications, it needs to be encoded as a Base64 value before setting the <code>.dockerconfigjson</code> key.</p>
|
||||
|
||||
<p>Example config file to modify and use:</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
<meta itemprop="datePublished" content="2019-08-05T00:00:00+00:00" />
|
||||
<meta itemprop="dateModified" content="2019-08-05T00:00:00+00:00" />
|
||||
<meta itemprop="wordCount" content="515">
|
||||
<meta itemprop="wordCount" content="511">
|
||||
|
||||
|
||||
|
||||
|
|
@ -264,7 +264,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
@ -505,9 +505,12 @@ 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>Two commands (e.g. scripts) are required:</p>
|
||||
|
||||
<ul>
|
||||
<li>a backup command, e.g. <code>backup.sh</code> that takes one argument, a <strong>backup number</strong></li>
|
||||
<li>a restore command, e.g. <code>backup.sh</code> that takes one argument, a <strong>backup number</strong></li>
|
||||
</ul>
|
||||
|
||||
<p>Both scripts need to return an exit code of <code>0</code> on success and <code>1</code> or greater for failure.</p>
|
||||
|
||||
|
|
@ -525,15 +528,18 @@ Kubernetes pod as the Jenkins master.</p>
|
|||
<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>
|
||||
<p>The operator will call a backup or restore commands inside a sidecar container when necessary:</p>
|
||||
|
||||
<ul>
|
||||
<li>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</li>
|
||||
<li>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>)</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="example-aws-s3-backup-using-the-cli">Example AWS S3 backup using the CLI</h2>
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
<meta itemprop="datePublished" content="2019-08-05T00:00:00+00:00" />
|
||||
<meta itemprop="dateModified" content="2019-08-05T00:00:00+00:00" />
|
||||
<meta itemprop="wordCount" content="252">
|
||||
<meta itemprop="wordCount" content="253">
|
||||
|
||||
|
||||
|
||||
|
|
@ -264,7 +264,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
@ -504,9 +504,9 @@
|
|||
|
||||
<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>
|
||||
Then you must reference the <strong><code>ConfigMap</code></strong> 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>
|
||||
<p>For example create a <strong><code>ConfigMap</code></strong> 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">
|
||||
|
|
@ -548,8 +548,8 @@ Then you must reference the <em>ConfigMap</em> in the <strong>Jenkins</strong> p
|
|||
</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">"Configuration as Code integration works!!!"</span></code></pre></div>
|
||||
<ul>
|
||||
<li>*.groovy is Groovy script configuration</li>
|
||||
<li>*.yaml is configuration as code</li>
|
||||
<li><code>*.groovy</code> is Groovy script configuration</li>
|
||||
<li><code>*.yaml is</code> 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.
|
||||
|
|
@ -585,7 +585,7 @@ The secrets are loaded to <code>secrets</code> map.</p>
|
|||
</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>
|
||||
<p>Now you can test that the secret is mounted by applying this <code>ConfigMap</code> 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">
|
||||
|
|
@ -613,7 +613,7 @@ The secrets are loaded to <code>secrets</code> map.</p>
|
|||
|
||||
<h2 id="install-plugins">Install Plugins</h2>
|
||||
|
||||
<p>Edit CR under <code>spec.master.plugins</code>:</p>
|
||||
<p>Edit Custom Resource under <code>spec.master.plugins</code>:</p>
|
||||
|
||||
<pre><code>apiVersion: jenkins.io/v1alpha2
|
||||
kind: Jenkins
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
<meta itemprop="datePublished" content="2019-08-05T00:00:00+00:00" />
|
||||
<meta itemprop="dateModified" content="2019-08-05T00:00:00+00:00" />
|
||||
<meta itemprop="wordCount" content="170">
|
||||
<meta itemprop="wordCount" content="171">
|
||||
|
||||
|
||||
|
||||
|
|
@ -264,7 +264,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
@ -485,8 +485,8 @@
|
|||
<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’s deploy actual Jenkins instance.
|
||||
Create manifest ie. <strong>jenkins_instance.yaml</strong> with following data and save it on drive.</p>
|
||||
<p>Once Jenkins Operator is up and running let’s deploy actual Jenkins instance.
|
||||
Create manifest e.g. <strong><code>jenkins_instance.yaml</code></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:
|
||||
|
|
@ -530,7 +530,7 @@ spec:
|
|||
description: <span style="color:#4e9a06">"Jenkins Operator repository"</span>
|
||||
repositoryBranch: master
|
||||
repositoryUrl: https://github.com/jenkinsci/kubernetes-operator.git</code></pre></div>
|
||||
<p>Deploy a Jenkins to K8s:</p>
|
||||
<p>Deploy a Jenkins to Kubernetes:</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>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
<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: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/" />
|
||||
|
|
@ -29,20 +29,20 @@
|
|||
<meta property="article:modified_time" content="2019-08-05T00:00:00+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="description" content="How to deal with Jenkins Operator problems
|
||||
">
|
||||
|
||||
|
||||
<meta itemprop="datePublished" content="2019-08-05T00:00:00+00:00" />
|
||||
<meta itemprop="dateModified" content="2019-08-05T00:00:00+00:00" />
|
||||
<meta itemprop="wordCount" content="56">
|
||||
<meta itemprop="wordCount" content="57">
|
||||
|
||||
|
||||
|
||||
<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
|
||||
<meta name="twitter:description" content="How to deal with Jenkins Operator problems
|
||||
"/>
|
||||
|
||||
|
||||
|
|
@ -264,7 +264,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
@ -486,7 +486,7 @@
|
|||
|
||||
<div class="td-content">
|
||||
<h1>Diagnostics</h1>
|
||||
<div class="lead">How to deal with jenkins-operator problems</div>
|
||||
<div class="lead">How to deal with Jenkins Operator problems</div>
|
||||
|
||||
|
||||
<p>Turn on debug in <strong>Jenkins Operator</strong> deployment:</p>
|
||||
|
|
@ -496,7 +496,7 @@ kubectl apply -f deploy/operator.yaml</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">kubectl get events --sort-by<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">'{.lastTimestamp}'</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-<cr_name></code></pre></div>
|
||||
<p>Verify jenkins-operator logs:</p>
|
||||
<p>Verify the <code>jenkins-operator</code> 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>
|
||||
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
@ -482,8 +482,9 @@
|
|||
|
||||
<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>
|
||||
<p>Prepare your Kubernetes cluster and set up your <code>kubectl</code> access.</p>
|
||||
|
||||
<p>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">
|
||||
|
||||
|
|
@ -595,7 +596,7 @@ Once you have running Kubernetes cluster you can focus on installing <strong>Jen
|
|||
<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>How to deal with Jenkins Operator problems
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
|
@ -605,9 +606,9 @@ 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/latest/scheme/">Scheme</a>
|
||||
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
</h5>
|
||||
<p>API Schema definitions for Jenkins CR
|
||||
<p>API Schema definitions for Jenkins CRD
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@
|
|||
<description>
|
||||
|
||||
|
||||
<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>
|
||||
<p>Once Jenkins Operator is up and running let&rsquo;s deploy actual Jenkins instance.
|
||||
Create manifest e.g. <strong><code>jenkins_instance.yaml</code></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:
|
||||
|
|
@ -73,7 +73,7 @@ spec:
|
|||
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>
|
||||
<p>Deploy a Jenkins to Kubernetes:</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>
|
||||
|
|
@ -117,7 +117,7 @@ and deploy keys.</p>
|
|||
└── build.jenkins
|
||||
</code></pre>
|
||||
|
||||
<p><strong>cicd/jobs/build.jenkins</strong> is a job definition:</p>
|
||||
<p><strong><code>cicd/jobs/build.jenkins</code></strong> is a job definition:</p>
|
||||
|
||||
<pre><code>#!/usr/bin/env groovy
|
||||
|
||||
|
|
@ -141,7 +141,7 @@ pipelineJob('build-jenkins-operator') {
|
|||
}
|
||||
</code></pre>
|
||||
|
||||
<p><strong>cicd/pipelines/build.jenkins</strong> is an actual Jenkins pipeline:</p>
|
||||
<p><strong><code>cicd/pipelines/build.jenkins</code></strong> is an actual Jenkins pipeline:</p>
|
||||
|
||||
<pre><code>#!/usr/bin/env groovy
|
||||
|
||||
|
|
@ -307,7 +307,7 @@ stringData:
|
|||
|
||||
<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>
|
||||
<p>To use forwarding proxy with an operator to download plugins you need to add the following environment variable to Jenkins Custom Resource (CR), 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">
|
||||
|
|
@ -315,7 +315,7 @@ stringData:
|
|||
</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>
|
||||
<p>In <code>CURL_OPTIONS</code> var you can set additional arguments to <code>curl</code> command.</p>
|
||||
|
||||
<h2 id="pulling-docker-images-from-private-repositories">Pulling Docker images from private repositories</h2>
|
||||
|
||||
|
|
@ -331,7 +331,7 @@ stringData:
|
|||
<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 a Base64 value before setting the <code>.dockerconfigjson</code> key:q.</p>
|
||||
<p>After modifications, it needs to be encoded as a Base64 value before setting the <code>.dockerconfigjson</code> key.</p>
|
||||
|
||||
<p>Example config file to modify and use:</p>
|
||||
|
||||
|
|
@ -405,9 +405,9 @@ stringData:
|
|||
|
||||
<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>
|
||||
Then you must reference the <strong><code>ConfigMap</code></strong> 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>
|
||||
<p>For example create a <strong><code>ConfigMap</code></strong> 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">
|
||||
|
|
@ -449,8 +449,8 @@ Then you must reference the <em>ConfigMap</em> in the <strong>
|
|||
</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>
|
||||
<li><code>*.groovy</code> is Groovy script configuration</li>
|
||||
<li><code>*.yaml is</code> 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.
|
||||
|
|
@ -486,7 +486,7 @@ The secrets are loaded to <code>secrets</code> map.</p>
|
|||
</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>
|
||||
<p>Now you can test that the secret is mounted by applying this <code>ConfigMap</code> 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">
|
||||
|
|
@ -514,7 +514,7 @@ The secrets are loaded to <code>secrets</code> map.</p>
|
|||
|
||||
<h2 id="install-plugins">Install Plugins</h2>
|
||||
|
||||
<p>Edit CR under <code>spec.master.plugins</code>:</p>
|
||||
<p>Edit Custom Resource under <code>spec.master.plugins</code>:</p>
|
||||
|
||||
<pre><code>apiVersion: jenkins.io/v1alpha2
|
||||
kind: Jenkins
|
||||
|
|
@ -680,9 +680,12 @@ 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>Two commands (e.g. scripts) are required:</p>
|
||||
|
||||
<ul>
|
||||
<li>a backup command, e.g. <code>backup.sh</code> that takes one argument, a <strong>backup number</strong></li>
|
||||
<li>a restore command, e.g. <code>backup.sh</code> that takes one argument, a <strong>backup number</strong></li>
|
||||
</ul>
|
||||
|
||||
<p>Both scripts need to return an exit code of <code>0</code> on success and <code>1</code> or greater for failure.</p>
|
||||
|
||||
|
|
@ -700,15 +703,18 @@ Kubernetes pod as the Jenkins master.</p>
|
|||
<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>
|
||||
<p>The operator will call a backup or restore commands inside a sidecar container when necessary:</p>
|
||||
|
||||
<ul>
|
||||
<li>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</li>
|
||||
<li>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>)</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="example-aws-s3-backup-using-the-cli">Example AWS S3 backup using the CLI</h2>
|
||||
|
||||
|
|
@ -852,21 +858,44 @@ the number of backups under control, e.g. Cloud Formation fragment:</p>
|
|||
|
||||
|
||||
|
||||
<h3 id="added-seed-job-agent">Added seed job agent</h3>
|
||||
<h3 id="major-changes">Major Changes</h3>
|
||||
|
||||
<p>Seed jobs are not built by master executors, but by dedicated agents deployed into Kubernetes. We disabled master executors for security reasons.</p>
|
||||
<h4 id="adding-the-seed-job-agent">Adding the seed job agent</h4>
|
||||
|
||||
<h3 id="apply-jenkins-configuration-via-groovy-scripts-instead-of-jenkins-jobs">Apply Jenkins configuration via Groovy scripts instead of Jenkins jobs</h3>
|
||||
<p>From version <code>v0.2.0</code> seed jobs are not run by master executors, but by a dedicated agent deployed as a Kubernetes Pod.</p>
|
||||
|
||||
<p>We have removed the hardcoded configuration by <strong>Jenkins</strong> jobs.</p>
|
||||
<p>We&rsquo;ve had disabled master executors for security reasons.</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 refererences to old ConfigMap by modifying CR, for example:</p>
|
||||
<h4 id="replacing-configuration-jobs-with-groovy-scripts">Replacing configuration jobs with Groovy scripts</h4>
|
||||
|
||||
<p>In <code>v0.1.x</code> <strong>Jenkins Operator</strong> user configuration application was implemented using <strong>Jenkins</strong> jobs
|
||||
and this mechanism was replaced since <code>v0.2.0</code> with Groovy scripts implementing the same functionality.</p>
|
||||
|
||||
<p>As a result the <strong>Jenkins</strong> configuration jobs (&ldquo;Configure Seed Jobs&rdquo;, &ldquo;jenkins-operator-base-configuration&rdquo;, &ldquo;jenkins-operator-user-configuration&rdquo;) are no longer visible in <strong>Jenkins</strong> UI.</p>
|
||||
|
||||
<p>In <code>v0.1.x</code> you can see if any of the configuration jobs failed or succeded in the <strong>Jenkins</strong> UI (job build logs).
|
||||
Instead, you can make sure the operator is running correctly by inspecting its logs, 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-bash" data-lang="bash">$ kubectl -n logs deployment/jenkins-operator</code></pre></div>
|
||||
<h4 id="making-user-configuration-sources-configurable">Making User Configuration sources configurable</h4>
|
||||
|
||||
<p>In <code>v0.1.x</code> <strong>Jenkins Operator</strong> user configuration was stored in a <code>ConfigMap</code> and a <code>Secret</code>
|
||||
named <code>jenkins-operator-user-configuration-&lt;cr_name&gt;</code>, and its name was hardcoded in the operator.</p>
|
||||
|
||||
<p>Since <code>v0.2.0</code> the user configuration can be stored in a multiple <code>ConfigMap</code> and <code>Secret</code> manifests
|
||||
and has to be explicitly pointed to with <code>spec.configurationAsCode.configurations</code> and <code>spec.configurationAsCode.secret</code>
|
||||
for the Configuration as Code plugin,
|
||||
and <code>spec.groovyScripts.configurations</code> and <code>spec.groovyScripts.secret</code> for the more advanced groovy scripts.</p>
|
||||
|
||||
<h3 id="migration">Migration</h3>
|
||||
|
||||
<p>If you want to use <code>v0.1.x</code> operator configuration with <code>v0.2.x</code> you have to modify your Jenkins Custom Resource(s)
|
||||
and add explicit references to the existing <code>ConfigMap</code> and <code>Secret</code>, 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">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>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;cr_name&gt;<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>...<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;
|
||||
|
|
@ -876,12 +905,8 @@ If you want to use <code>v0.2.0</code> or newer you must simply writ
|
|||
</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 the configuration failed or successfully updated in <strong>Jenkins</strong> UI (job build logs).
|
||||
When Jenkins configuration jobs are removed, you must use the following 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>
|
||||
</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"> ...</span></code></pre></div>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -903,7 +928,7 @@ kubectl apply -f deploy/operator.yaml</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">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>
|
||||
<p>Verify the <code>jenkins-operator</code> 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>
|
||||
|
||||
|
|
@ -913,18 +938,18 @@ kubectl apply -f deploy/operator.yaml</code></pre></div>
|
|||
</item>
|
||||
|
||||
<item>
|
||||
<title>Docs: Scheme</title>
|
||||
<link>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/scheme/</link>
|
||||
<title>Docs: Schema</title>
|
||||
<link>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/schema/</link>
|
||||
<pubDate>Mon, 05 Aug 2019 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/scheme/</guid>
|
||||
<guid>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/schema/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="pageinfo pageinfo-primary">
|
||||
<p>This document contains API scheme for <code>jenkins-operator</code> manifest</p>
|
||||
<p>This document contains API scheme for <code>jenkins-operator</code> Custom Resource Definition manifest</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
<meta itemprop="datePublished" content="2019-08-05T00:00:00+00:00" />
|
||||
<meta itemprop="dateModified" content="2019-08-05T00:00:00+00:00" />
|
||||
<meta itemprop="wordCount" content="133">
|
||||
<meta itemprop="wordCount" content="234">
|
||||
|
||||
|
||||
|
||||
|
|
@ -264,7 +264,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
@ -441,8 +441,13 @@
|
|||
<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>
|
||||
<li><a href="#major-changes">Major Changes</a>
|
||||
<ul>
|
||||
<li><a href="#adding-the-seed-job-agent">Adding the seed job agent</a></li>
|
||||
<li><a href="#replacing-configuration-jobs-with-groovy-scripts">Replacing configuration jobs with Groovy scripts</a></li>
|
||||
<li><a href="#making-user-configuration-sources-configurable">Making User Configuration sources configurable</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#migration">Migration</a></li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
|
|
@ -502,21 +507,44 @@
|
|||
<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>
|
||||
<h3 id="major-changes">Major Changes</h3>
|
||||
|
||||
<p>Seed jobs are not built by master executors, but by dedicated agents deployed into Kubernetes. We disabled master executors for security reasons.</p>
|
||||
<h4 id="adding-the-seed-job-agent">Adding the seed job agent</h4>
|
||||
|
||||
<h3 id="apply-jenkins-configuration-via-groovy-scripts-instead-of-jenkins-jobs">Apply Jenkins configuration via Groovy scripts instead of Jenkins jobs</h3>
|
||||
<p>From version <code>v0.2.0</code> seed jobs are not run by master executors, but by a dedicated agent deployed as a Kubernetes Pod.</p>
|
||||
|
||||
<p>We have removed the hardcoded configuration by <strong>Jenkins</strong> jobs.</p>
|
||||
<p>We’ve had disabled master executors for security reasons.</p>
|
||||
|
||||
<p>In <code>v0.1.1</code> <strong>Jenkins Operator</strong> configuration was stored in <code>jenkins-operator-user-configuration-<cr_name></code>
|
||||
If you want to use <code>v0.2.0</code> or newer you must simply write refererences to old ConfigMap by modifying CR, for example:</p>
|
||||
<h4 id="replacing-configuration-jobs-with-groovy-scripts">Replacing configuration jobs with Groovy scripts</h4>
|
||||
|
||||
<p>In <code>v0.1.x</code> <strong>Jenkins Operator</strong> user configuration application was implemented using <strong>Jenkins</strong> jobs
|
||||
and this mechanism was replaced since <code>v0.2.0</code> with Groovy scripts implementing the same functionality.</p>
|
||||
|
||||
<p>As a result the <strong>Jenkins</strong> configuration jobs (“Configure Seed Jobs”, “jenkins-operator-base-configuration”, “jenkins-operator-user-configuration”) are no longer visible in <strong>Jenkins</strong> UI.</p>
|
||||
|
||||
<p>In <code>v0.1.x</code> you can see if any of the configuration jobs failed or succeded in the <strong>Jenkins</strong> UI (job build logs).
|
||||
Instead, you can make sure the operator is running correctly by inspecting its logs, 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-bash" data-lang="bash">$ kubectl -n logs deployment/jenkins-operator</code></pre></div>
|
||||
<h4 id="making-user-configuration-sources-configurable">Making User Configuration sources configurable</h4>
|
||||
|
||||
<p>In <code>v0.1.x</code> <strong>Jenkins Operator</strong> user configuration was stored in a <code>ConfigMap</code> and a <code>Secret</code>
|
||||
named <code>jenkins-operator-user-configuration-<cr_name></code>, and its name was hardcoded in the operator.</p>
|
||||
|
||||
<p>Since <code>v0.2.0</code> the user configuration can be stored in a multiple <code>ConfigMap</code> and <code>Secret</code> manifests
|
||||
and has to be explicitly pointed to with <code>spec.configurationAsCode.configurations</code> and <code>spec.configurationAsCode.secret</code>
|
||||
for the Configuration as Code plugin,
|
||||
and <code>spec.groovyScripts.configurations</code> and <code>spec.groovyScripts.secret</code> for the more advanced groovy scripts.</p>
|
||||
|
||||
<h3 id="migration">Migration</h3>
|
||||
|
||||
<p>If you want to use <code>v0.1.x</code> operator configuration with <code>v0.2.x</code> you have to modify your Jenkins Custom Resource(s)
|
||||
and add explicit references to the existing <code>ConfigMap</code> and <code>Secret</code>, 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">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>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><cr_name><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>...<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-<cr_name<span style="color:#8f5902;font-style:italic">>
|
||||
|
|
@ -526,12 +554,8 @@ If you want to use <code>v0.2.0</code> or newer you must simply write refererenc
|
|||
</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-<cr_name<span style="color:#8f5902;font-style:italic">>
|
||||
</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-<cr_name></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 the configuration failed or successfully updated in <strong>Jenkins</strong> UI (job build logs).
|
||||
When Jenkins configuration jobs are removed, you must use the following 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>
|
||||
</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-<cr_name<span style="color:#8f5902;font-style:italic">>
|
||||
</span><span style="color:#8f5902;font-style:italic"> ...</span></code></pre></div>
|
||||
|
||||
|
||||
<div class="text-muted mt-5 pt-3 border-top">Last modified August 5, 2019
|
||||
|
|
|
|||
|
|
@ -20,29 +20,29 @@
|
|||
<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>Scheme | Jenkins Operator</title><meta property="og:title" content="Scheme" />
|
||||
<meta property="og:description" content="API Schema definitions for Jenkins CR
|
||||
<title>Schema | Jenkins Operator</title><meta property="og:title" content="Schema" />
|
||||
<meta property="og:description" content="API Schema definitions for Jenkins CRD
|
||||
" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/scheme/" />
|
||||
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/schema/" />
|
||||
<meta property="article:published_time" content="2019-08-05T00:00:00+00:00"/>
|
||||
<meta property="article:modified_time" content="2019-08-05T00:00:00+00:00"/><meta property="og:site_name" content="Jenkins Operator" />
|
||||
|
||||
<meta itemprop="name" content="Scheme">
|
||||
<meta itemprop="description" content="API Schema definitions for Jenkins CR
|
||||
<meta itemprop="name" content="Schema">
|
||||
<meta itemprop="description" content="API Schema definitions for Jenkins CRD
|
||||
">
|
||||
|
||||
|
||||
<meta itemprop="datePublished" content="2019-08-05T00:00:00+00:00" />
|
||||
<meta itemprop="dateModified" content="2019-08-05T00:00:00+00:00" />
|
||||
<meta itemprop="wordCount" content="2440">
|
||||
<meta itemprop="wordCount" content="2443">
|
||||
|
||||
|
||||
|
||||
<meta itemprop="keywords" content="" />
|
||||
<meta name="twitter:card" content="summary"/>
|
||||
<meta name="twitter:title" content="Scheme"/>
|
||||
<meta name="twitter:description" content="API Schema definitions for Jenkins CR
|
||||
<meta name="twitter:title" content="Schema"/>
|
||||
<meta name="twitter:description" content="API Schema definitions for Jenkins CRD
|
||||
"/>
|
||||
|
||||
|
||||
|
|
@ -58,7 +58,7 @@
|
|||
crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
<title>Scheme | Jenkins Operator</title>
|
||||
<title>Schema | Jenkins Operator</title>
|
||||
</head>
|
||||
<body class="td-page">
|
||||
<header>
|
||||
|
|
@ -264,7 +264,7 @@
|
|||
|
||||
|
||||
|
||||
<a class="td-sidebar-link td-sidebar-link__page active" id="m-kubernetes-operator-docs-getting-started-latest-scheme" href="/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
|
||||
<a class="td-sidebar-link td-sidebar-link__page active" id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
@ -422,8 +422,8 @@
|
|||
|
||||
|
||||
|
||||
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/website/content/en/docs/Getting%20Started/latest/scheme.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=Scheme" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
|
||||
<a href="https://github.com/jenkinsci/kubernetes-operator/edit/master/website/content/en/docs/Getting%20Started/latest/schema.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=Schema" 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>
|
||||
|
|
@ -475,7 +475,7 @@
|
|||
|
||||
|
||||
<li class="breadcrumb-item active" aria-current="page">
|
||||
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/scheme/">Scheme</a>
|
||||
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
|
|
@ -483,12 +483,12 @@
|
|||
|
||||
|
||||
<div class="td-content">
|
||||
<h1>Scheme</h1>
|
||||
<div class="lead">API Schema definitions for Jenkins CR</div>
|
||||
<h1>Schema</h1>
|
||||
<div class="lead">API Schema definitions for Jenkins CRD</div>
|
||||
|
||||
|
||||
<div class="pageinfo pageinfo-primary">
|
||||
<p>This document contains API scheme for <code>jenkins-operator</code> manifest</p>
|
||||
<p>This document contains API scheme for <code>jenkins-operator</code> Custom Resource Definition manifest</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
@ -264,7 +264,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
<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:description" content="How to work with jenkins-operator legacy version. We recommend migration to a latest version
|
||||
" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.1.x/" />
|
||||
|
|
@ -30,12 +30,12 @@
|
|||
<meta property="og:updated_time" content="2019-08-05T00:00:00+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 itemprop="description" content="How to work with jenkins-operator legacy version. We recommend migration to a latest 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
|
||||
<meta name="twitter:description" content="How to work with jenkins-operator legacy version. We recommend migration to a latest version
|
||||
"/>
|
||||
|
||||
|
||||
|
|
@ -257,7 +257,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
@ -469,7 +469,7 @@
|
|||
|
||||
<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="lead">How to work with jenkins-operator legacy version. We recommend migration to a latest version</div>
|
||||
|
||||
|
||||
|
||||
|
|
@ -482,8 +482,9 @@
|
|||
|
||||
<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>
|
||||
<p>Prepare your Kubernetes cluster and set up your <code>kubectl</code> access.</p>
|
||||
|
||||
<p>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">
|
||||
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -1,647 +0,0 @@
|
|||
<!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>Notifications | Jenkins Operator</title><meta property="og:title" content="Notifications" />
|
||||
<meta property="og:description" content="How to setup operator notifications.
|
||||
" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/notifications/" />
|
||||
<meta property="article:published_time" content="2019-08-05T00:00:00+00:00"/>
|
||||
<meta property="article:modified_time" content="2019-08-05T00:00:00+00:00"/><meta property="og:site_name" content="Jenkins Operator" />
|
||||
|
||||
<meta itemprop="name" content="Notifications">
|
||||
<meta itemprop="description" content="How to setup operator notifications.
|
||||
">
|
||||
|
||||
|
||||
<meta itemprop="datePublished" content="2019-08-05T00:00:00+00:00" />
|
||||
<meta itemprop="dateModified" content="2019-08-05T00:00:00+00:00" />
|
||||
<meta itemprop="wordCount" content="208">
|
||||
|
||||
|
||||
|
||||
<meta itemprop="keywords" content="" />
|
||||
<meta name="twitter:card" content="summary"/>
|
||||
<meta name="twitter:title" content="Notifications"/>
|
||||
<meta name="twitter:description" content="How to setup operator notifications.
|
||||
"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="preload" href="/kubernetes-operator/scss/main.min.76f9ae686f932b9aa67346ef8543e8a6b0302cb67aa119d21b053c31bc3f2448.css" as="style">
|
||||
<link href="/kubernetes-operator/scss/main.min.76f9ae686f932b9aa67346ef8543e8a6b0302cb67aa119d21b053c31bc3f2448.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>Notifications | 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=" 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=" 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 active 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>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a class="td-sidebar-link td-sidebar-link__page active" id="m-kubernetes-operator-docs-getting-started-v0-3-x-notifications" href="/kubernetes-operator/docs/getting-started/v0.3.x/notifications/">Notifications</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<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/website/content/en/docs/Getting%20Started/v0.3.x/notifications.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=Notifications" 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="#slack">Slack</a></li>
|
||||
<li><a href="#microsoft-teams">Microsoft Teams</a></li>
|
||||
<li><a href="#mailgun">Mailgun</a></li>
|
||||
<li><a href="#debug-options">Debug options</a></li>
|
||||
<li><a href="#multiple-providers">Multiple providers</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 active" aria-current="page">
|
||||
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.3.x/notifications/">Notifications</a>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
</nav >
|
||||
|
||||
|
||||
<div class="td-content">
|
||||
<h1>Notifications</h1>
|
||||
<div class="lead">How to setup operator notifications.</div>
|
||||
|
||||
|
||||
<h2 id="slack">Slack</h2>
|
||||
|
||||
<p>Please follow <a href="https://api.slack.com/incoming-webhooks" target="_blank">this</a> instructions to get web hook URL.</p>
|
||||
|
||||
<p>Create web hook secret with name <code>jenkins-operator-notification-data</code>. Contains key <code>url</code> with provided web hook URL.</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 secret generic jenkins-operator-notification-data --from-literal<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000">url</span><span style="color:#ce5c00;font-weight:bold">=</span><webhook_url></code></pre></div>
|
||||
<p>Example configuration for Slack:</p>
|
||||
|
||||
<pre><code>kind: Jenkins
|
||||
spec:
|
||||
master:
|
||||
notifications:
|
||||
- loggingLevel: info
|
||||
verbose: true
|
||||
name: <name>
|
||||
slack:
|
||||
webHookURLSecretKeySelector:
|
||||
secret:
|
||||
name: <secret_name>
|
||||
key: <key>
|
||||
</code></pre>
|
||||
|
||||
<h2 id="microsoft-teams">Microsoft Teams</h2>
|
||||
|
||||
<p>Please follow <a href="https://docs.microsoft.com/en-gb/outlook/actionable-messages/send-via-connectors" target="_blank">this</a> instructions to get web hook URL.</p>
|
||||
|
||||
<p>Example configuration for Microsoft Teams:</p>
|
||||
|
||||
<pre><code>kind: Jenkins
|
||||
spec:
|
||||
master:
|
||||
notifications:
|
||||
- loggingLevel: info
|
||||
verbose: true
|
||||
name: <name>
|
||||
teams:
|
||||
webHookURLSecretKeySelector:
|
||||
secret:
|
||||
name: <secret_name>
|
||||
key: <key>
|
||||
</code></pre>
|
||||
|
||||
<h2 id="mailgun">Mailgun</h2>
|
||||
|
||||
<p>Example configuration for Mailgun:</p>
|
||||
|
||||
<pre><code>kind: Jenkins
|
||||
spec:
|
||||
master:
|
||||
notifications:
|
||||
- loggingLevel: info
|
||||
verbose: true
|
||||
name: <name>
|
||||
mailgun:
|
||||
domain: <domain>
|
||||
apiKeySecretKeySelector:
|
||||
secret:
|
||||
name: <secret_name>
|
||||
key: <key>
|
||||
recipient: <your_email>
|
||||
from: <mailgun_email>
|
||||
</code></pre>
|
||||
|
||||
<h2 id="debug-options">Debug options</h2>
|
||||
|
||||
<p>As you see there is two debugging options:</p>
|
||||
|
||||
<ul>
|
||||
<li><p><code>loggingLevel</code> (warning/info) - Set level of messages to send.</p></li>
|
||||
|
||||
<li><p><code>verbose</code> - Print stacktrace and additional error messages</p></li>
|
||||
</ul>
|
||||
|
||||
<h2 id="multiple-providers">Multiple providers</h2>
|
||||
|
||||
<p>You can use multiple providers to send notification to another communication channels at the same time.
|
||||
For example you will send notifications to Slack and Teams.</p>
|
||||
|
||||
<pre><code>kind: Jenkins
|
||||
spec:
|
||||
master:
|
||||
notifications:
|
||||
- loggingLevel: info
|
||||
verbose: true
|
||||
name: nslack
|
||||
slack:
|
||||
webHookURLSecretKeySelector:
|
||||
secret:
|
||||
name: <secret_name>
|
||||
key: <key>
|
||||
- loggingLevel: info
|
||||
verbose: true
|
||||
name: nteams
|
||||
teams:
|
||||
webHookURLSecretKeySelector:
|
||||
secret:
|
||||
name: <secret_name>
|
||||
key: <key>
|
||||
</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">© 2019 VirtusLab All Rights Reserved</small>
|
||||
|
||||
|
||||
<p class="mt-2"><a href="/kubernetes-operator/about/">What'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>
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
<meta itemprop="datePublished" content="2019-08-05T00:00:00+00:00" />
|
||||
<meta itemprop="dateModified" content="2019-08-05T00:00:00+00:00" />
|
||||
<meta itemprop="wordCount" content="226">
|
||||
<meta itemprop="wordCount" content="221">
|
||||
|
||||
|
||||
|
||||
|
|
@ -264,7 +264,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
@ -479,30 +479,40 @@
|
|||
<div class="lead">Jenkins Operator fundamentals</div>
|
||||
|
||||
|
||||
<p>The <strong>Jenkins Operator</strong> 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</p>
|
||||
<p>The <strong>Jenkins Operator</strong> design incorporates the following concepts:</p>
|
||||
|
||||
<ul>
|
||||
<li>watches any changes of manifests and maintain the desired state according to deployed custom resource manifest</li>
|
||||
<li>implements the main reconciliation loop which consists of two smaller reconciliation loops - base and user</li>
|
||||
</ul>
|
||||
|
||||
<p><img src="/kubernetes-operator/img/reconcile.png" alt="reconcile" /></p>
|
||||
|
||||
<p><strong>Base</strong> 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</p>
|
||||
<p><strong>Base</strong> reconciliation loop takes care of reconciling base Jenkins configuration, which consists of:</p>
|
||||
|
||||
<p><strong>User</strong> 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<br />
|
||||
- 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</p>
|
||||
<ul>
|
||||
<li>Ensure Manifests - monitors any changes in manifests</li>
|
||||
<li>Ensure Jenkins Pod - creates and verifies the status of Jenkins master Pod</li>
|
||||
<li>Ensure Jenkins Configuration - configures Jenkins instance including hardening, initial configuration for plugins, etc.</li>
|
||||
<li>Ensure Jenkins API token - generates Jenkins API token and initialized Jenkins client</li>
|
||||
</ul>
|
||||
|
||||
<p><strong>User</strong> reconciliation loop takes care of reconciling user provided configuration, which consists of:</p>
|
||||
|
||||
<ul>
|
||||
<li>Ensure Restore Job - creates Restore job and ensures that restore has been successfully performed<br /></li>
|
||||
<li>Ensure Seed Jobs - creates Seed Jobs and ensures that all of them have been successfully executed</li>
|
||||
<li>Ensure User Configuration - executed user provided configuration, like groovy scripts, configuration as code or plugins</li>
|
||||
<li>Ensure Backup Job - creates a Backup job and ensures that backup has been successfully performed</li>
|
||||
</ul>
|
||||
|
||||
<p><img src="/kubernetes-operator/img/phases.png" alt="reconcile" /></p>
|
||||
|
||||
<h2 id="operator-state">Operator State</h2>
|
||||
|
||||
<p>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.</p>
|
||||
<p>Operator state is kept in the custom resource status section, which is used for storing any configuration events or job statuses managed by the operator.</p>
|
||||
|
||||
<p>It helps to maintain or recover the desired state even after the operator or Jenkins restarts.</p>
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
@ -461,7 +461,7 @@
|
|||
|
||||
|
||||
<div class="pageinfo pageinfo-primary">
|
||||
<p>This document describes a high level overview how jenkins-operator works.</p>
|
||||
<p>This document describes a high level overview of how jenkins-operator works.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -30,30 +30,40 @@
|
|||
|
||||
|
||||
|
||||
<p>The <strong>Jenkins Operator</strong> 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</p>
|
||||
<p>The <strong>Jenkins Operator</strong> design incorporates the following concepts:</p>
|
||||
|
||||
<ul>
|
||||
<li>watches any changes of manifests and maintain the desired state according to deployed custom resource manifest</li>
|
||||
<li>implements the main reconciliation loop which consists of two smaller reconciliation loops - base and user</li>
|
||||
</ul>
|
||||
|
||||
<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/reconcile.png" alt="reconcile" /></p>
|
||||
|
||||
<p><strong>Base</strong> 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</p>
|
||||
<p><strong>Base</strong> reconciliation loop takes care of reconciling base Jenkins configuration, which consists of:</p>
|
||||
|
||||
<p><strong>User</strong> 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<br />
|
||||
- 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</p>
|
||||
<ul>
|
||||
<li>Ensure Manifests - monitors any changes in manifests</li>
|
||||
<li>Ensure Jenkins Pod - creates and verifies the status of Jenkins master Pod</li>
|
||||
<li>Ensure Jenkins Configuration - configures Jenkins instance including hardening, initial configuration for plugins, etc.</li>
|
||||
<li>Ensure Jenkins API token - generates Jenkins API token and initialized Jenkins client</li>
|
||||
</ul>
|
||||
|
||||
<p><strong>User</strong> reconciliation loop takes care of reconciling user provided configuration, which consists of:</p>
|
||||
|
||||
<ul>
|
||||
<li>Ensure Restore Job - creates Restore job and ensures that restore has been successfully performed<br /></li>
|
||||
<li>Ensure Seed Jobs - creates Seed Jobs and ensures that all of them have been successfully executed</li>
|
||||
<li>Ensure User Configuration - executed user provided configuration, like groovy scripts, configuration as code or plugins</li>
|
||||
<li>Ensure Backup Job - creates a Backup job and ensures that backup has been successfully performed</li>
|
||||
</ul>
|
||||
|
||||
<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/phases.png" alt="reconcile" /></p>
|
||||
|
||||
<h2 id="operator-state">Operator State</h2>
|
||||
|
||||
<p>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.</p>
|
||||
<p>Operator state is kept in the custom resource status section, which is used for storing any configuration events or job statuses managed by the operator.</p>
|
||||
|
||||
<p>It helps to maintain or recover the desired state even after the operator or Jenkins restarts.</p>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
|
@ -67,8 +77,9 @@ It helps to maintain or recover desired state even after operator or Jenkins res
|
|||
<description>
|
||||
|
||||
|
||||
<p><strong>Jenkins Operator</strong> is fully compatible with <strong>jenkins:lts</strong> 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.</p>
|
||||
<p><strong>Jenkins Operator</strong> is fully compatible with <strong><code>jenkins:lts</code></strong> Docker image and does not introduce any hidden changes to the upstream Jenkins.</p>
|
||||
|
||||
<p>If needed, the Docker image can easily be changed in custom resource manifest as long as it supports standard Jenkins file system structure.</p>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
<meta itemprop="datePublished" content="2019-08-05T00:00:00+00:00" />
|
||||
<meta itemprop="dateModified" content="2019-08-05T00:00:00+00:00" />
|
||||
<meta itemprop="wordCount" content="40">
|
||||
<meta itemprop="wordCount" content="43">
|
||||
|
||||
|
||||
|
||||
|
|
@ -264,7 +264,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
@ -475,8 +475,9 @@
|
|||
<div class="td-content">
|
||||
<h1>Jenkins Docker Images</h1>
|
||||
<div class="lead">Jenkins default image details</div>
|
||||
<p><strong>Jenkins Operator</strong> is fully compatible with <strong>jenkins:lts</strong> 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.</p>
|
||||
<p><strong>Jenkins Operator</strong> is fully compatible with <strong><code>jenkins:lts</code></strong> Docker image and does not introduce any hidden changes to the upstream Jenkins.</p>
|
||||
|
||||
<p>If needed, the Docker image can easily be changed in custom resource manifest as long as it supports standard Jenkins file system structure.</p>
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -30,30 +30,40 @@
|
|||
|
||||
|
||||
|
||||
<p>The <strong>Jenkins Operator</strong> 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</p>
|
||||
<p>The <strong>Jenkins Operator</strong> design incorporates the following concepts:</p>
|
||||
|
||||
<ul>
|
||||
<li>watches any changes of manifests and maintain the desired state according to deployed custom resource manifest</li>
|
||||
<li>implements the main reconciliation loop which consists of two smaller reconciliation loops - base and user</li>
|
||||
</ul>
|
||||
|
||||
<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/reconcile.png" alt="reconcile" /></p>
|
||||
|
||||
<p><strong>Base</strong> 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</p>
|
||||
<p><strong>Base</strong> reconciliation loop takes care of reconciling base Jenkins configuration, which consists of:</p>
|
||||
|
||||
<p><strong>User</strong> 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<br />
|
||||
- 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</p>
|
||||
<ul>
|
||||
<li>Ensure Manifests - monitors any changes in manifests</li>
|
||||
<li>Ensure Jenkins Pod - creates and verifies the status of Jenkins master Pod</li>
|
||||
<li>Ensure Jenkins Configuration - configures Jenkins instance including hardening, initial configuration for plugins, etc.</li>
|
||||
<li>Ensure Jenkins API token - generates Jenkins API token and initialized Jenkins client</li>
|
||||
</ul>
|
||||
|
||||
<p><strong>User</strong> reconciliation loop takes care of reconciling user provided configuration, which consists of:</p>
|
||||
|
||||
<ul>
|
||||
<li>Ensure Restore Job - creates Restore job and ensures that restore has been successfully performed<br /></li>
|
||||
<li>Ensure Seed Jobs - creates Seed Jobs and ensures that all of them have been successfully executed</li>
|
||||
<li>Ensure User Configuration - executed user provided configuration, like groovy scripts, configuration as code or plugins</li>
|
||||
<li>Ensure Backup Job - creates a Backup job and ensures that backup has been successfully performed</li>
|
||||
</ul>
|
||||
|
||||
<p><img src="https://jenkinsci.github.io/kubernetes-operator/kubernetes-operator/img/phases.png" alt="reconcile" /></p>
|
||||
|
||||
<h2 id="operator-state">Operator State</h2>
|
||||
|
||||
<p>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.</p>
|
||||
<p>Operator state is kept in the custom resource status section, which is used for storing any configuration events or job statuses managed by the operator.</p>
|
||||
|
||||
<p>It helps to maintain or recover the desired state even after the operator or Jenkins restarts.</p>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
|
@ -67,8 +77,8 @@ It helps to maintain or recover desired state even after operator or Jenkins res
|
|||
<description>
|
||||
|
||||
|
||||
<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>
|
||||
<p>Once Jenkins Operator is up and running let&rsquo;s deploy actual Jenkins instance.
|
||||
Create manifest e.g. <strong><code>jenkins_instance.yaml</code></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:
|
||||
|
|
@ -112,7 +122,7 @@ spec:
|
|||
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>
|
||||
<p>Deploy a Jenkins to Kubernetes:</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>
|
||||
|
|
@ -231,7 +241,7 @@ and deploy keys.</p>
|
|||
└── build.jenkins
|
||||
</code></pre>
|
||||
|
||||
<p><strong>cicd/jobs/build.jenkins</strong> is a job definition:</p>
|
||||
<p><strong><code>cicd/jobs/build.jenkins</code></strong> is a job definition:</p>
|
||||
|
||||
<pre><code>#!/usr/bin/env groovy
|
||||
|
||||
|
|
@ -255,7 +265,7 @@ pipelineJob('build-jenkins-operator') {
|
|||
}
|
||||
</code></pre>
|
||||
|
||||
<p><strong>cicd/pipelines/build.jenkins</strong> is an actual Jenkins pipeline:</p>
|
||||
<p><strong><code>cicd/pipelines/build.jenkins</code></strong> is an actual Jenkins pipeline:</p>
|
||||
|
||||
<pre><code>#!/usr/bin/env groovy
|
||||
|
||||
|
|
@ -421,7 +431,7 @@ stringData:
|
|||
|
||||
<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>
|
||||
<p>To use forwarding proxy with an operator to download plugins you need to add the following environment variable to Jenkins Custom Resource (CR), 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">
|
||||
|
|
@ -429,7 +439,7 @@ stringData:
|
|||
</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>
|
||||
<p>In <code>CURL_OPTIONS</code> var you can set additional arguments to <code>curl</code> command.</p>
|
||||
|
||||
<h2 id="pulling-docker-images-from-private-repositories">Pulling Docker images from private repositories</h2>
|
||||
|
||||
|
|
@ -445,7 +455,7 @@ stringData:
|
|||
<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 a Base64 value before setting the <code>.dockerconfigjson</code> key:q.</p>
|
||||
<p>After modifications, it needs to be encoded as a Base64 value before setting the <code>.dockerconfigjson</code> key.</p>
|
||||
|
||||
<p>Example config file to modify and use:</p>
|
||||
|
||||
|
|
@ -780,9 +790,9 @@ The <code>/sbin/tini -s -- /usr/local/bin/jenkins.sh</code> command
|
|||
|
||||
<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>
|
||||
Then you must reference the <strong><code>ConfigMap</code></strong> 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>
|
||||
<p>For example create a <strong><code>ConfigMap</code></strong> 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">
|
||||
|
|
@ -824,8 +834,8 @@ Then you must reference the <em>ConfigMap</em> in the <strong>
|
|||
</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>
|
||||
<li><code>*.groovy</code> is Groovy script configuration</li>
|
||||
<li><code>*.yaml is</code> 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.
|
||||
|
|
@ -861,7 +871,7 @@ The secrets are loaded to <code>secrets</code> map.</p>
|
|||
</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>
|
||||
<p>Now you can test that the secret is mounted by applying this <code>ConfigMap</code> 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">
|
||||
|
|
@ -889,7 +899,7 @@ The secrets are loaded to <code>secrets</code> map.</p>
|
|||
|
||||
<h2 id="install-plugins">Install Plugins</h2>
|
||||
|
||||
<p>Edit CR under <code>spec.master.plugins</code>:</p>
|
||||
<p>Edit Custom Resource under <code>spec.master.plugins</code>:</p>
|
||||
|
||||
<pre><code>apiVersion: jenkins.io/v1alpha2
|
||||
kind: Jenkins
|
||||
|
|
@ -1272,9 +1282,12 @@ 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>Two commands (e.g. scripts) are required:</p>
|
||||
|
||||
<ul>
|
||||
<li>a backup command, e.g. <code>backup.sh</code> that takes one argument, a <strong>backup number</strong></li>
|
||||
<li>a restore command, e.g. <code>backup.sh</code> that takes one argument, a <strong>backup number</strong></li>
|
||||
</ul>
|
||||
|
||||
<p>Both scripts need to return an exit code of <code>0</code> on success and <code>1</code> or greater for failure.</p>
|
||||
|
||||
|
|
@ -1292,15 +1305,18 @@ Kubernetes pod as the Jenkins master.</p>
|
|||
<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>
|
||||
<p>The operator will call a backup or restore commands inside a sidecar container when necessary:</p>
|
||||
|
||||
<ul>
|
||||
<li>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</li>
|
||||
<li>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>)</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="example-aws-s3-backup-using-the-cli">Example AWS S3 backup using the CLI</h2>
|
||||
|
||||
|
|
@ -1442,8 +1458,9 @@ the number of backups under control, e.g. Cloud Formation fragment:</p>
|
|||
<description>
|
||||
|
||||
|
||||
<p><strong>Jenkins Operator</strong> is fully compatible with <strong>jenkins:lts</strong> 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.</p>
|
||||
<p><strong>Jenkins Operator</strong> is fully compatible with <strong><code>jenkins:lts</code></strong> Docker image and does not introduce any hidden changes to the upstream Jenkins.</p>
|
||||
|
||||
<p>If needed, the Docker image can easily be changed in custom resource manifest as long as it supports standard Jenkins file system structure.</p>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
|
@ -1459,21 +1476,44 @@ If needed, the docker image can easily be changed in custom resource manifest as
|
|||
|
||||
|
||||
|
||||
<h3 id="added-seed-job-agent">Added seed job agent</h3>
|
||||
<h3 id="major-changes">Major Changes</h3>
|
||||
|
||||
<p>Seed jobs are not built by master executors, but by dedicated agents deployed into Kubernetes. We disabled master executors for security reasons.</p>
|
||||
<h4 id="adding-the-seed-job-agent">Adding the seed job agent</h4>
|
||||
|
||||
<h3 id="apply-jenkins-configuration-via-groovy-scripts-instead-of-jenkins-jobs">Apply Jenkins configuration via Groovy scripts instead of Jenkins jobs</h3>
|
||||
<p>From version <code>v0.2.0</code> seed jobs are not run by master executors, but by a dedicated agent deployed as a Kubernetes Pod.</p>
|
||||
|
||||
<p>We have removed the hardcoded configuration by <strong>Jenkins</strong> jobs.</p>
|
||||
<p>We&rsquo;ve had disabled master executors for security reasons.</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 refererences to old ConfigMap by modifying CR, for example:</p>
|
||||
<h4 id="replacing-configuration-jobs-with-groovy-scripts">Replacing configuration jobs with Groovy scripts</h4>
|
||||
|
||||
<p>In <code>v0.1.x</code> <strong>Jenkins Operator</strong> user configuration application was implemented using <strong>Jenkins</strong> jobs
|
||||
and this mechanism was replaced since <code>v0.2.0</code> with Groovy scripts implementing the same functionality.</p>
|
||||
|
||||
<p>As a result the <strong>Jenkins</strong> configuration jobs (&ldquo;Configure Seed Jobs&rdquo;, &ldquo;jenkins-operator-base-configuration&rdquo;, &ldquo;jenkins-operator-user-configuration&rdquo;) are no longer visible in <strong>Jenkins</strong> UI.</p>
|
||||
|
||||
<p>In <code>v0.1.x</code> you can see if any of the configuration jobs failed or succeded in the <strong>Jenkins</strong> UI (job build logs).
|
||||
Instead, you can make sure the operator is running correctly by inspecting its logs, 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-bash" data-lang="bash">$ kubectl -n logs deployment/jenkins-operator</code></pre></div>
|
||||
<h4 id="making-user-configuration-sources-configurable">Making User Configuration sources configurable</h4>
|
||||
|
||||
<p>In <code>v0.1.x</code> <strong>Jenkins Operator</strong> user configuration was stored in a <code>ConfigMap</code> and a <code>Secret</code>
|
||||
named <code>jenkins-operator-user-configuration-&lt;cr_name&gt;</code>, and its name was hardcoded in the operator.</p>
|
||||
|
||||
<p>Since <code>v0.2.0</code> the user configuration can be stored in a multiple <code>ConfigMap</code> and <code>Secret</code> manifests
|
||||
and has to be explicitly pointed to with <code>spec.configurationAsCode.configurations</code> and <code>spec.configurationAsCode.secret</code>
|
||||
for the Configuration as Code plugin,
|
||||
and <code>spec.groovyScripts.configurations</code> and <code>spec.groovyScripts.secret</code> for the more advanced groovy scripts.</p>
|
||||
|
||||
<h3 id="migration">Migration</h3>
|
||||
|
||||
<p>If you want to use <code>v0.1.x</code> operator configuration with <code>v0.2.x</code> you have to modify your Jenkins Custom Resource(s)
|
||||
and add explicit references to the existing <code>ConfigMap</code> and <code>Secret</code>, 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">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>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>&lt;cr_name&gt;<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>...<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;
|
||||
|
|
@ -1483,12 +1523,8 @@ If you want to use <code>v0.2.0</code> or newer you must simply writ
|
|||
</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 the configuration failed or successfully updated in <strong>Jenkins</strong> UI (job build logs).
|
||||
When Jenkins configuration jobs are removed, you must use the following 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>
|
||||
</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"> ...</span></code></pre></div>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
|
|
@ -1570,7 +1606,7 @@ kubectl apply -f deploy/operator.yaml</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">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>
|
||||
<p>Verify the <code>jenkins-operator</code> 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>
|
||||
|
||||
|
|
@ -1607,18 +1643,18 @@ kubectl apply -f deploy/operator.yaml</code></pre></div>
|
|||
</item>
|
||||
|
||||
<item>
|
||||
<title>Docs: Scheme</title>
|
||||
<link>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/scheme/</link>
|
||||
<title>Docs: Schema</title>
|
||||
<link>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/schema/</link>
|
||||
<pubDate>Mon, 05 Aug 2019 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/scheme/</guid>
|
||||
<guid>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/schema/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="pageinfo pageinfo-primary">
|
||||
<p>This document contains API scheme for <code>jenkins-operator</code> manifest</p>
|
||||
<p>This document contains API scheme for <code>jenkins-operator</code> Custom Resource Definition manifest</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
@ -476,7 +476,8 @@
|
|||
|
||||
|
||||
<div class="pageinfo pageinfo-primary">
|
||||
<p>This document describes installation procedure for jenkins-operator. All container images can be found at virtuslab/jenkins-operator</p>
|
||||
<p>This document describes installation procedure for <strong>Jenkins Operator</strong>.
|
||||
All container images can be found at <a href="https://hub.docker.com/r/virtuslab/jenkins-operator" target="_blank">virtuslab/jenkins-operator</a></p>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
@ -486,9 +487,9 @@
|
|||
<p>To run <strong>Jenkins Operator</strong>, you will need:</p>
|
||||
|
||||
<ul>
|
||||
<li><p>running Kubernetes cluster version 1.11+</p></li>
|
||||
<li><p>access to a Kubernetes cluster version <code>1.11+</code></p></li>
|
||||
|
||||
<li><p>kubectl version 1.11+</p></li>
|
||||
<li><p><code>kubectl</code> version <code>1.11+</code></p></li>
|
||||
</ul>
|
||||
|
||||
<h2 id="configure-custom-resource-definition">Configure Custom Resource Definition</h2>
|
||||
|
|
@ -501,7 +502,7 @@
|
|||
<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 https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/deploy/all-in-one-v1alpha2.yaml</code></pre></div>
|
||||
<p>Watch <strong>Jenkins Operator</strong> 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>Now <strong>Jenkins Operator</strong> should be up and running in <code>default</code> namespace.</p>
|
||||
<p>Now <strong>Jenkins Operator</strong> should be up and running in the <code>default</code> namespace.</p>
|
||||
|
||||
<div class="section-index">
|
||||
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@
|
|||
|
||||
|
||||
|
||||
<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>
|
||||
<a class="td-sidebar-link td-sidebar-link__page " id="m-kubernetes-operator-docs-getting-started-latest-schema" href="/kubernetes-operator/docs/getting-started/latest/schema/">Schema</a>
|
||||
|
||||
|
||||
</li>
|
||||
|
|
@ -476,7 +476,8 @@
|
|||
<div class="lead">Jenkins security and hardening out of the box</div>
|
||||
|
||||
|
||||
<p>By default <strong>Jenkins Operator</strong> performs an initial security hardening of Jenkins instance via groovy scripts to prevent any security gaps.</p>
|
||||
<p>By default <strong>Jenkins Operator</strong> performs an initial security hardening of Jenkins instance
|
||||
via groovy scripts to prevent any security gaps.</p>
|
||||
|
||||
<h2 id="jenkins-access-control">Jenkins Access Control</h2>
|
||||
|
||||
|
|
@ -489,20 +490,24 @@ because <strong>Jenkins Operator</strong> calls Jenkins API.</p>
|
|||
|
||||
<h2 id="jenkins-hardening">Jenkins Hardening</h2>
|
||||
|
||||
<p>The list below describes all the default security setting configured by the <strong>Jenkins Operator</strong>:
|
||||
- basic settings - use <code>Mode.EXCLUSIVE</code> - 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 - <code>JNLP3-connect</code>, <code>JNLP2-connect</code> and <code>JNLP-connect</code> are disabled
|
||||
- disable CLI - CLI access of <code>/cli</code> URL is disabled
|
||||
- configure kubernetes-plugin - secure configuration for Kubernetes plugin</p>
|
||||
<p>The list below describes all the default security setting configured by the <strong>Jenkins Operator</strong>:</p>
|
||||
|
||||
<ul>
|
||||
<li>basic settings - use <code>Mode.EXCLUSIVE</code> - Jobs must specify that they want to run on master node</li>
|
||||
<li>enable CSRF - Cross Site Request Forgery Protection is enabled</li>
|
||||
<li>disable usage stats - Jenkins usage stats submitting is disabled</li>
|
||||
<li>enable master access control - Slave To Master Access Control is enabled</li>
|
||||
<li>disable old JNLP protocols - <code>JNLP3-connect</code>, <code>JNLP2-connect</code> and <code>JNLP-connect</code> are disabled</li>
|
||||
<li>disable CLI - CLI access of <code>/cli</code> URL is disabled</li>
|
||||
<li>configure kubernetes-plugin - secure configuration for Kubernetes plugin</li>
|
||||
</ul>
|
||||
|
||||
<p>If you would like to dig a little bit into the code, take a look <a href="../pkg/controller/jenkins/configuration/base/resources/base_configuration_configmap.go">here</a>.</p>
|
||||
|
||||
<h2 id="jenkins-api">Jenkins API</h2>
|
||||
|
||||
<p>The <strong>Jenkins Operator</strong> generates and configures Basic Authentication token for Jenkins go client and stores it in a Kubernetes Secret.</p>
|
||||
<p>The <strong>Jenkins Operator</strong> generates and configures Basic Authentication token for Jenkins Go client
|
||||
and stores it in a Kubernetes Secret.</p>
|
||||
|
||||
<h2 id="kubernetes">Kubernetes</h2>
|
||||
|
||||
|
|
@ -510,9 +515,11 @@ because <strong>Jenkins Operator</strong> calls Jenkins API.</p>
|
|||
- <a href="../deploy/role.yaml">jenkins-operator role</a><br />
|
||||
- <a href="../pkg/controller/jenkins/configuration/base/resources/rbac.go">Jenkins Master role</a></p>
|
||||
|
||||
<p>Since <strong>Jenkins Operator</strong> must be able to grant permission for its’ deployed Jenkins masters to spawn pods (the <code>Jenkins Master role</code> above),
|
||||
the operator itself requires permission to create RBAC resources (the <code>jenkins-operator role</code> above).
|
||||
Deployed this way, any subject which may create a Pod (including a Jenkins job) may
|
||||
<p>Since <strong>Jenkins Operator</strong> must be able to grant permission for its’ deployed Jenkins masters
|
||||
to spawn pods (the <code>Jenkins Master role</code> above),
|
||||
the operator itself requires permission to create RBAC resources (the <code>jenkins-operator role</code> above).</p>
|
||||
|
||||
<p>Deployed this way, any subject which may create a Pod (including a Jenkins job) may
|
||||
assume the <code>jenkins-operator</code> role by using its’ ServiceAccount, create RBAC rules, and thus escape its granted permissions.
|
||||
Any namespace to which the <code>jenkins-operator</code> is deployed must be considered to implicitly grant all
|
||||
possible permissions to any subject which can create a Pod in that namespace.</p>
|
||||
|
|
@ -528,7 +535,7 @@ $ kubectl create ns jenkins</code></pre></div>
|
|||
<p>Next, apply the RBAC manifests for <strong>Jenkins Operator</strong> namespace</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 jenkins-operator apply -f deploy/service_account.yaml
|
||||
$ kubectl -n jenkins-operator apply -f deploy/role_binding.yaml</code></pre></div>
|
||||
<p>Create file role_binding_jenkins.yaml in <code>deploy</code> folder:</p>
|
||||
<p>Create file <code>role_binding_jenkins.yaml</code> in <code>deploy</code> folder:</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>RoleBinding<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>rbac.authorization.k8s.io/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">
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -128,7 +128,7 @@
|
|||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/scheme/</loc>
|
||||
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/schema/</loc>
|
||||
<lastmod>2019-08-05T00:00:00+00:00</lastmod>
|
||||
</url>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue