Merge branch 'master' of github.com:jenkinsci/kubernetes-operator into security-validator

- Refactored code in webhook and main
- Merged changes from master
This commit is contained in:
sharmapulkit04 2021-08-09 18:47:06 +05:30
commit 9106582a9e
38 changed files with 431 additions and 208 deletions

View File

@ -0,0 +1,4 @@
# Configuration for devbots-needs-triage - https://devbots.xyz/documentation/needs-triage/
enabled: true
label: "needs triage"

14
.github/ISSUE_TEMPLATE/documentation.md vendored Normal file
View File

@ -0,0 +1,14 @@
---
name: "📚 Documentation issue"
about: Suggest changes to project's documentation
title: ''
labels: 'documentation'
projects: ''
assignees: ''
---
**Relevant links*
Link(s) to the section(s) of documentation that are outdated or otherwise wrong
**Description**
Description of the changes you would like to see

47
.github/stale.yml vendored Normal file
View File

@ -0,0 +1,47 @@
# Configuration for probot-stale - https://github.com/probot/stale
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 30
# Number of days of inactivity before a stale Issue or Pull Request is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 60
# Issues with these labels will never be considered stale
exemptLabels:
- frozen
# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: true
# Label to use when marking an issue as stale
staleLabel: stale
issues:
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had recent activity.
It will be closed if no further activity occurs.
If this issue is still affecting you, just comment with any updates and we'll keep it open.
Thank you for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: >
Closing this issue after a prolonged period of inactivity.
If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!
pulls:
# Comment to post when marking a pull request as stale.
markComment: >
This pull request has been automatically marked as stale because it has not had recent activity.
It will be closed if no further activity occurs.
If this pull request is still relevant, just comment with any updates and we'll keep it open.
Thank you for your contributions.
# Comment to post when closing a stale pull request. Set to `false` to disable
closeComment: >
Closing this pull request after a prolonged period of inactivity.
If this issue is still present in the latest release, please ask for this pull request to be reopened. Thank you!
# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 30

View File

@ -23,18 +23,15 @@ jobs:
submodules: recursive # Fetch the Docsy theme
fetch-depth: 0
# Checks out a copy of your repository on the ubuntu-latest machine
# Checks if the previous commit introduced any changes to website files
- name: Check for changes
run: |
if git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -E "^website*"; then
git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -E "^website*"
echo "IS_CHANGED=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -E "^website*")" >> $GITHUB_ENV
else
echo "IS_CHANGED=empty" >> $GITHUB_ENV
fi
IS_CHANGED=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -Ec "^website*" || :)
[[ $IS_CHANGED -gt 0 ]] && echo "IS_CHANGED=true" >> $GITHUB_ENV || echo "IS_CHANGED=false" >> $GITHUB_ENV
# Sets up the appropriate version of Hugo
- name: Setup Hugo
if: env.IS_CHANGED != 'empty'
if: env.IS_CHANGED == 'true'
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.62.2'
@ -42,14 +39,14 @@ jobs:
# Sets up node - required by Hugo
- name: Setup Node
if: env.IS_CHANGED != 'empty'
if: env.IS_CHANGED == 'true'
uses: actions/setup-node@v1
with:
node-version: '12.x'
# Installs dependencies required by docsy theme
- name: Install docsy dependencies
if: env.IS_CHANGED != 'empty'
if: env.IS_CHANGED == 'true'
run: |
cd website
npm install
@ -57,17 +54,18 @@ jobs:
sudo npm install -D --save autoprefixer
sudo npm install -D --save postcss-cli
cd ../
# Runs makefile goal - checks changes to /website folder and generates docs
- name: Run Makefile goal
if: env.IS_CHANGED != 'empty'
if: env.IS_CHANGED == 'true'
env:
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: make generate-docs
# Create push request with generated docs
# Creates pull request with generated docs
- name: Create Pull Request
if: env.IS_CHANGED != 'empty'
if: env.IS_CHANGED == 'true'
uses: peter-evans/create-pull-request@v3
with:
commit-message: Auto-updated docs

View File

@ -19,7 +19,6 @@ COPY internal/ internal/
COPY pkg/ pkg/
COPY version/ version/
COPY main.go main.go
RUN mkdir plugins/
# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -ldflags "-w $CTIMEVAR" -o manager main.go
@ -30,4 +29,5 @@ FROM gcr.io/distroless/static:nonroot
WORKDIR /
COPY --from=builder /workspace/manager .
USER 65532:65532
ENTRYPOINT ["/manager"]

View File

