mirror of
https://github.com/jenkinsci/kubernetes-operator.git
synced 2026-10-18 05:54:47 +02:00
#157 Regenerate docs
This commit is contained in:
committed by
Paweł Prażak
parent
327a688674
commit
d8bc1ffa4d
+97
-61
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user