@ -70,6 +70,9 @@ Fill out ([Invite form](https://forms.gle/X3X8qA1XMirdBuEH7)) and come say hi !
We are trying our best to resolve issues quickly, but they have to wait to be released. If you can't wait for an official
docker image release and acknowledge the risk, you can use our unofficial images, which are built nightly.
You can find the project's Docker Hub repository [here](https://hub.docker.com/r/virtuslab/jenkins-operator).
Look for the images with tag "{git-hash}", where {git-hash} is the hash of the master commit that interests you.
## Contribution

View File

@ -37,7 +37,7 @@ import (
var (
jenkinslog = logf.Log.WithName("jenkins-resource") // log is for logging in this package.
PluginsDataManager PluginDataManager = *NewPluginsDataManager()
PluginsMgr PluginDataManager = *NewPluginsDataManager()
_ webhook.Validator = &Jenkins{}
)
@ -77,12 +77,13 @@ func (in *Jenkins) ValidateDelete() error {
}
type PluginDataManager struct {
pluginDataCache PluginsInfo
hosturl string
compressedFilePath string
pluginDataFile string
iscached bool
maxattempts int
PluginDataCache PluginsInfo
Hosturl string
CompressedFilePath string
PluginDataFile string
IsCached bool
Attempts int
SleepTime int
}
type PluginsInfo struct {
@ -114,27 +115,31 @@ type PluginData struct {
// Validates security warnings for both updating and creating a Jenkins CR
func Validate(r Jenkins) error {
pluginset := make(map[string]PluginData)
var faultybaseplugins string
var faultyuserplugins string
if !PluginsMgr.IsCached {
return errors.New("plugins data has not been fetched")
}
pluginSet := make(map[string]PluginData)
var faultyBasePlugins string
var faultyUserPlugins string
basePlugins := plugins.BasePlugins()
for _, plugin := range basePlugins {
// Only Update the map if the plugin is not present or a lower version is being used
if pluginData, ispresent := pluginset[plugin.Name]; !ispresent || semver.Compare(MakeSemanticVersion(plugin.Version), pluginData.Version) == 1 {
pluginset[plugin.Name] = PluginData{Version: plugin.Version, Kind: "base"}
if pluginData, ispresent := pluginSet[plugin.Name]; !ispresent || semver.Compare(makeSemanticVersion(plugin.Version), pluginData.Version) == 1 {
pluginSet[plugin.Name] = PluginData{Version: plugin.Version, Kind: "base"}
}
}
for _, plugin := range r.Spec.Master.Plugins {
if pluginData, ispresent := pluginset[plugin.Name]; !ispresent || semver.Compare(MakeSemanticVersion(plugin.Version), pluginData.Version) == 1 {
pluginset[plugin.Name] = PluginData{Version: plugin.Version, Kind: "user-defined"}
if pluginData, ispresent := pluginSet[plugin.Name]; !ispresent || semver.Compare(makeSemanticVersion(plugin.Version), pluginData.Version) == 1 {
pluginSet[plugin.Name] = PluginData{Version: plugin.Version, Kind: "user-defined"}
}
}
for _, plugin := range PluginsDataManager.pluginDataCache.Plugins {
if pluginData, ispresent := pluginset[plugin.Name]; ispresent {
var hasvulnerabilities bool
for _, plugin := range PluginsMgr.PluginDataCache.Plugins {
if pluginData, ispresent := pluginSet[plugin.Name]; ispresent {
var hasVulnerabilities bool
for _, warning := range plugin.SecurityWarnings {
for _, version := range warning.Versions {
firstVersion := version.FirstVersion
@ -146,29 +151,29 @@ func Validate(r Jenkins) error {
lastVersion = pluginData.Version // setting default value in case of empty string
}
if CompareVersions(firstVersion, lastVersion, pluginData.Version) {
if compareVersions(firstVersion, lastVersion, pluginData.Version) {
jenkinslog.Info("Security Vulnerability detected in "+pluginData.Kind+" "+plugin.Name+":"+pluginData.Version, "Warning message", warning.Message, "For more details,check security advisory", warning.URL)
hasvulnerabilities = true
hasVulnerabilities = true
}
}
}
if hasvulnerabilities {
if hasVulnerabilities {
if pluginData.Kind == "base" {
faultybaseplugins += plugin.Name + ":" + pluginData.Version + "\n"
faultyBasePlugins += plugin.Name + ":" + pluginData.Version + "\n"
} else {
faultyuserplugins += plugin.Name + ":" + pluginData.Version + "\n"
faultyUserPlugins += plugin.Name + ":" + pluginData.Version + "\n"
}
}
}
}
if len(faultybaseplugins) > 0 || len(faultyuserplugins) > 0 {
if len(faultyBasePlugins) > 0 || len(faultyUserPlugins) > 0 {
var errormsg string
if len(faultybaseplugins) > 0 {
errormsg += "Security vulnerabilities detected in the following base plugins: \n" + faultybaseplugins
if len(faultyBasePlugins) > 0 {
errormsg += "Security vulnerabilities detected in the following base plugins: \n" + faultyBasePlugins
}
if len(faultyuserplugins) > 0 {
errormsg += "Security vulnerabilities detected in the following user-defined plugins: \n" + faultyuserplugins
if len(faultyUserPlugins) > 0 {
errormsg += "Security vulnerabilities detected in the following user-defined plugins: \n" + faultyUserPlugins
}
return errors.New(errormsg)
}
@ -178,33 +183,33 @@ func Validate(r Jenkins) error {
func NewPluginsDataManager() *PluginDataManager {
return &PluginDataManager{
hosturl: "https://ci.jenkins.io/job/Infra/job/plugin-site-api/job/generate-data/lastSuccessfulBuild/artifact/plugins.json.gzip",
compressedFilePath: "/tmp/plugins.json.gzip",
pluginDataFile: "/tmp/plugins.json",
iscached: false,
maxattempts: 5,
Hosturl: "https://ci.jenkins.io/job/Infra/job/plugin-site-api/job/generate-data/lastSuccessfulBuild/artifact/plugins.json.gzip",
CompressedFilePath: "/tmp/plugins.json.gzip",
PluginDataFile: "/tmp/plugins.json",
IsCached: false,
Attempts: 0,
}
}
// Downloads extracts and caches the JSON data in every 12 hours
func (in *PluginDataManager) CachePluginData(ch chan bool) {
// Downloads extracts and reads the JSON data in every 12 hours
func (in *PluginDataManager) FetchPluginData(isInitialized chan bool) {
for {
jenkinslog.Info("Initializing/Updating the plugin data cache")
var isdownloaded, isextracted, iscached bool
var isDownloaded, isExtracted, isCached bool
var err error
for i := 0; i < in.maxattempts; i++ {
err = in.Download()
for in.Attempts = 0; in.Attempts < 5; in.Attempts++ {
err = in.download()
if err == nil {
isdownloaded = true
isDownloaded = true
break
}
}
if isdownloaded {
for i := 0; i < in.maxattempts; i++ {
err = in.Extract()
if isDownloaded {
for in.Attempts = 0; in.Attempts < 5; in.Attempts++ {
err = in.extract()
if err == nil {
isextracted = true
isExtracted = true
break
}
}
@ -212,32 +217,39 @@ func (in *PluginDataManager) CachePluginData(ch chan bool) {
jenkinslog.Info("Cache Plugin Data", "failed to download file", err)
}
if isextracted {
for i := 0; i < in.maxattempts; i++ {
err = in.Cache()
if isExtracted {
for in.Attempts = 0; in.Attempts < 5; in.Attempts++ {
err = in.cache()
if err == nil {
iscached = true
isCached = true
break
}
}
if !iscached {
if !isCached {
jenkinslog.Info("Cache Plugin Data", "failed to read plugin data file", err)
}
} else {
jenkinslog.Info("Cache Plugin Data", "failed to extract file", err)
}
if !in.iscached {
ch <- iscached
// Checks for the first time
if !in.IsCached {
isInitialized <- isCached
in.IsCached = isCached
}
in.iscached = in.iscached || iscached
time.Sleep(12 * time.Hour)
if isCached {
in.SleepTime = 12
} else {
in.SleepTime = 1
}
time.Sleep(time.Duration(in.SleepTime) * time.Hour)
}
}
func (in *PluginDataManager) Download() error {
out, err := os.Create(in.compressedFilePath)
func (in *PluginDataManager) download() error {
out, err := os.Create(in.CompressedFilePath)
if err != nil {
return err
}
@ -247,7 +259,7 @@ func (in *PluginDataManager) Download() error {
Timeout: 1000 * time.Second,
}
resp, err := client.Get(in.hosturl)
resp, err := client.Get(in.Hosturl)
if err != nil {
return err
}
@ -260,8 +272,8 @@ func (in *PluginDataManager) Download() error {
return nil
}
func (in *PluginDataManager) Extract() error {
reader, err := os.Open(in.compressedFilePath)
func (in *PluginDataManager) extract() error {
reader, err := os.Open(in.CompressedFilePath)
if err != nil {
return err
@ -273,7 +285,7 @@ func (in *PluginDataManager) Extract() error {
}
defer archive.Close()
writer, err := os.Create(in.pluginDataFile)
writer, err := os.Create(in.PluginDataFile)
if err != nil {
return err
}
@ -284,8 +296,8 @@ func (in *PluginDataManager) Extract() error {
}
// Loads the JSON data into memory and stores it
func (in *PluginDataManager) Cache() error {
jsonFile, err := os.Open(in.pluginDataFile)
func (in *PluginDataManager) cache() error {
jsonFile, err := os.Open(in.PluginDataFile)
if err != nil {
return err
}
@ -295,7 +307,7 @@ func (in *PluginDataManager) Cache() error {
if err != nil {
return err
}
err = json.Unmarshal(byteValue, &in.pluginDataCache)
err = json.Unmarshal(byteValue, &in.PluginDataCache)
if err != nil {
return err
}
@ -303,16 +315,16 @@ func (in *PluginDataManager) Cache() error {
}
// returns a semantic version that can be used for comparison
func MakeSemanticVersion(version string) string {
func makeSemanticVersion(version string) string {
version = "v" + version
return semver.Canonical(version)
}
// Compare if the current version lies between first version and last version
func CompareVersions(firstVersion string, lastVersion string, pluginVersion string) bool {
firstSemVer := MakeSemanticVersion(firstVersion)
lastSemVer := MakeSemanticVersion(lastVersion)
pluginSemVer := MakeSemanticVersion(pluginVersion)
func compareVersions(firstVersion string, lastVersion string, pluginVersion string) bool {
firstSemVer := makeSemanticVersion(firstVersion)
lastSemVer := makeSemanticVersion(lastVersion)
pluginSemVer := makeSemanticVersion(pluginVersion)
if semver.Compare(pluginSemVer, firstSemVer) == -1 || semver.Compare(pluginSemVer, lastSemVer) == 1 {
return false
}

View File

@ -1,6 +1,16 @@
apiVersion: v1
entries:
jenkins-operator:
- apiVersion: v2
appVersion: 0.6.0
created: "2021-06-11T13:50:32.677639006+02:00"
description: Kubernetes native operator which fully manages Jenkins on Kubernetes
digest: 48fbf15c3ffff7003623edcde0bec39dc37d0a62303f08066960d5fac799af90
icon: https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/assets/jenkins-operator-icon.png
name: jenkins-operator
urls:
- https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart/jenkins-operator/jenkins-operator-0.5.2.tgz
version: 0.5.2
- apiVersion: v2
appVersion: 0.6.0
created: "2021-06-11T13:50:32.677639006+02:00"

View File

@ -2,5 +2,5 @@ apiVersion: v2
appVersion: "0.6.0"
description: Kubernetes native operator which fully manages Jenkins on Kubernetes
name: jenkins-operator
version: 0.5.1
version: 0.5.2
icon: https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/assets/jenkins-operator-icon.png

Binary file not shown.

View File

@ -100,8 +100,6 @@ spec:
{{- end }}
{{- if .Values.jenkins.priorityClassName }}
priorityClassName: {{- .Values.jenkins.priorityClassName }}
{{- else }}
priorityClassName: ""
{{- end }}
disableCSRFProtection: {{ .Values.jenkins.disableCSRFProtection }}
containers:

View File

@ -124,6 +124,9 @@ jenkins:
claimName: jenkins-backup
# volumeMounts are mounts for Jenkins pod
# Note that attempting to overwrite default mount settings for restricted,
# non-configurable volumeMounts will result in Operator error
# See https://jenkinsci.github.io/kubernetes-operator/docs/installation/#note-on-restricted-jenkins-controller-pod-volumemounts for details
volumeMounts: []
# defines authorization strategy of the operator for the Jenkins API

View File

@ -26,7 +26,7 @@
" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/docs/developer-guide/" />
<meta property="og:updated_time" content="2021-06-10T00:00:00+00:00" /><meta property="og:site_name" content="Jenkins Operator" />
<meta property="og:updated_time" content="2021-07-30T00:00:00+00:00" /><meta property="og:site_name" content="Jenkins Operator" />
<meta itemprop="name" content="Developer Guide">
<meta itemprop="description" content="Jenkins Operator for developers
"><meta name="twitter:card" content="summary"/>
@ -765,6 +765,7 @@
<li><a href="#build-and-run-with-a-minikube">Build and run with a minikube</a>
<ul>
<li><a href="#debug-jenkins-operator">Debug Jenkins Operator</a></li>
<li><a href="#stop-or-delete-minikube-cluster">Stop or delete minikube cluster</a></li>
</ul></li>
<li><a href="#build-and-run-with-a-remote-kubernetes-cluster">Build and run with a remote Kubernetes cluster</a></li>
<li><a href="#testing">Testing</a>
@ -996,6 +997,12 @@ jenkins-jenkins-example 1/1 Running <s
seed-job-agent-jenkins-example-758cc7cc5c-82hbl 1/1 Running <span style="color:#0000cf;font-weight:bold">0</span> 21m</code></pre></div>
<h3 id="debug-jenkins-operator">Debug Jenkins Operator</h3>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">make run <span style="color:#000">OPERATOR_EXTRA_ARGS</span><span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#4e9a06">&#34;--debug&#34;</span></code></pre></div>
<h3 id="stop-or-delete-minikube-cluster">Stop or delete minikube cluster</h3>
<p>To stop Kubernetes cluster running locally on minikube:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">minikube stop</code></pre></div>
<p>To delete the cluster altogether:</p>
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">minikube delete</code></pre></div>
<h2 id="build-and-run-with-a-remote-kubernetes-cluster">Build and run with a remote Kubernetes cluster</h2>
<p>You can also run the controller locally and make it listen to a remote Kubernetes server.</p>
@ -1038,6 +1045,8 @@ kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="
</a></p></li>
<li><p><a href="https://www.katacoda.com/openshift/courses/operatorframework">Operator Framework Training By OpenShift</a></p></li>
<li><p><a href="https://sdk.operatorframework.io/docs/building-operators/golang/tutorial/">Operator SDK Tutorial for Go</a></p></li>
</ul>
<div class="section-index">
@ -1204,7 +1213,7 @@ kubectl get secret jenkins-operator-credentials-&lt;cr_name&gt; -o <span style="
<div class="text-muted mt-5 pt-3 border-top">Last modified June 10, 2021
<div class="text-muted mt-5 pt-3 border-top">Last modified July 30, 2021
</div>
</div>

View File

@ -4,7 +4,7 @@
<link>https://jenkinsci.github.io/kubernetes-operator/docs/developer-guide/</link>
<description>Recent Hugo news from gohugo.io</description>
<generator>Hugo -- gohugo.io</generator>
<lastBuildDate>Thu, 10 Jun 2021 00:00:00 +0000</lastBuildDate>
<lastBuildDate>Fri, 30 Jul 2021 00:00:00 +0000</lastBuildDate>
<image>
<url>https://jenkinsci.github.io/kubernetes-operator/img/hugo.png</url>
<title>GoHugo.io</title>

View File

@ -969,7 +969,7 @@ spec:
targets: "cicd/jobs/*.jenkins"
description: "Jenkins Operator repository"
repositoryBranch: master
repositoryUrl: ssh://git@github.com:jenkinsci/kubernetes-operator.git</code></pre>
repositoryUrl: git@github.com:jenkinsci/kubernetes-operator.git</code></pre>
<p>and create a Kubernetes Secret (name of secret should be the same from <code>credentialID</code> field):</p>
<pre><code>apiVersion: v1
kind: Secret

View File

@ -32,7 +32,7 @@
">
<meta itemprop="datePublished" content="2021-01-25T00:00:00&#43;00:00" />
<meta itemprop="dateModified" content="2021-01-25T00:00:00&#43;00:00" />
<meta itemprop="wordCount" content="182">
<meta itemprop="wordCount" content="230">
@ -833,6 +833,12 @@
<div class="lead">Prevent loss of job history</div>
<blockquote>
<p>Because of Jenkins Operator&rsquo;s architecture, the configuration of Jenkins should be done using ConfigurationAsCode
or GroovyScripts and jobs should be defined as SeedJobs. It means that there is no point in backing up any job configuration
up. Therefore, the backup script makes a copy of jobs history only.</p>
</blockquote>
<p>Backup and restore is done by a container sidecar.</p>
<h3 id="pvc">PVC</h3>
@ -895,7 +901,7 @@
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>getLatestAction<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/get-latest.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to get last backup number before pod deletion. If you don&#39;t omit it in CR, you can lose data</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/get-latest.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to get last backup number before pod deletion; not having it in the CR may cause loss of data</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>interval<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">30</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># how often make backup in seconds</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>makeBackupBeforePodDeletion<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># make a backup before pod deletion</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>restore<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">

View File

@ -32,7 +32,7 @@
">
<meta itemprop="datePublished" content="2021-01-25T00:00:00&#43;00:00" />
<meta itemprop="dateModified" content="2021-01-25T00:00:00&#43;00:00" />
<meta itemprop="wordCount" content="295">
<meta itemprop="wordCount" content="288">
@ -840,14 +840,17 @@
Plugin&rsquo;s configuration is applied as groovy scripts or the <a href="https://github.com/jenkinsci/configuration-as-code-plugin">configuration as code plugin</a>.
Any plugin working for Jenkins can be installed by the Jenkins Operator.</p>
<p>Pre-installed plugins:
* configuration-as-code v1.47
* git v4.5.0
* job-dsl v1.77
* kubernetes-credentials-provider v0.15
* kubernetes v1.29.0
* workflow-aggregator v2.6
* workflow-job v2.40</p>
<p>Pre-installed plugins:</p>
<ul>
<li>configuration-as-code v1.51</li>
<li>git v4.7.2</li>
<li>job-dsl v1.77</li>
<li>kubernetes-credentials-provider v0.18-1</li>
<li>kubernetes v1.30.0</li>
<li>workflow-aggregator v2.6</li>
<li>workflow-job v2.41</li>
</ul>
<p>Rest of the plugins can be found in <a href="https://plugins.jenkins.io/">plugins repository</a>.</p>
@ -872,19 +875,19 @@ Any plugin working for Jenkins can be installed by the Jenkins Operator.</p>
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>master<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>basePlugins<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.28.6&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.30.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-job<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2.40&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>workflow-aggregator<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2.6&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>git<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;4.5.0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;4.7.2&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>job-dsl<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.77&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>configuration-as-code<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.46&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1.51&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>name<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span>kubernetes-credentials-provider<span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;0.15&#34;</span></code></pre></div>
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>version<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;0.18-1&#34;</span></code></pre></div>
<p>You can change their versions.</p>
<p>The <strong>Jenkins Operator</strong> will then automatically install plugins after the Jenkins master pod restart.</p>

View File

@ -822,6 +822,8 @@
<hr class="panel-line">
<div class="entry">
<h5>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/">Deploy Jenkins</a>
@ -844,8 +846,6 @@
<div class="entry">
<h5>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/configuration/">Configuration</a>

View File

@ -240,7 +240,7 @@ spec:
targets: &#34;cicd/jobs/*.jenkins&#34;
description: &#34;Jenkins Operator repository&#34;
repositoryBranch: master
repositoryUrl: ssh://git@github.com:jenkinsci/kubernetes-operator.git&lt;/code&gt;&lt;/pre&gt;
repositoryUrl: git@github.com:jenkinsci/kubernetes-operator.git&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and create a Kubernetes Secret (name of secret should be the same from &lt;code&gt;credentialID&lt;/code&gt; field):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;apiVersion: v1
kind: Secret
@ -403,14 +403,17 @@ stringData:
Plugin&amp;rsquo;s configuration is applied as groovy scripts or the &lt;a href=&#34;https://github.com/jenkinsci/configuration-as-code-plugin&#34;&gt;configuration as code plugin&lt;/a&gt;.
Any plugin working for Jenkins can be installed by the Jenkins Operator.&lt;/p&gt;
&lt;p&gt;Pre-installed plugins:
* configuration-as-code v1.47
* git v4.5.0
* job-dsl v1.77
* kubernetes-credentials-provider v0.15
* kubernetes v1.29.0
* workflow-aggregator v2.6
* workflow-job v2.40&lt;/p&gt;
&lt;p&gt;Pre-installed plugins:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;configuration-as-code v1.51&lt;/li&gt;
&lt;li&gt;git v4.7.2&lt;/li&gt;
&lt;li&gt;job-dsl v1.77&lt;/li&gt;
&lt;li&gt;kubernetes-credentials-provider v0.18-1&lt;/li&gt;
&lt;li&gt;kubernetes v1.30.0&lt;/li&gt;
&lt;li&gt;workflow-aggregator v2.6&lt;/li&gt;
&lt;li&gt;workflow-job v2.41&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Rest of the plugins can be found in &lt;a href=&#34;https://plugins.jenkins.io/&#34;&gt;plugins repository&lt;/a&gt;.&lt;/p&gt;
@ -435,19 +438,19 @@ Any plugin working for Jenkins can be installed by the Jenkins Operator.&lt;/p&g
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;master&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;basePlugins&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;-&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;kubernetes&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;version&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;1.28.6&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;version&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;1.30.0&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;-&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;workflow-job&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;version&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;2.40&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;-&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;workflow-aggregator&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;version&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;2.6&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;-&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;git&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;version&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;4.5.0&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;version&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;4.7.2&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;-&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;job-dsl&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;version&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;1.77&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;-&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;configuration-as-code&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;version&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;1.46&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;version&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;1.51&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;-&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;kubernetes-credentials-provider&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;version&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;0.15&amp;#34;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;version&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;0.18-1&amp;#34;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You can change their versions.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;Jenkins Operator&lt;/strong&gt; will then automatically install plugins after the Jenkins master pod restart.&lt;/p&gt;
@ -576,6 +579,12 @@ The secrets are loaded to &lt;code&gt;secrets&lt;/code&gt; map.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Because of Jenkins Operator&amp;rsquo;s architecture, the configuration of Jenkins should be done using ConfigurationAsCode
or GroovyScripts and jobs should be defined as SeedJobs. It means that there is no point in backing up any job configuration
up. Therefore, the backup script makes a copy of jobs history only.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Backup and restore is done by a container sidecar.&lt;/p&gt;
&lt;h3 id=&#34;pvc&#34;&gt;PVC&lt;/h3&gt;
@ -638,7 +647,7 @@ The secrets are loaded to &lt;code&gt;secrets&lt;/code&gt; map.&lt;/p&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;getLatestAction&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;exec&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;command&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;-&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;/home/user/bin/get-latest.sh&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# this command is invoked on &amp;#34;backup&amp;#34; container to get last backup number before pod deletion. If you don&amp;#39;t omit it in CR, you can lose data&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;-&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;/home/user/bin/get-latest.sh&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# this command is invoked on &amp;#34;backup&amp;#34; container to get last backup number before pod deletion; not having it in the CR may cause loss of data&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;interval&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;30&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# how often make backup in seconds&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;makeBackupBeforePodDeletion&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;true&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# make a backup before pod deletion&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;restore&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
@ -1670,7 +1679,12 @@ Values defined by an Env with a duplicate key will take precedence.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;em&gt;(Optional)&lt;/em&gt;
&lt;p&gt;Pod volumes to mount into the container&amp;rsquo;s filesystem.&lt;/p&gt;
&lt;p&gt;
Pod volumes to mount into the container&amp;rsquo;s filesystem. More info:
&lt;a href=&#34;https://jenkinsci.github.io/kubernetes-operator/docs/installation/#note-on-restricted-jenkins-controller-pod-volumemounts&#34;&gt;
https://jenkinsci.github.io/kubernetes-operator/docs/installation/#note-on-restricted-jenkins-controller-pod-volumemounts
&lt;/a&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;

View File

@ -32,7 +32,7 @@
">
<meta itemprop="datePublished" content="2021-01-18T00:00:00&#43;00:00" />
<meta itemprop="dateModified" content="2021-01-18T00:00:00&#43;00:00" />
<meta itemprop="wordCount" content="2960">
<meta itemprop="wordCount" content="2963">
@ -1471,7 +1471,12 @@ Values defined by an Env with a duplicate key will take precedence.</p>
</td>
<td>
<em>(Optional)</em>
<p>Pod volumes to mount into the container&rsquo;s filesystem.</p>
<p>
Pod volumes to mount into the container&rsquo;s filesystem. More info:
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/installation/#note-on-restricted-jenkins-controller-pod-volumemounts">
https://jenkinsci.github.io/kubernetes-operator/docs/installation/#note-on-restricted-jenkins-controller-pod-volumemounts
</a>
</p>
</td>
</tr>
<tr>

View File

@ -903,7 +903,7 @@
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>getLatestAction<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>exec<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>command<span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/get-latest.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to get last backup number before pod deletion. If you don&#39;t omit it in CR, you can lose data</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>-<span style="color:#f8f8f8;text-decoration:underline"> </span>/home/user/bin/get-latest.sh<span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># this command is invoked on &#34;backup&#34; container to get last backup number before pod deletion; not having it in the CR may cause loss of data</span><span style="color:#f8f8f8;text-decoration:underline">
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic">#recoveryOnce: &lt;backup_number&gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored</span></code></pre></div>

View File

@ -824,6 +824,8 @@
<div class="entry">
<h5>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/deploy-jenkins/">Deploy Jenkins</a>
@ -846,8 +848,6 @@
<div class="entry">
<h5>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.5.x/configuration/">Configuration</a>

View File

@ -634,7 +634,7 @@ The secrets are loaded to &lt;code&gt;secrets&lt;/code&gt; map.&lt;/p&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;getLatestAction&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;exec&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;command&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;-&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;/home/user/bin/get-latest.sh&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# this command is invoked on &amp;#34;backup&amp;#34; container to get last backup number before pod deletion. If you don&amp;#39;t omit it in CR, you can lose data&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;-&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;/home/user/bin/get-latest.sh&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# this command is invoked on &amp;#34;backup&amp;#34; container to get last backup number before pod deletion; not having it in the CR may cause loss of data&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;#recoveryOnce: &amp;lt;backup_number&amp;gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
</description>
</item>

View File

@ -789,10 +789,6 @@
<hr class="panel-line">
<div class="entry">
<h5>
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/installation/">Installation</a>
@ -832,6 +828,10 @@

View File

@ -651,7 +651,7 @@ spec:
targets: &#34;cicd/jobs/*.jenkins&#34;
description: &#34;Jenkins Operator repository&#34;
repositoryBranch: master
repositoryUrl: ssh://git@github.com:jenkinsci/kubernetes-operator.git&lt;/code&gt;&lt;/pre&gt;
repositoryUrl: git@github.com:jenkinsci/kubernetes-operator.git&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and create a Kubernetes Secret (name of secret should be the same from &lt;code&gt;credentialID&lt;/code&gt; field):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;apiVersion: v1
kind: Secret
@ -2167,14 +2167,17 @@ stringData:
Plugin&amp;rsquo;s configuration is applied as groovy scripts or the &lt;a href=&#34;https://github.com/jenkinsci/configuration-as-code-plugin&#34;&gt;configuration as code plugin&lt;/a&gt;.
Any plugin working for Jenkins can be installed by the Jenkins Operator.&lt;/p&gt;
&lt;p&gt;Pre-installed plugins:
* configuration-as-code v1.47
* git v4.5.0
* job-dsl v1.77
* kubernetes-credentials-provider v0.15
* kubernetes v1.29.0
* workflow-aggregator v2.6
* workflow-job v2.40&lt;/p&gt;
&lt;p&gt;Pre-installed plugins:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;configuration-as-code v1.51&lt;/li&gt;
&lt;li&gt;git v4.7.2&lt;/li&gt;
&lt;li&gt;job-dsl v1.77&lt;/li&gt;
&lt;li&gt;kubernetes-credentials-provider v0.18-1&lt;/li&gt;
&lt;li&gt;kubernetes v1.30.0&lt;/li&gt;
&lt;li&gt;workflow-aggregator v2.6&lt;/li&gt;
&lt;li&gt;workflow-job v2.41&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Rest of the plugins can be found in &lt;a href=&#34;https://plugins.jenkins.io/&#34;&gt;plugins repository&lt;/a&gt;.&lt;/p&gt;
@ -2199,19 +2202,19 @@ Any plugin working for Jenkins can be installed by the Jenkins Operator.&lt;/p&g
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;master&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;basePlugins&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;-&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;kubernetes&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;version&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;1.28.6&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;version&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;1.30.0&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;-&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;workflow-job&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;version&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;2.40&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;-&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;workflow-aggregator&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;version&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;2.6&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;-&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;git&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;version&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;4.5.0&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;version&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;4.7.2&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;-&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;job-dsl&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;version&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;1.77&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;-&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;configuration-as-code&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;version&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;1.46&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;version&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;1.51&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;-&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;name&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;kubernetes-credentials-provider&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;version&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;0.15&amp;#34;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;version&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;0.18-1&amp;#34;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You can change their versions.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;Jenkins Operator&lt;/strong&gt; will then automatically install plugins after the Jenkins master pod restart.&lt;/p&gt;
@ -3123,6 +3126,12 @@ spec:
&lt;blockquote&gt;
&lt;p&gt;Because of Jenkins Operator&amp;rsquo;s architecture, the configuration of Jenkins should be done using ConfigurationAsCode
or GroovyScripts and jobs should be defined as SeedJobs. It means that there is no point in backing up any job configuration
up. Therefore, the backup script makes a copy of jobs history only.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Backup and restore is done by a container sidecar.&lt;/p&gt;
&lt;h3 id=&#34;pvc&#34;&gt;PVC&lt;/h3&gt;
@ -3185,7 +3194,7 @@ spec:
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;getLatestAction&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;exec&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;command&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;-&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;/home/user/bin/get-latest.sh&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# this command is invoked on &amp;#34;backup&amp;#34; container to get last backup number before pod deletion. If you don&amp;#39;t omit it in CR, you can lose data&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;-&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;/home/user/bin/get-latest.sh&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# this command is invoked on &amp;#34;backup&amp;#34; container to get last backup number before pod deletion; not having it in the CR may cause loss of data&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;interval&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0000cf;font-weight:bold&#34;&gt;30&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# how often make backup in seconds&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;makeBackupBeforePodDeletion&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;true&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# make a backup before pod deletion&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;restore&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
@ -3279,7 +3288,7 @@ spec:
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;getLatestAction&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;exec&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;command&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;-&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;/home/user/bin/get-latest.sh&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# this command is invoked on &amp;#34;backup&amp;#34; container to get last backup number before pod deletion. If you don&amp;#39;t omit it in CR, you can lose data&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;-&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;/home/user/bin/get-latest.sh&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# this command is invoked on &amp;#34;backup&amp;#34; container to get last backup number before pod deletion; not having it in the CR may cause loss of data&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;#recoveryOnce: &amp;lt;backup_number&amp;gt; # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
</description>
</item>
@ -6185,7 +6194,12 @@ Values defined by an Env with a duplicate key will take precedence.&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;em&gt;(Optional)&lt;/em&gt;
&lt;p&gt;Pod volumes to mount into the container&amp;rsquo;s filesystem.&lt;/p&gt;
&lt;p&gt;
Pod volumes to mount into the container&amp;rsquo;s filesystem. More info:
&lt;a href=&#34;https://jenkinsci.github.io/kubernetes-operator/docs/installation/#note-on-restricted-jenkins-controller-pod-volumemounts&#34;&gt;
https://jenkinsci.github.io/kubernetes-operator/docs/installation/#note-on-restricted-jenkins-controller-pod-volumemounts
&lt;/a&gt;
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;

View File

@ -26,7 +26,7 @@
" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://jenkinsci.github.io/kubernetes-operator/docs/installation/" />
<meta property="og:updated_time" content="2020-10-05T00:00:00+00:00" /><meta property="og:site_name" content="Jenkins Operator" />
<meta property="og:updated_time" content="2021-07-30T00:00:00+00:00" /><meta property="og:site_name" content="Jenkins Operator" />
<meta itemprop="name" content="Installation">
<meta itemprop="description" content="How to install Jenkins Operator
"><meta name="twitter:card" content="summary"/>
@ -766,6 +766,8 @@
<ul>
<li><a href="#configuring-operator-deployment">Configuring operator deployment</a></li>
</ul></li>
<li><a href="#note-on-operator-s-nightly-built-images">Note on Operator&rsquo;s nightly built images</a></li>
<li><a href="#note-on-restricted-jenkins-controller-pod-volumemounts">Note on restricted Jenkins controller pod volumeMounts</a></li>
</ul></li>
</ul>
</nav>
@ -808,18 +810,21 @@
<div class="pageinfo pageinfo-primary">
<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">virtuslab/jenkins-operator</a></p>
All container images can be found at <a href="https://hub.docker.com/r/virtuslab/jenkins-operator">virtuslab/jenkins-operator</a> Docker Hub repository.</p>
</div>
<h2 id="requirements">Requirements</h2>
<p>To run <strong>Jenkins Operator</strong>, you will need:
- access to a Kubernetes cluster version <code>1.17+</code>
- <code>kubectl</code> version <code>1.17+</code></p>
<p>To run <strong>Jenkins Operator</strong>, you will need:</p>
<p>Listed below are the two ways to deploy Jenkins Operator. For details on how to customize your Jenkins instance, refer to <a href="/kubernetes-operator/docs/installation/">Getting Started</a></p>
<ul>
<li>access to a Kubernetes cluster version <code>1.17+</code></li>
<li><code>kubectl</code> version <code>1.17+</code></li>
</ul>
<p>Listed below are the two ways to deploy Jenkins Operator. For details on how to customize your Jenkins instance, refer to <a href="/kubernetes-operator/docs/installation/">Getting Started</a>.</p>
<h2 id="deploy-jenkins-operator-using-yaml-s">Deploy Jenkins Operator using YAML&rsquo;s</h2>
@ -1649,6 +1654,32 @@ Example:<br />
</tbody>
</table></p>
<h2 id="note-on-operator-s-nightly-built-images">Note on Operator&rsquo;s nightly built images</h2>
<p>If you wish to use the newest, not yet released version of the Operator, you can use one of nightly built snapshot images, however the maintainers of this project cannot guarantee their stability.</p>
<p>You can find nightly built images by heading to <a href="https://hub.docker.com/r/virtuslab/jenkins-operator">virtuslab/jenkins-operator</a> Docker Hub repository and looking for images with tag in the form of &ldquo;{git-hash}&rdquo;, {git-hash} being the hash of master branch commit that you want to use snapshot of.</p>
<h2 id="note-on-restricted-jenkins-controller-pod-volumemounts">Note on restricted Jenkins controller pod volumeMounts</h2>
<p>Current design of the Operator puts an emphasis on creating a full GitOps flow of work for Jenkins users.
One of the key points of this design is maintaining an immutable state of Jenkins.</p>
<p>One of the prerequisites of this is an ephemeral Jenkins home directory. To achieve that, Operator mounts emptyDir Volume
(jenkins-home) as Jenkins home directory.
It is not possible to overwrite volumeMount and specify any other Volume for Jenkins home directory,
as attempting to do so will result in Operator error.</p>
<p>jenkins-home is not the only Jenkins controller pod volumeMount that is non-configurable and managed by Operator,
below is the full list of those volumeMounts:</p>
<ul>
<li>jenkins-home</li>
<li>scripts</li>
<li>init-configuration</li>
<li>operator-credentials</li>
</ul>
<div class="section-index">
@ -1805,7 +1836,7 @@ Example:<br />
<div class="text-muted mt-5 pt-3 border-top">Last modified October 5, 2020
<div class="text-muted mt-5 pt-3 border-top">Last modified July 30, 2021
</div>
</div>

View File

@ -4,7 +4,7 @@
<link>https://jenkinsci.github.io/kubernetes-operator/docs/installation/</link>
<description>Recent Hugo news from gohugo.io</description>
<generator>Hugo -- gohugo.io</generator>
<lastBuildDate>Mon, 05 Oct 2020 00:00:00 +0000</lastBuildDate>
<lastBuildDate>Fri, 30 Jul 2021 00:00:00 +0000</lastBuildDate>
<image>
<url>https://jenkinsci.github.io/kubernetes-operator/img/hugo.png</url>
<title>GoHugo.io</title>

View File

@ -2,6 +2,11 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/installation/</loc>
<lastmod>2021-07-30T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/deploy-jenkins/</loc>
<lastmod>2021-01-25T00:00:00+00:00</lastmod>
@ -12,11 +17,6 @@
<lastmod>2021-01-25T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/installation/</loc>
<lastmod>2020-10-05T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/v0.4.x/deploy-jenkins/</loc>
<lastmod>2020-04-13T00:00:00+00:00</lastmod>
@ -369,7 +369,7 @@
<url>
<loc>https://jenkinsci.github.io/kubernetes-operator/docs/developer-guide/</loc>
<lastmod>2021-06-10T00:00:00+00:00</lastmod>
<lastmod>2021-07-30T00:00:00+00:00</lastmod>
</url>
<url>

View File

@ -112,11 +112,11 @@ func main() {
logger.Info(fmt.Sprintf("Watch namespace: %v", namespace))
if ValidateSecurityWarnings {
ispluginsdatainitialized := make(chan bool)
go v1alpha2.PluginsDataManager.CachePluginData(ispluginsdatainitialized)
isInitialized := make(chan bool)
go v1alpha2.PluginsMgr.FetchPluginData(isInitialized)
if !<-ispluginsdatainitialized {
fatal(errors.New("Unable to get the plugins data"), *debug)
if !<-isInitialized {
logger.Info("Unable to get the plugins data")
}
}

View File

@ -80,6 +80,7 @@ import hudson.plugins.git.BranchSpec;
import hudson.plugins.git.GitSCM;
import hudson.plugins.git.SubmoduleConfig;
import hudson.plugins.git.extensions.impl.CloneOption;
import hudson.plugins.git.extensions.impl.GitLFSPull;
import javaposse.jobdsl.plugin.ExecuteDslScripts;
import javaposse.jobdsl.plugin.LookupStrategy;
import javaposse.jobdsl.plugin.RemovedJobAction;
@ -93,7 +94,10 @@ def jobDslSeedName = "{{ .ID }}-{{ .SeedJobSuffix }}";
def jobRef = jenkins.getItem(jobDslSeedName)
def repoList = GitSCM.createRepoList("{{ .RepositoryURL }}", "{{ .CredentialID }}")
def gitExtensions = [new CloneOption(true, true, ";", 10)]
def gitExtensions = [
new CloneOption(true, true, ";", 10),
new GitLFSPull()
]
def scm = new GitSCM(
repoList,
newArrayList(new BranchSpec("{{ .RepositoryBranch }}")),
@ -438,7 +442,7 @@ func agentDeployment(jenkins *v1alpha2.Jenkins, namespace string, agentName stri
Containers: []corev1.Container{
{
Name: "jnlp",
Image: "jenkins/inbound-agent:alpine",
Image: "jenkins/inbound-agent:4.9-1",
Env: []corev1.EnvVar{
{
Name: "JENKINS_TUNNEL",

View File

@ -2,7 +2,7 @@
title: "Developer Guide"
linkTitle: "Developer Guide"
weight: 60
date: 2021-06-10
date: 2021-07-30
description: >
Jenkins Operator for developers
---
@ -211,6 +211,16 @@ seed-job-agent-jenkins-example-758cc7cc5c-82hbl 1/1 Running 0
make run OPERATOR_EXTRA_ARGS="--debug"
```
### Stop or delete minikube cluster
To stop Kubernetes cluster running locally on minikube:
```bash
minikube stop
```
To delete the cluster altogether:
```bash
minikube delete
```
## Build and run with a remote Kubernetes cluster
You can also run the controller locally and make it listen to a remote Kubernetes server.
@ -282,6 +292,18 @@ kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.us
kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.password}' | base64 -d
```
## Self-learning
* [Tutorial: Deep Dive into the Operator Framework for... Melvin Hillsman, Michael Hrivnak, & Matt Dorn
](https://www.youtube.com/watch?v=8_DaCcRMp5I)
* [Operator Framework Training By OpenShift](https://www.katacoda.com/openshift/courses/operatorframework)
* [Operator SDK Tutorial for Go](https://sdk.operatorframework.io/docs/building-operators/golang/tutorial/)
[dep_tool]:https://golang.github.io/dep/docs/installation.html
[git_tool]:https://git-scm.com/downloads
[go_tool]:https://golang.org/dl/
@ -293,9 +315,3 @@ kubectl get secret jenkins-operator-credentials-<cr_name> -o 'jsonpath={.data.pa
[virtualbox]:https://www.virtualbox.org/wiki/Downloads
[install_dev_tools]:https://jenkinsci.github.io/kubernetes-operator/docs/developer-guide/tools/
## Self-learning
* [Tutorial: Deep Dive into the Operator Framework for... Melvin Hillsman, Michael Hrivnak, & Matt Dorn
](https://www.youtube.com/watch?v=8_DaCcRMp5I)
* [Operator Framework Training By OpenShift](https://www.katacoda.com/openshift/courses/operatorframework)

View File

@ -163,7 +163,7 @@ spec:
targets: "cicd/jobs/*.jenkins"
description: "Jenkins Operator repository"
repositoryBranch: master
repositoryUrl: ssh://git@github.com:jenkinsci/kubernetes-operator.git
repositoryUrl: git@github.com:jenkinsci/kubernetes-operator.git
```
and create a Kubernetes Secret (name of secret should be the same from `credentialID` field):

View File

@ -7,6 +7,10 @@ description: >
Prevent loss of job history
---
> Because of Jenkins Operator's architecture, the configuration of Jenkins should be done using ConfigurationAsCode
> or GroovyScripts and jobs should be defined as SeedJobs. It means that there is no point in backing up any job configuration
> up. Therefore, the backup script makes a copy of jobs history only.
Backup and restore is done by a container sidecar.
### PVC
@ -77,7 +81,7 @@ spec:
getLatestAction:
exec:
command:
- /home/user/bin/get-latest.sh # this command is invoked on "backup" container to get last backup number before pod deletion. If you don't omit it in CR, you can lose data
- /home/user/bin/get-latest.sh # this command is invoked on "backup" container to get last backup number before pod deletion; not having it in the CR may cause loss of data
interval: 30 # how often make backup in seconds
makeBackupBeforePodDeletion: true # make a backup before pod deletion
restore:

View File

@ -13,13 +13,14 @@ Plugin's configuration is applied as groovy scripts or the [configuration as cod
Any plugin working for Jenkins can be installed by the Jenkins Operator.
Pre-installed plugins:
* configuration-as-code v1.47
* git v4.5.0
* configuration-as-code v1.51
* git v4.7.2
* job-dsl v1.77
* kubernetes-credentials-provider v0.15
* kubernetes v1.29.0
* kubernetes-credentials-provider v0.18-1
* kubernetes v1.30.0
* workflow-aggregator v2.6
* workflow-job v2.40
* workflow-job v2.41
Rest of the plugins can be found in [plugins repository](https://plugins.jenkins.io/).
@ -51,19 +52,19 @@ spec:
master:
basePlugins:
- name: kubernetes
version: "1.28.6"
version: "1.30.0"
- name: workflow-job
version: "2.40"
- name: workflow-aggregator
version: "2.6"
- name: git
version: "4.5.0"
version: "4.7.2"
- name: job-dsl
version: "1.77"
- name: configuration-as-code
version: "1.46"
version: "1.51"
- name: kubernetes-credentials-provider
version: "0.15"
version: "0.18-1"
```
You can change their versions.

View File

@ -661,7 +661,12 @@ Values defined by an Env with a duplicate key will take precedence.</p>
</td>
<td>
<em>(Optional)</em>
<p>Pod volumes to mount into the container&rsquo;s filesystem.</p>
<p>
Pod volumes to mount into the container&rsquo;s filesystem. More info:
<a href="https://jenkinsci.github.io/kubernetes-operator/docs/installation/#note-on-restricted-jenkins-controller-pod-volumemounts">
https://jenkinsci.github.io/kubernetes-operator/docs/installation/#note-on-restricted-jenkins-controller-pod-volumemounts
</a>
</p>
</td>
</tr>
<tr>

View File

@ -85,6 +85,6 @@ spec:
getLatestAction:
exec:
command:
- /home/user/bin/get-latest.sh # this command is invoked on "backup" container to get last backup number before pod deletion. If you don't omit it in CR, you can lose data
- /home/user/bin/get-latest.sh # this command is invoked on "backup" container to get last backup number before pod deletion; not having it in the CR may cause loss of data
#recoveryOnce: <backup_number> # if want to restore specific backup configure this field and then Jenkins will be restarted and desired backup will be restored
```

View File

@ -2,24 +2,25 @@
title: "Installation"
linkTitle: "Installation"
weight: 1
date: 2020-10-05
date: 2021-07-30
description: >
How to install Jenkins Operator
---
{{% pageinfo %}}
This document describes installation procedure for **Jenkins Operator**.
All container images can be found at [virtuslab/jenkins-operator](https://hub.docker.com/r/virtuslab/jenkins-operator)
All container images can be found at [virtuslab/jenkins-operator](https://hub.docker.com/r/virtuslab/jenkins-operator) Docker Hub repository.
{{% /pageinfo %}}
## Requirements
To run **Jenkins Operator**, you will need:
- access to a Kubernetes cluster version `1.17+`
- `kubectl` version `1.17+`
Listed below are the two ways to deploy Jenkins Operator. For details on how to customize your Jenkins instance, refer to [Getting Started](/kubernetes-operator/docs/installation/)
Listed below are the two ways to deploy Jenkins Operator. For details on how to customize your Jenkins instance, refer to [Getting Started](/kubernetes-operator/docs/installation/).
## Deploy Jenkins Operator using YAML's
@ -877,3 +878,24 @@ Example:<br />
</tbody>
</table>
## Note on Operator's nightly built images
If you wish to use the newest, not yet released version of the Operator, you can use one of nightly built snapshot images, however the maintainers of this project cannot guarantee their stability.
You can find nightly built images by heading to [virtuslab/jenkins-operator](https://hub.docker.com/r/virtuslab/jenkins-operator) Docker Hub repository and looking for images with tag in the form of "{git-hash}", {git-hash} being the hash of master branch commit that you want to use snapshot of.
## Note on restricted Jenkins controller pod volumeMounts
Current design of the Operator puts an emphasis on creating a full GitOps flow of work for Jenkins users.
One of the key points of this design is maintaining an immutable state of Jenkins.
One of the prerequisites of this is an ephemeral Jenkins home directory. To achieve that, Operator mounts emptyDir Volume
(jenkins-home) as Jenkins home directory.
It is not possible to overwrite volumeMount and specify any other Volume for Jenkins home directory,
as attempting to do so will result in Operator error.
jenkins-home is not the only Jenkins controller pod volumeMount that is non-configurable and managed by Operator,
below is the full list of those volumeMounts:
* jenkins-home
* scripts
* init-configuration
* operator-credentials

View File

@ -288,16 +288,16 @@
}
},
"browserslist": {
"version": "4.16.6",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz",
"integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==",
"version": "4.16.7",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.7.tgz",
"integrity": "sha512-7I4qVwqZltJ7j37wObBe3SoTz+nS8APaNcrBOlgoirb6/HbEU2XxW/LpUDTCngM6iauwFqmRTuOMfyKnFGY5JA==",
"dev": true,
"requires": {
"caniuse-lite": "^1.0.30001219",
"caniuse-lite": "^1.0.30001248",
"colorette": "^1.2.2",
"electron-to-chromium": "^1.3.723",
"electron-to-chromium": "^1.3.793",
"escalade": "^3.1.1",
"node-releases": "^1.1.71"
"node-releases": "^1.1.73"
}
},
"cache-base": {
@ -330,9 +330,9 @@
"dev": true
},
"caniuse-lite": {
"version": "1.0.30001237",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001237.tgz",
"integrity": "sha512-pDHgRndit6p1NR2GhzMbQ6CkRrp4VKuSsqbcLeOQppYPKOYkKT/6ZvZDvKJUqcmtyWIAHuZq3SVS2vc1egCZzw==",
"version": "1.0.30001249",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001249.tgz",
"integrity": "sha512-vcX4U8lwVXPdqzPWi6cAJ3FnQaqXbBqy/GZseKNQzRj37J7qZdGcBtxq/QLFNLLlfsoXLUdHw8Iwenri86Tagw==",
"dev": true
},
"chalk": {
@ -568,9 +568,9 @@
}
},
"electron-to-chromium": {
"version": "1.3.752",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.752.tgz",
"integrity": "sha512-2Tg+7jSl3oPxgsBsWKh5H83QazTkmWG/cnNwJplmyZc7KcN61+I10oUgaXSVk/NwfvN3BdkKDR4FYuRBQQ2v0A==",
"version": "1.3.798",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.798.tgz",
"integrity": "sha512-fwsr6oXAORoV9a6Ak2vMCdXfmHIpAGgpOGesulS1cbGgJmrMl3H+GicUyRG3t+z9uHTMrIuMTleFDW+EUFYT3g==",
"dev": true
},
"end-of-stream": {
@ -925,9 +925,9 @@
}
},
"graceful-fs": {
"version": "4.2.6",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz",
"integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==",
"version": "4.2.8",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz",
"integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==",
"dev": true
},
"has-flag": {
@ -1338,9 +1338,9 @@
"dev": true
},
"nan": {
"version": "2.14.2",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz",
"integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==",
"version": "2.15.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz",
"integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==",
"dev": true,
"optional": true
},